SPECS: hsqldb.spec - cleanups

glen glen at pld-linux.org
Thu Mar 1 22:15:52 CET 2007


Author: glen                         Date: Thu Mar  1 21:15:52 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- cleanups

---- Files affected:
SPECS:
   hsqldb.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: SPECS/hsqldb.spec
diff -u SPECS/hsqldb.spec:1.8 SPECS/hsqldb.spec:1.9
--- SPECS/hsqldb.spec:1.8	Mon Feb 12 22:23:55 2007
+++ SPECS/hsqldb.spec	Thu Mar  1 22:15:46 2007
@@ -1,10 +1,12 @@
 # $Revision$, $Date$
+# TODO
+# - make build with java 1.6
 %define		_ver	%(echo %{version} | tr . _)
 Summary:	SQL relational database engine written in Java
 Summary(pl.UTF-8):	Silnik relacyjnych baz danych SQL napisany w Javie
 Name:		hsqldb
 Version:	1.8.0.7
-Release:	0.1
+Release:	0.2
 License:	BSD Style
 Group:		Development/Languages/Java
 Source0:	http://dl.sourceforge.net/hsqldb/%{name}_%{_ver}.zip
@@ -92,23 +94,16 @@
 Programy demonstracyjne i przykładowe dla HSQLDB.
 
 %prep
-%setup -q -T -c -n %{name}
-unzip -q %{SOURCE0} -d ..
+%setup -q -n %{name}
+%patch0
+#%patch1
 
-# set right permissions
-find . -name "*.sh" -exec chmod 755 {} \;
-# remove all _notes directories
-for dir in $(find -name _notes); do rm -rf $dir; done
 # remove all binary libs
-find . -name "*.jar" -exec rm -f {} \;
-find . -name "*.class" -exec rm -f {} \;
-find . -name "*.war" -exec rm -f {} \;
+find . -name '*.jar' -o -name '*.class' -o -name '*.war' | xargs rm -vf
 
-# correct silly permissions
-chmod -R go=u-w *
-
-%patch0
-#%patch1
+cp -a doc manual
+rm -rf manual/src
+cp -a index.html manual
 
 %build
 export CLASSPATH=$(build-classpath \
@@ -127,11 +122,7 @@
 # jar
 install -d $RPM_BUILD_ROOT%{_javadir}
 install lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
-
-cd $RPM_BUILD_ROOT%{_javadir}
-# FIXME: bashism
-for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done
-cd -
+ln -s  %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
 
 # bin
 install -d $RPM_BUILD_ROOT%{_bindir}
@@ -162,31 +153,18 @@
 
 # javadoc
 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -r doc/src/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-# FIXME: re-entrancy
-rm -rf doc/src
-
-# manual
-install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/doc
-cp -r doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp index.html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+cp -a doc/src/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-# Add the "hsqldb" user and group
-# we need a shell to be able to use su - later
 %groupadd -g 169 %{name}
 %useradd -u 169 -g %{name} -s /bin/sh -d %{_localstatedir}/lib/%{name} %{name}
 
 %post
-rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
-rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
-(cd %{_localstatedir}/lib/%{name}/lib
-    ln -s $(build-classpath hsqldb) hsqldb.jar
-    ln -s $(build-classpath servletapi4) servlet.jar
-)
+ln -sf $(build-classpath hsqldb) %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
+ln -sf $(build-classpath servletapi4) %{_localstatedir}/lib/%{name}/lib/servlet.jar
 
 %preun
 if [ "$1" = "0" ]; then
@@ -207,7 +185,7 @@
 
 %files
 %defattr(644,root,root,755)
-%doc %{_docdir}/%{name}-%{version}/hsqldb_lic.txt
+%doc doc/hsqldb_lic.txt
 %{_javadir}/*
 %attr(755,root,root) %{_bindir}/*
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
@@ -220,7 +198,7 @@
 
 %files manual
 %defattr(644,root,root,755)
-%doc doc/*
+%doc manual/*
 
 %files javadoc
 %defattr(644,root,root,755)
@@ -236,6 +214,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2007/03/01 21:15:46  glen
+- cleanups
+
 Revision 1.8  2007/02/12 21:23:55  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/hsqldb.spec?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list