Packaging cleanups and some rpmlint fixes.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 7 Oct 2011 12:49:17 +0000 (12:49 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 7 Oct 2011 12:49:17 +0000 (12:49 +0000)
org.gridsite.core/project/compat-1.5.patch
org.gridsite.core/src/Makefile
org.gridsite.core/src/make-gridsite-spec

index c6970ba..eecbcce 100644 (file)
@@ -1,10 +1,10 @@
 gridsite-1.5-compat package.
 
-diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile
-index d2005e1..3a28d82 100644
---- a/org.gridsite.core/src/Makefile
-+++ b/org.gridsite.core/src/Makefile
-@@ -89,6 +89,10 @@ libgridsite.so.$(VERSION): grst_err.o grst_x509.o grst_gacl.o grst_xacml.o \
+diff --git a/src/Makefile b/src/Makefile
+index eae692e..6378d34 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -90,6 +90,10 @@ libgridsite.so.$(VERSION): grst_err.o grst_x509.o grst_gacl.o grst_xacml.o \
           grst_asn1.o grst_htcp.o -lcrypto $(XML2_LIBS)
        ln -sf libgridsite.so.$(VERSION) libgridsite.so
        ln -sf libgridsite.so.$(VERSION) libgridsite.so.$(MINOR_VERSION)
@@ -15,7 +15,7 @@ index d2005e1..3a28d82 100644
  
  libgridsite.a: grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o
        ar src libgridsite.a grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o
-@@ -134,6 +138,10 @@ libgridsite_globus.so.$(VERSION): grst_err_globus.o \
+@@ -135,6 +139,10 @@ libgridsite_globus.so.$(VERSION): grst_err_globus.o \
           grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_xacml_globus.o \
           grst_http_globus.o grst_asn1_globus.o $(XML2_LIBS)
        ln -sf libgridsite_globus.so.$(VERSION) libgridsite_globus.so
@@ -26,7 +26,7 @@ index d2005e1..3a28d82 100644
  
  libgridsite_globus.a: grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o
        ar src libgridsite_globus.a \
-@@ -179,6 +187,7 @@ else
+@@ -180,6 +188,7 @@ else
  
  libgridsite_globus.so.$(VERSION): libgridsite.so.$(VERSION)
        cp -f libgridsite.so.$(VERSION) libgridsite_globus.so.$(VERSION)
@@ -34,7 +34,7 @@ index d2005e1..3a28d82 100644
  
  libgridsite_globus.a: libgridsite.a
        cp -f libgridsite.a libgridsite_globus.a
-@@ -195,6 +204,10 @@ libgridsite_nossl.so.$(VERSION): grst_err_nossl.o \
+@@ -196,6 +205,10 @@ libgridsite_nossl.so.$(VERSION): grst_err_nossl.o \
           grst_err_nossl.o grst_gacl_nossl.o grst_xacml_nossl.o \
           grst_http_nossl.o grst_htcp_nossl.o $(XML2_LIBS)
        ln -sf libgridsite_nossl.so.$(VERSION) libgridsite_nossl.so
@@ -43,9 +43,9 @@ index d2005e1..3a28d82 100644
 +         grst_err_nossl.o grst_gacl_nossl.o grst_xacml_nossl.o \
 +         grst_http_nossl.o grst_htcp_nossl.o $(XML2_LIBS)
  
- libgridsite_nossl.a: grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o
+ libgridsite_nossl.a: grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o grst_htcp_nossl.o
        ar src libgridsite_nossl.a \
-@@ -467,6 +480,9 @@ install-lib:
+@@ -468,6 +481,9 @@ install-lib:
                                   $(prefix)/$(libdir)/libgridsite_nossl.so.$(MAJOR_VERSION)
        ln -sf libgridsite_nossl.so.$(PATCH_VERSION) \
                                   $(prefix)/$(libdir)/libgridsite_nossl.so.$(MINOR_VERSION)
@@ -55,23 +55,14 @@ index d2005e1..3a28d82 100644
  
  install-slashgrid: slashgrid
        cp -f slashgrid $(prefix)/sbin
-diff --git a/org.gridsite.core/src/make-gridsite-spec b/org.gridsite.core/src/make-gridsite-spec
-index f7821e0..8c2c7a5 100755
---- a/org.gridsite.core/src/make-gridsite-spec
-+++ b/org.gridsite.core/src/make-gridsite-spec
-@@ -53,6 +53,7 @@ Summary: GridSite
- License: Modified BSD
- Group: System Environment/Daemons
- Source: %{name}-%{version}.src.tar.gz
-+Patch1: compat-1.5.patch
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
- URL: http://www.gridsite.org/
- Vendor: GridPP
-@@ -314,6 +315,19 @@ See http://www.gridsite.org/ for details.
- %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyunixtime.1
+diff --git a/src/make-gridsite-spec b/src/make-gridsite-spec
+index 372214c..b6cd7ba 100755
+--- a/src/make-gridsite-spec
++++ b/src/make-gridsite-spec
+@@ -311,6 +311,23 @@ See http://www.gridsite.org/ for details.
  %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyrenew.1
  %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyinfo.1
-+
 +%package 1.5-compat
 +Group: Development/Libraries
 +Summary: GridSite 1.5 compatibility package
@@ -84,6 +75,11 @@ index f7821e0..8c2c7a5 100755
 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite.so.1.5
 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite_globus.so.1.5
 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite_nossl.so.1.5
++
++%post 1.5-compat -p /sbin/ldconfig
++
++%postun 1.5-compat -p /sbin/ldconfig
++
  EOF
  
- fi
+ LC_LANG=C cat >> gridsite.spec <<EOF
index bf379c8..f60aadb 100644 (file)
@@ -66,6 +66,7 @@ ifndef MYLDFLAGS
 export MYLDFLAGS=-L.
 endif
 
+-include Makefile.inc
 
 #
 # Build
@@ -469,6 +470,9 @@ install-lib:
                                  $(prefix)/$(libdir)/libgridsite_nossl.so.$(MINOR_VERSION)
 
 install-slashgrid: slashgrid
+       -mkdir -p $(RPM_BUILD_ROOT)/etc/rc.d/init.d
+       -mkdir -p $(prefix)/share/doc/gridsite-$(MINOR_VERSION)
+       -mkdir -p $(prefix)/share/man/man8
        cp -f slashgrid $(prefix)/sbin
        cp -f slashgrid.init $(RPM_BUILD_ROOT)/etc/rc.d/init.d/slashgrid
        cp -f ../doc/slashgrid.8.html $(prefix)/share/doc/gridsite-$(MINOR_VERSION) ; \
@@ -515,6 +519,9 @@ dist:
                  ../dist/gridsite-$(PATCH_VERSION)/interface
        cp -f ../VERSION ../README ../LICENSE ../CHANGES ../INSTALL \
                  ../dist/gridsite-$(PATCH_VERSION)
+       if test -f Makefile.inc; then \
+                cp -f Makefile.inc ../dist/gridsite-$(PATCH_VERSION)/src; \
+       fi
        cp -f Makefile grst*.c htcp.c slashgrid.c slashgrid.init \
                  urlencode.c findproxyfile.c gaclexample.c mod_gridsite*.c \
                  htproxyput.c grst_admin.h mod_ssl-private.h \
@@ -556,7 +563,8 @@ htcp-bin: htcp
 rpm: dist
        export PATCH_VERSION=$(PATCH_VERSION) ; \
         export MINOR_VERSION=$(MINOR_VERSION) ; \
-        ./make-gridsite-spec '$(MAKEFLAGS)'
+        export project=$(project); \
+        ./make-gridsite-spec
        rm -Rf $(MYRPMDIR)/BUILDROOT $(MYRPMDIR)/BUILD
        mkdir -p $(MYRPMDIR)/SOURCES $(MYRPMDIR)/SPECS $(MYRPMDIR)/BUILD \
              $(MYRPMDIR)/SRPMS $(MYRPMDIR)/RPMS/i386 $(MYRPMDIR)/BUILDROOT
index f7821e0..1269378 100755 (executable)
@@ -1,15 +1,5 @@
 #!/bin/sh
 
-if test -f build.sh; then
-       MAKE="`cat build.sh`"
-       eval echo "$MAKE" > buildtest.sh
-       MAKETEST="`cat buildtest.sh`'"
-       rm -f buildtest.sh
-else
-       MAKE="make GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT $1"
-       MAKETEST="make GSOAPDIR=$GSOAPDIR STDSOAP2=$STDSOAP2 $1"
-fi
-
 # test to see if fuse-devel (or fuse.h and libfuse) is installed
 #
 cat <<EOF >fuse-test.c
@@ -17,9 +7,15 @@ cat <<EOF >fuse-test.c
 int main() { struct fuse_context ctx;
 return fuse_main(0, (char **) 0, (struct fuse_operations *) 0); }
 EOF
-$MAKETEST fuse-test
+make fuse-test
 if [ $? = 0 ] ; then have_fuse=1 ; fi
 
+if [ x"$project" = x"glite" ]; then
+       globusdep=',vdt_globus_sdk'
+else
+       globusdep=',globus-gssapi-gsi-devel'
+fi
+
 # test to see if gsoap-devel (or stdsoap2.h and libgsoapssl) is installed
 #
 cat <<EOF >gsoap-test.c
@@ -28,7 +24,7 @@ cat <<EOF >gsoap-test.c
 main() { return; }
 #endif
 EOF
-$MAKETEST gridsite-delegation.cgi
+make gridsite-delegation.cgi
 if [ $? = 0 ] ; then have_gsoap=1 ; fi
 rm -f a.out
 
@@ -58,7 +54,7 @@ URL: http://www.gridsite.org/
 Vendor: GridPP
 Requires: libxml2
 Buildrequires: libxml2-devel,curl-devel,httpd-devel,openssl-devel
-Buildrequires: doxygen${gsoapdep}${fusedep}
+Buildrequires: doxygen${gsoapdep}${fusedep}${globusdep}
 Packager: Andrew McNab <Andrew.McNab@manchester.ac.uk>
 
 %description
@@ -132,20 +128,20 @@ See http://www.gridsite.org/ for details.
 
 %build
 cd src
-$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix}
+make prefix=\$RPM_BUILD_ROOT/%{_prefix}
 
 EOF
 
 if [ $have_fuse ] ; then
 cat <<EOF >>gridsite.spec
