SPECS: wxMozilla.spec - fixed building, install, packaging - todo:...

ggodlewski ggodlewski at pld-linux.org
Mon Dec 11 00:35:58 CET 2006


Author: ggodlewski                   Date: Sun Dec 10 23:35:58 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fixed building, install, packaging
- todo: x11 & ansi - I don't have them installed :/

---- Files affected:
SPECS:
   wxMozilla.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/wxMozilla.spec
diff -u SPECS/wxMozilla.spec:1.2 SPECS/wxMozilla.spec:1.3
--- SPECS/wxMozilla.spec:1.2	Mon Dec 11 00:16:05 2006
+++ SPECS/wxMozilla.spec	Mon Dec 11 00:35:53 2006
@@ -1,4 +1,13 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	ansi			# only unicode packages
+%bcond_without	x11			# don't build wxX11 packages
+#
+# TODO:
+# wxPython
+# ansi
+# x11
 
 %define 	_name	wxmozilla
 
@@ -6,7 +15,7 @@
 Summary(pl):	Komponent wxWidgets do osadzania przeglądarki Mozilla w aplikacjach wxWidgets
 Name:		wxMozilla
 Version:	0.5.6
-Release:	0.1
+Release:	0.2
 License:	wxWidgets Licence (LGPL with exception)
 Group:		Applications
 Source0:	http://dl.sourceforge.net/wxmozilla/%{_name}-%{version}.tar.gz
@@ -14,6 +23,10 @@
 Patch0:		%{name}-seamonkey.patch
 URL:		http://wxmozilla.sourceforge.net/
 BuildRequires:	wxGTK2-unicode-devel
+%{?with_x11:BuildRequires:	wxX11-unicode-devel
+%{?with_ansi:BuildRequires:	wxX11-devel}
+}
+%{?with_ansi:BuildRequires:	wxGTK2-devel}
 BuildRequires:	wxWidgets-devel
 BuildRequires:	nspr-devel
 BuildRequires:	seamonkey-devel
@@ -32,31 +45,33 @@
 przeglądarki lub edytora HTML wewnątrz aplikacji.
 
 %package devel
-Summary:	Header files for ... library
-Summary(pl):	Pliki nagłówkowe biblioteki ...
+Summary:	Header files for wxMozilla library
+Summary(pl):	Pliki nagłówkowe biblioteki wxMozilla
 Group:		Development/Libraries
-# if base package contains shared library for which these headers are
-#Requires:	%{name} = %{version}-%{release}
-# if -libs package contains shared library for which these headers are
-#Requires:	%{name}-libs = %{version}-%{release}
 
 %description devel
-Header files for ... library.
+Header files for wxMozilla library.
 
 %description devel -l pl
-Pliki nagłówkowe biblioteki ....
+Pliki nagłówkowe biblioteki wxMozilla
 
-%package static
-Summary:	Static ... library
-Summary(pl):	Statyczna biblioteka ...
+#%%package wxBase-devel
+#%%package wxBase-unicode-devel
+#%%package wxGTK2-devel
+
+%package wxGTK2-unicode-devel
+Summary:	Header files for wxMozilla library GTK2, Unicode version
+Summary(pl):	Pliki nagłówkowe biblioteki wxMozilla wersja GTK2, Unicode
 Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
+Requires:	%{name}-devel
+Requires:	wxGTK2-unicode
 
-%description static
-Static ... library.
+%description wxGTK2-unicode-devel
+Header files for wxMozilla library GTK2, Unicode version.
+
+%description wxGTK2-unicode-devel -l pl
+Pliki nagłówkowe biblioteki wxMozilla wersja GTK2, Unicode
 
-%description static -l pl
-Statyczna biblioteka ....
 
 %prep
 %setup -q -n %{_name}-%{version}
@@ -66,11 +81,22 @@
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-%configure \
-             --enable-seamonkey \
-             --with-wx-config=/usr/bin/wx-gtk2-unicode-config
 
-%{__make}
+for gui in 'gtk2' %{?with_x11:'x11univ'} ; do
+
+for mode in 'unicode' %{?with_ansi:'ansi'} ; do
+	objdir=`echo obj${gui}${mode}`
+	mkdir $objdir
+	cd $objdir
+	../%configure \
+            --enable-seamonkey \
+            --with-wx-config=/usr/bin/wx-${gui}-${mode}-config
+        %{__make}
+	cd ..
+done
+
+done
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -78,17 +104,40 @@
 #install -d $RPM_BUILD_ROOT
 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+for gui in 'gtk2' %{?with_x11:'x11univ'} ; do
+
+for mode in 'unicode' %{?with_ansi:'ansi'} ; do
+	objdir=`echo obj${gui}${mode}`
+	cd $objdir
+	%{__make} install \
+		DESTDIR=$RPM_BUILD_ROOT
+	mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig/wxmozilla.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/wxmozilla-${gui}-${mode}.pc 
+	cd ..
+done
+
+done
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files devel
 %defattr(644,root,root,755)
-%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
+%doc AUTHORS ChangeLog NEWS README
+%{_includedir}/wxmozilla/*
+
+#%%files wxBase-devel
+#%%files wxBase-unicode-devel
+#%%files wxGTK2-devel
+
+%files wxGTK2-unicode-devel
+%defattr(644,root,root,755)
+%{_includedir}/wx*
+%{_libdir}/libwxmozilla_gtk2u*
+%{_libdir}/pkgconfig/wxmozilla-gtk2-unicode.pc
 
-#%{_examplesdir}/%{name}-%{version}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -96,6 +145,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2006/12/10 23:35:53  ggodlewski
+- fixed building, install, packaging
+- todo: x11 & ansi - I don't have them installed :/
+
 Revision 1.2  2006/12/10 23:16:05  qboosh
 - pl, fixes Source0 URL, some cleanups
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/wxMozilla.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list