From 7ee25a350f8cb5a22dfcc46f9aba087d8ae23fe1 Mon Sep 17 00:00:00 2001 From: smckown Date: Wed, 25 Nov 2009 20:10:51 +0000 Subject: [PATCH] Top level make is now working, and dpkg-buildpackage works on the result. --- Makefile | 5 +++-- Makefile.dkms | 13 ++++++------- debian.in/rules | 6 +++--- dkms.conf | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 5ffcc6c..ac84c4a 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,12 @@ $(DEBFILE): $(BUILD)/debian-stamp cd $(BUILD)/$(DEBSRC) && dpkg-buildpackage -sa -us -uc -$(BUILD)/src-stamp: $(wildcard src/*) dkms.conf +$(BUILD)/src-stamp: Makefile.dkms dkms.conf $(wildcard src/*) mkdir -p $(BUILD) rm -rf $(BUILD)/$(DEBSRC) cp -a src $(BUILD)/$(DEBSRC) - cp -a dkms.conf $(BUILD)/$(DEBSRC) + cp Makefile.dkms $(BUILD)/$(DEBSRC) + cp dkms.conf $(BUILD)/$(DEBSRC) perl -i -pe 's/xxDEBVERxx/$(DEBVER)/g' $(BUILD)/$(DEBSRC)/dkms.conf find $(BUILD)/$(DEBSRC) -name .svn -type d -exec rm -rf "{}" ";" 2>/dev/null || exit 0 rm -rf $(BUILD)/$(DEBSRC)/.git || exit 0 diff --git a/Makefile.dkms b/Makefile.dkms index 6488d65..c84885b 100755 --- a/Makefile.dkms +++ b/Makefile.dkms @@ -3,16 +3,15 @@ STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note all: - -rm -rf builddir - cp -a src builddir - cd builddir && ./configure -kver $(KVER) - test -f builddir/Makefile.go - $(MAKE) -C builddir -f Makefile.go - cp builddir/cp2101.ko cp210x.ko + ./configure -kver $(KVER) + test -f Makefile.config + $(MAKE) -f Makefile.go + cp cp2101.ko cp210x.ko $(STRIP) cp210x.ko clean: - -rm -rf builddir cp210x.ko + test -f Makefile.config && $(MAKE) -f Makefile.go distclean || exit 0 + -rm -rf cp210x.ko .PHONY: all clean diff --git a/debian.in/rules b/debian.in/rules index e8b27ae..57b40bd 100755 --- a/debian.in/rules +++ b/debian.in/rules @@ -35,7 +35,9 @@ install-stamp: checkroot build-stamp $(checkdir) rm -rf debian/tmp $(install_dir) $(inst_dir) - cp -a . $(inst_dir) + mv debian ../ + cp -a . ../$(inst_dir) + mv ../debian . $(install_dir) debian/tmp/etc/modprobe.d echo "blacklist cp2101" > debian/tmp/etc/modprobe.d/$(package) touch $@ @@ -60,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 diff --git a/dkms.conf b/dkms.conf index 0daa7c6..e1c3c43 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,7 +1,7 @@ PACKAGE_VERSION="xxDEBVERxx" PACKAGE_NAME="cp210x-module-dkms" -CLEAN="make clean" +CLEAN="make -f Makefile.dkms clean" BUILT_MODULE_NAME[0]=cp210x DEST_MODULE_LOCATION[0]="/kernel/drivers/usb/serial/" -MAKE[0]="make all KVER=$kernelver" +MAKE[0]="make -f Makefile.dkms all KVER=$kernelver" AUTOINSTALL="yes" -- 2.39.2