-$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix} slashgrid
+make prefix=\$RPM_BUILD_ROOT/%{_prefix} slashgrid
 
 EOF
 fi
 
 if [ $have_gsoap ] ; then
 cat <<EOF >>gridsite.spec
-$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix} gridsite-delegation.cgi htproxyput
+make prefix=\$RPM_BUILD_ROOT/%{_prefix} gridsite-delegation.cgi htproxyput
 
 EOF
 fi
@@ -155,7 +151,7 @@ cat <<EOF >>gridsite.spec
 %install
 cd src
 
-$MAKE install prefix=\$RPM_BUILD_ROOT/%{_prefix} libdir=%{_lib}
+make install prefix=\$RPM_BUILD_ROOT/%{_prefix} libdir=%{_lib}
 EOF
 
 if [ $have_fuse ] ; then
@@ -163,7 +159,7 @@ if [ $have_fuse ] ; then
 cat <<EOF >>gridsite.spec
 
 mkdir -p \$RPM_BUILD_ROOT/etc/rc.d/init.d
-$MAKE install-slashgrid prefix=\$RPM_BUILD_ROOT/%{_prefix}
+make install-slashgrid prefix=\$RPM_BUILD_ROOT/%{_prefix}
 EOF
 fi
 
@@ -171,7 +167,7 @@ if [ $have_gsoap ] ; then
 
 cat <<EOF >>gridsite.spec
 
-$MAKE install-ws prefix=\$RPM_BUILD_ROOT/%{_prefix}
+make install-ws prefix=\$RPM_BUILD_ROOT/%{_prefix}
 EOF
 fi
 
@@ -182,7 +178,7 @@ if [ "\$UID" = "0" ] ; then
  /sbin/ldconfig
 fi
 
-%postun
+%postun shared
 if [ "\$UID" = "0" ] ; then
  /sbin/ldconfig
 fi
@@ -249,7 +245,7 @@ cat <<EOF >>gridsite.spec
 %package slashgrid
 Group: Applications/Internet
 Summary: slashgrid daemon
-Requires: curl >= 7.12.1,fuse,fuse-libs
+Requires: curl >= 7.12.1,fuse
 
 %description slashgrid
 SlashGrid daemon
@@ -314,6 +310,13 @@ See http://www.gridsite.org/ for details.
 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyunixtime.1
 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyrenew.1
 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyinfo.1
+
+EOF
+
+LC_TIME=C cat >> gridsite.spec <<EOF
+%changelog
+* `date '+%a %b %d %Y'` - autobuild@`hostname -f`
+- automatically generated package
 EOF
 
 fi