X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=debian.in%2Frules;h=57b40bd603b57204b42e7e500ba692839dcfe829;hb=7ee25a350f8cb5a22dfcc46f9aba087d8ae23fe1;hp=3eac6fca905b0d28cc08bd616b725141c8925dcd;hpb=173a4fab89b786e9f6cc2474860592336cae5d71;p=cp210x.git diff --git a/debian.in/rules b/debian.in/rules index 3eac6fc..57b40bd 100755 --- a/debian.in/rules +++ b/debian.in/rules @@ -1,5 +1,5 @@ #!/usr/bin/make -f -# debian/rules file - for xxROOTNAMExx-module +# debian/rules file - for cp210x-module-dkms # Based on sample debian/rules file - for GNU Hello (1.3). # Copyright 1994,1995 by Ian Jackson. # Copyright 1998-2007 James Troup @@ -10,9 +10,7 @@ # This file may have to be extensively modified package = xxPACKAGExx -inst_dir = debian/tmp/lib/modules/xxKVERxx/kernel/drivers/usb/serial - -STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note +inst_dir = debian/tmp/usr/src/xxPACKAGExx-xxDEBVERxx install_dir = install -d -m 755 install_file = install -m 644 @@ -22,25 +20,13 @@ install_binary = install -m 755 -s DISTRIBUTION := $(shell lsb_release -is) -# At the current time (20080828) this package has to build from the source -# directory. For now, the solution is quite hackish: copy the source -# directory to the build directory before running configure. -tempdir := $(shell tempfile $(package)) - configure-stamp: - $(checkdir) - rm -rf configure-stamp builddir - rm -f $(tempdir) - cp -a . $(tempdir) - mv -f $(tempdir) builddir - cd builddir && ./configure -kver xxKVERxx touch $@ build: build-stamp build-stamp: configure-stamp $(checkdir) - $(MAKE) -C builddir -f Makefile.go touch $@ @@ -49,16 +35,11 @@ install-stamp: checkroot build-stamp $(checkdir) rm -rf debian/tmp $(install_dir) $(inst_dir) - chmod a+x builddir/installmod - $(MAKE) -C builddir -f Makefile.go \ - INSTALL_PREFIX=$$(pwd)/debian/tmp install - mv $(inst_dir)/cp2101.ko $(inst_dir)/xxROOTNAMExx.ko + mv debian ../ + cp -a . ../$(inst_dir) + mv ../debian . $(install_dir) debian/tmp/etc/modprobe.d echo "blacklist cp2101" > debian/tmp/etc/modprobe.d/$(package) -ifeq ($(with_strip),yes) - find debian/tmp -type f | xargs file | grep "ELF.*executable" | \ - cut -f 1 -d : | xargs $(STRIP) -endif touch $@ @@ -81,8 +62,6 @@ binary-arch: checkroot build install find debian/tmp/usr/share/doc/$(package)/ -type f ! -name copyright | \ xargs gzip -9 : # Finish it all up - find debian/tmp -type f | xargs file | grep ELF | cut -d: -f 1 | \ - xargs dpkg-shlibdeps dpkg-gencontrol -isp $(CONFLICTS) chown -R root:root debian/tmp chmod -R go=rX debian/tmp @@ -94,13 +73,13 @@ binary: binary-indep binary-arch clean: $(checkdir) - -rm -rf debian/tmp builddir + -rm -rf debian/tmp -rm -fr debian/patched debian/files* debian/substvars -rm -f *-stamp define checkdir - test -f Makefile.go -a -f debian/rules + test -f debian/rules endef