packages: ice/ice.spec - fix subpackage bconds so that they can be disabled

glen glen at pld-linux.org
Sun Apr 4 18:30:31 CEST 2010


Author: glen                         Date: Sun Apr  4 16:30:31 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix subpackage bconds so that they can be disabled

---- Files affected:
packages/ice:
   ice.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: packages/ice/ice.spec
diff -u packages/ice/ice.spec:1.8 packages/ice/ice.spec:1.9
--- packages/ice/ice.spec:1.8	Sun Apr  4 17:11:37 2010
+++ packages/ice/ice.spec	Sun Apr  4 18:30:26 2010
@@ -1,8 +1,8 @@
 # $Revision$, $Date$
 # TODO
-# - get stuff from fc spec
-# - cc/cflags
-# - language bindings
+# - use our CC/CXX
+# - man pages tarball
+# - ImportKey.class is part of main pkg, thus needs javac
 #
 # Conditional build:
 %bcond_without	java		# Java bindings
@@ -12,10 +12,14 @@
 %bcond_without	php			# PHP bindings
 %bcond_without	gui			# IceGrid GUI
 
+%if %{without java}
+%undefine	with_gui
+%endif
+
 Summary:	The Ice base runtime and services
 Name:		ice
 Version:	3.4.0
-Release:	0.2
+Release:	0.4
 License:	GPL v2 with exceptions (see ICE_LICENSE)
 Group:		Applications
 Source0:	http://www.zeroc.com/download/Ice/3.4/Ice-%{version}.tar.gz
@@ -145,8 +149,21 @@
 %patch2 -p1
 %patch3 -p1
 
-%build
+# Fix the encoding and line-endings of all the IceGridAdmin documentation files
+cd java/resources/IceGridAdmin
+%undos *.js *.css
+for f in helpman_topicinit.js icegridadmin_navigation.js IceGridAdmin_popup_html.js zoom_pageinfo.js; do
+	iconv -f ISO88591 -t UTF8 $f -o $f.tmp
+	mv $f.tmp $f
+done
+cd -
+
+rm cpp/src/ca/ImportKey.class
+
+# update path to our install
+sed -i -e 's,/usr/share/Ice-%{version},%{_datadir}/Ice,' cpp/bin/iceca cpp/src/ca/iceca icegridregistry.conf
 
+%build
 # Compile the main Ice runtime
 # TODO: CC/CXX passing as make param breaks build system
 %{__make} -C cpp \
@@ -155,15 +172,12 @@
 	embedded_runpath_prefix=""
 
 %if %{with java}
+# Rebuild the Java ImportKey class
+javac cpp/src/ca/ImportKey.java
+
 # Set the CLASSPATH correctly for the Java compile
 export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 
-# Rebuild the Java ImportKey class
-cd cpp/src/ca
-rm *.class
-javac ImportKey.java
-cd -
-
 %{__make} -C java \
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC" \
@@ -210,18 +224,26 @@
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_docdir}/Ice-%{version},%{_datadir}/Ice}
 
