]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Update to build modules--untested
authorSam Hartman <hartmans@debian.org>
Mon, 6 Nov 2000 13:47:00 +0000 (13:47 +0000)
committerSam Hartman <hartmans@debian.org>
Mon, 6 Nov 2000 13:47:00 +0000 (13:47 +0000)
debian/changelog
debian/rules

index 463b4195406847a61beda9b247ec0c6707f5edfe..bfd66823f351f04ad325a67fa3e44170b5dd1ee9 100644 (file)
@@ -1,3 +1,11 @@
+openafs (1.0.snap20001104-1) unstable; urgency=low
+
+  * New upstream snapshot
+  * Fix path to afsd in /etc/init.d/openafs-client
+  * Build openafs module packages
+
+ --
+
 openafs (1.0.snap20001103-1) unstable; urgency=low
 
   * Initial Release.
index 45e30399e7ddec4a4ee2bd59f83e67490326b54d..ae49c24168b9682aba9b2ea063067c38d47c9cdb 100755 (executable)
@@ -17,6 +17,19 @@ export DH_OPTIONS
 
 # The AFS sysname is determined by a script
 SYS_NAME=$(shell debian/sysname)
+package=openafs
+srcpkg = openafs-module-source
+modulepkg=openafs-module-$(KVERS)
+ifndef KSRC
+KSRC=/usr/src/linux
+endif
+MODDIR=..
+KVERS=`awk '{ if (NR==1) v=$$3; else if (NR==2) p=$$3; else if (NR==3) s=$$3; \
+       else if (NR==4) { e=$$3; exit; } } \
+       END { printf("%s.%s.%s%s\n",v,p,s,e); }' $(KSRC)/Makefile`
+
+
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -131,3 +144,95 @@ binary-arch: build install
 
 binary:  binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
+
+############################Module package support
+kdist_image:  build
+       $(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. binary-modules
+       $(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
+
+kdist:  build
+       $(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. KERNEL_DEPENDS=y binary-modules
+       KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
+               sh -v debian/genchanges.sh
+       $(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
+
+
+
+dist_config: configure
+
+dist_clean: clean
+
+############################ source stuff #################################
+binary-source:
+# Perform some tests
+       test -f debian/rules
+       test `id -u` = "0"
+
+
+# Setup everything first
+       -rm -rf debian/$(srcpkg) debian/substvars
+       install -d debian/$(srcpkg)
+# Clean up the sources 
+       install -d debian/$(srcpkg)/usr/src/modules/$(package)
+       find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS \) -prune -o -print | \
+               cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
+       ( cd debian/$(srcpkg)/usr/src/modules/$(package); \
+               $(MAKE) -f debian/rules clean)
+       chown -R root.root debian/$(srcpkg)
+       find debian/$(srcpkg) -type d | xargs chmod 755
+       find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
+       find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
+       cd debian/$(srcpkg)/usr/src && \
+         tar cf $(package).tar modules && \
+         $(RM) -r modules/$(package)
+       gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
+       chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
+############################ modules stuff #################################
+
+build-modules: build-modules-stamp
+
+build-modules-stamp: configure
+       $(MAKE) SYS_NAME=$(SYS_NAME) lwp 
+       $(MAKE) SYS_NAME=$(SYS_NAME) libafs
+       touch build-modules-stamp
+
+binary-modules: build-modules
+# Perform some tests
+       test -f debian/rules
+       test `id -u` = "0"
+
+# Setup everything first
+       -rm -rf debian/$(modulepkg) debian/substvars
+       install -d debian/$(modulepkg)
+
+# Install the software
+       install -d -g root -o root -m 755 debian/$(modulepkg)/lib/modules/$(KVERS)/fs
+       install -g root -o root -m 755  dest/root.client/usr/vice/etc/modload/*.o \
+               debian/$(modulepkg)/lib/modules/$(KVERS)/fs
+# Fix some stuff up
+       install -d -o root -g root -m 755 debian/$(modulepkg)/usr/share/doc
+       rm -rf debian/$(modulepkg)/usr/include
+ifeq ($(KERNEL_DEPENDS),y)
+       sh debian/prep-modules $(KSRC) debian/control.module > debian/control
+else
+       sh debian/prep-modules $(KSRC) debian/control.module-image > debian/control
+endif
+
+# Install control files
+       install -d -o root -g root -m 755 debian/$(modulepkg)/DEBIAN
+       install -p -o root -g root -m 755 debian/prerm.mod \
+               debian/$(modulepkg)/DEBIAN/prerm
+       install -p -o root -g root -m 755 debian/postinst.mod \
+               debian/$(modulepkg)/DEBIAN/postinst
+
+# And now.. for the final packaging!
+       find debian/$(modulepkg) -type f | grep -v "./DEBIAN" | xargs md5sum | \
+               sed -e 's#debian/$(modulepkg)/##' > debian/$(modulepkg)/DEBIAN/md5sums
+
+       dpkg-gencontrol -isp \
+               -p`\ls -1 debian/$(modulepkg)/usr/share/doc` \
+               -v`cat debian/VERSION` \
+               -Pdebian/$(modulepkg)
+       chown -R root.root debian/$(modulepkg)
+       chmod -R go=rX debian/$(modulepkg)
+       dpkg --build debian/$(modulepkg) $(MODDIR)