-%{__make} install \
-	prefix=$RPM_BUILD_ROOT \
-	GACINSTALL=yes \
-	GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
-	embedded_runpath_prefix=""
+%{__make} -C cpp install \
+	prefix=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_bindir}
+mv $RPM_BUILD_ROOT/bin/* $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_includedir}
+mv $RPM_BUILD_ROOT/include/* $RPM_BUILD_ROOT%{_includedir}
+install -d $RPM_BUILD_ROOT%{_libdir}
+# There are a couple of files that end up installed in /lib, not %{_libdir},
+# so we try this move too.
+mv $RPM_BUILD_ROOT/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
+mv $RPM_BUILD_ROOT/lib/* $RPM_BUILD_ROOT%{_libdir} || true
+
+# Move the ImportKey.class file
+mv $RPM_BUILD_ROOT/lib/ImportKey.class $RPM_BUILD_ROOT%{_datadir}/Ice
 
 %if %{with java}
 %{__make} -C java install \
-	prefix=$RPM_BUILD_ROOT \
-	GACINSTALL=yes \
-	GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
-	embedded_runpath_prefix=""
+	prefix=$RPM_BUILD_ROOT
+
 # Move Java stuff where it should be
 install -d $RPM_BUILD_ROOT%{_javadir}
 mv $RPM_BUILD_ROOT/lib/ant-ice.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice-%{version}.jar
@@ -242,60 +264,28 @@
 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
 install -d $RPM_BUILD_ROOT%{_desktopdir}
 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
-%endif
-
-# Move other rpm-specific files into the right place (README, service stuff)
-cp -a Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT/ice.ini
-
-# Install the servers
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
-cp -a Ice-rpmbuild-%{version}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT%{_initrddir}
-for i in icegridregistry icegridnode glacier2router; do
-	cp -a Ice-rpmbuild-%{version}/$i.redhat $RPM_BUILD_ROOT%{_initrddir}/$i
-done
-install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/icegrid
-
-# "make install" assumes it's going into a directory under /opt.
-# Move things to where they should be in an RPM setting (adapted from
-# the original ZeroC srpm).
-install -d $RPM_BUILD_ROOT%{_bindir}
-mv $RPM_BUILD_ROOT/bin/* $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_includedir}
-mv $RPM_BUILD_ROOT/include/* $RPM_BUILD_ROOT%{_includedir}
-install -d $RPM_BUILD_ROOT%{_libdir}
-# There are a couple of files that end up installed in /lib, not %{_libdir},
-# so we try this move too.
-mv $RPM_BUILD_ROOT/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
-mv $RPM_BUILD_ROOT/lib/* $RPM_BUILD_ROOT%{_libdir} || true
 mv $RPM_BUILD_ROOT/help/IceGridAdmin $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}
-
-# Copy the man pages into the correct directory
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-#cp -a $RPM_BUILD_DIR/Ice-3.3.0-man-pages/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-
-# Fix the encoding and line-endings of all the IceGridAdmin documentation files
-cd $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/IceGridAdmin
-chmod a-x *
-for f in *.js *.css; do
-	dos2unix $f
-done
-for f in helpman_topicinit.js icegridadmin_navigation.js IceGridAdmin_popup_html.js zoom_pageinfo.js; do
-	iconv -f ISO88591 -t UTF8 $f -o $f.tmp
-	mv $f.tmp $f
-done
-cd -
+%endif
 
 %if %{with dotnet}
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+%{__make} -C cs install \
+	prefix=$RPM_BUILD_ROOT \
+	GACINSTALL=yes \
+	GAC_ROOT=$RPM_BUILD_ROOT%{_libdir} \
+
 # .NET spec files (for csharp-devel) -- convert the paths
 for f in IceGrid Glacier2 IceBox Ice IceStorm IcePatch2; do
-	sed -i -e "s#/lib/#%{_libdir}/#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
-	sed -i -e "s#mono_root}/usr#mono_root}#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
-	mv $RPM_BUILD_ROOT%{_bindir}/$f.xml $RPM_BUILD_ROOT%{_libdir}/mono/gac/$f/%{version}.*/
+	sed -i -e "s#/lib/#%{_libdir}/#" $RPM_BUILD_ROOT/lib/pkgconfig/$f.pc
+	sed -i -e "s#mono_root}/usr#mono_root}#" $RPM_BUILD_ROOT/lib/pkgconfig/$f.pc
+	mv $RPM_BUILD_ROOT/lib/pkgconfig/$f.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/$f.pc
+	mv $RPM_BUILD_ROOT/bin/$f.xml $RPM_BUILD_ROOT%{_libdir}/mono/gac/$f/%{version}.*/
 done
 %endif
 
 %if %{with python}
+%{__make} -C py install \
+	prefix=$RPM_BUILD_ROOT
 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' $RPM_BUILD_ROOT/python/Ice.py
 install -d $RPM_BUILD_ROOT%{py_sitedir}/Ice
 mv $RPM_BUILD_ROOT/python/IcePy.so.*.*.* $RPM_BUILD_ROOT%{py_sitedir}/Ice/IcePy.so
@@ -308,6 +298,8 @@
 %endif
 
 %if %{with ruby}
+%{__make} -C rb install \
+	prefix=$RPM_BUILD_ROOT
 %{__sed} -i -e '1s,/usr/bin/env ruby,%{__ruby},' $RPM_BUILD_ROOT/ruby/*.rb
 install -d $RPM_BUILD_ROOT%{ruby_sitearchdir}
 mv $RPM_BUILD_ROOT/ruby/IceRuby.so.*.*.* $RPM_BUILD_ROOT%{ruby_sitearchdir}/IceRuby.so
@@ -316,21 +308,33 @@
 %endif
 
 %if %{with php}
+%{__make} -C php install \
+	prefix=$RPM_BUILD_ROOT
 # Put the PHP stuff into the right place
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{php_data_dir}}
-mv $RPM_BUILD_ROOT/ice.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
+cp -a Ice-rpmbuild-%{version}/ice.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
 mv $RPM_BUILD_ROOT/php/IcePHP.so $RPM_BUILD_ROOT%{php_extensiondir}
 mv $RPM_BUILD_ROOT/php/* $RPM_BUILD_ROOT%{php_data_dir}
 %endif
 
+# Install the servers
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a Ice-rpmbuild-%{version}/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install -d $RPM_BUILD_ROOT%{_initrddir}
+for i in icegridregistry icegridnode glacier2router; do
+	cp -a Ice-rpmbuild-%{version}/$i.redhat $RPM_BUILD_ROOT%{_initrddir}/$i
+done
+install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/icegrid
+
+# Copy the man pages into the correct directory
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+#cp -a $RPM_BUILD_DIR/Ice-3.3.0-man-pages/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+
 mv $RPM_BUILD_ROOT/config/* $RPM_BUILD_ROOT%{_datadir}/Ice
 mv $RPM_BUILD_ROOT/slice $RPM_BUILD_ROOT%{_datadir}/Ice
 # Somehow, some files under "slice" end up with executable permissions -- ??
 find $RPM_BUILD_ROOT%{_datadir}/Ice -name "*.ice" | xargs chmod a-x
 
-# Move the ImportKey.class file -- it'll be in %{_libdir} because of the moves earlier
-mv $RPM_BUILD_ROOT%{_libdir}/ImportKey.class $RPM_BUILD_ROOT%{_datadir}/Ice
-
 # Move the license files into the documentation directory
 mv $RPM_BUILD_ROOT/ICE_LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/ICE_LICENSE
 mv $RPM_BUILD_ROOT/LICENSE $RPM_BUILD_ROOT%{_docdir}/Ice-%{version}/LICENSE
@@ -401,9 +405,11 @@
 %{_datadir}/Ice
 
 # XXX gui
+%if %{with gui}
 %attr(755,root,root) %{_bindir}/icegridgui
 %{_desktopdir}/IceGridAdmin.desktop
 %{_iconsdir}/hicolor/*/apps/icegrid.png
+%endif
 
 # XXX doc
 %doc %{_docdir}/Ice-%{version}
@@ -439,14 +445,14 @@
 %{_includedir}/IceXML
 %{_includedir}/Slice
 
-# these pkgconfig files are for csharp, but we do not have separate -devel for csharp
+%if %{with dotnet}
 %{_pkgconfigdir}/Glacier2.pc
 %{_pkgconfigdir}/Ice.pc
 %{_pkgconfigdir}/IceBox.pc
 %{_pkgconfigdir}/IceGrid.pc
 %{_pkgconfigdir}/IcePatch2.pc
 %{_pkgconfigdir}/IceStorm.pc
-
+%endif
 
 # as we do not have -devel for each binding, these are in main -devel
 # -csharp
@@ -470,6 +476,7 @@
 %attr(754,root,root) /etc/rc.d/init.d/icegridnode
 %attr(754,root,root) /etc/rc.d/init.d/icegridregistry
 
+%if %{with dotnet}
 %files -n csharp-%{name}
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/iceboxnet.exe
@@ -485,7 +492,9 @@
 %{_libdir}/mono/gac/IceGrid
 %{_libdir}/mono/gac/IcePatch2
 %{_libdir}/mono/gac/IceStorm
+%endif
 
+%if %{with python}
 %files -n python-%{name}
 %defattr(644,root,root,755)
 %{py_sitedir}/ice.pth
@@ -500,7 +509,9 @@
 %{py_sitedir}/Ice/IcePatch2/*.py[co]
 %{py_sitedir}/Ice/IceStorm/*.py[co]
 %attr(755,root,root) %{py_sitedir}/Ice/IcePy.so
+%endif
 
+%if %{with ruby}
 %files -n ruby-%{name}
 %defattr(644,root,root,755)
 %{ruby_sitearchdir}/Glacier2.rb
@@ -516,7 +527,9 @@
 %{ruby_sitearchdir}/IceStorm.rb
 %{ruby_sitearchdir}/IceStorm/IceStorm.rb
 %attr(755,root,root) %{ruby_sitearchdir}/IceRuby.so
+%endif
 
+%if %{with java}
 %files -n java-%{name}
 %defattr(644,root,root,755)
 %{_javadir}/Freeze-%{version}.jar
@@ -525,7 +538,9 @@
 %{_javadir}/Ice.jar
 %{_javadir}/ant-ice-%{version}.jar
 %{_javadir}/ant-ice.jar
+%endif
 
+%if %{with php}
 %files -n php-%{name}
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/ice.ini
@@ -542,6 +557,7 @@
 %{php_data_dir}/IcePatch2
 %{php_data_dir}/IceStorm.php
 %{php_data_dir}/IceStorm
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -549,6 +565,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2010/04/04 16:30:26  glen
+- fix subpackage bconds so that they can be disabled
+
 Revision 1.8  2010/04/04 15:11:37  glen
 - ruby-modules dep already in place
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ice/ice.spec?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list