| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
PKG = cowloop |
|---|
| 4 |
PKG_VERS = 2.11 |
|---|
| 5 |
SRC_NAME = cowloop-source |
|---|
| 6 |
MOD_NAME = cowloop-module |
|---|
| 7 |
|
|---|
| 8 |
KVERS ?= ${uname -r} |
|---|
| 9 |
ARCH ?= ${dpkg --print-architecture} |
|---|
| 10 |
|
|---|
| 11 |
COWLOOP_BIN = cowlist cowrepair cowsync cowdev |
|---|
| 12 |
|
|---|
| 13 |
gencontrol= sed 's/\ |
|---|
| 14 |
|
|---|
| 15 |
configure: configure-stamp |
|---|
| 16 |
configure-stamp: |
|---|
| 17 |
dh_testdir |
|---|
| 18 |
cat debian/{control.head,control.src,control.utils} | $(gencontrol) |
|---|
| 19 |
touch configure-stamp |
|---|
| 20 |
|
|---|
| 21 |
build: build-stamp |
|---|
| 22 |
|
|---|
| 23 |
build-stamp: configure-stamp |
|---|
| 24 |
dh_testdir |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
touch build-stamp |
|---|
| 31 |
|
|---|
| 32 |
clean: |
|---|
| 33 |
dh_testroot |
|---|
| 34 |
rm -f build-stamp configure-stamp |
|---|
| 35 |
rm -rf debian/cowloop-source |
|---|
| 36 |
rm -rf debian/cowloop-utils |
|---|
| 37 |
|
|---|
| 38 |
dh_clean |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$(MAKE) clean |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
install: |
|---|
| 45 |
dh_testdir |
|---|
| 46 |
dh_testroot |
|---|
| 47 |
dh_clean -k |
|---|
| 48 |
dh_installdirs |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
tar -c --exclude ".svn" --exclude "CVS" --exclude "debian" --exclude "cowcopy" --exclude "cowrepair" --exclude "cowsync" --exclude "cowlist" * | tar x -C debian/tmp/usr/src/modules/cowloop |
|---|
| 55 |
cd debian; cp rules changelog copyright control* tmp/usr/src/modules/cowloop/debian |
|---|
| 56 |
cd debian; cp cowloop-source.README.Debian tmp/usr/src/modules/cowloop/debian/README.Debian |
|---|
| 57 |
cd debian/tmp/usr/src/ && tar c modules | bzip2 -9 > cowloop.tar.bz2 && rm -rf modules |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
$(MAKE) $(COWLOOP_BIN) |
|---|
| 61 |
|
|---|
| 62 |
dh_installdocs |
|---|
| 63 |
dh_install |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
binary-indep: install |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
binary-arch: build install |
|---|
| 71 |
dh_testdir |
|---|
| 72 |
dh_testroot |
|---|
| 73 |
dh_installdocs |
|---|
| 74 |
dh_installexamples |
|---|
| 75 |
dh_installman -p cowloop-utils |
|---|
| 76 |
dh_link |
|---|
| 77 |
dh_strip |
|---|
| 78 |
dh_compress |
|---|
| 79 |
dh_fixperms |
|---|
| 80 |
dh_installdeb |
|---|
| 81 |
dh_gencontrol |
|---|
| 82 |
dh_md5sums |
|---|
| 83 |
dh_builddeb |
|---|
| 84 |
|
|---|
| 85 |
binary: binary-indep binary-arch |
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
PACKAGE=cowloop-module |
|---|
| 89 |
|
|---|
| 90 |
MA_DIR ?= /usr/share/modass |
|---|
| 91 |
|
|---|
| 92 |
-include $(MA_DIR)/include/generic.make |
|---|
| 93 |
|
|---|
| 94 |
-include $(MA_DIR)/include/common-rules.make |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
DVERS=1 |
|---|
| 98 |
|
|---|
| 99 |
kdist_clean: clean |
|---|
| 100 |
kdist_config: kdist_configure |
|---|
| 101 |
kdist_configure: prep-deb-files |
|---|
| 102 |
cat debian/{control.head,control.mod} | $(gencontrol) |
|---|
| 103 |
|
|---|
| 104 |
binary-modules: kdist_config |
|---|
| 105 |
dh_clean -k |
|---|
| 106 |
dh_installdirs lib/modules/$(KVERS)/misc |
|---|
| 107 |
$(MAKE) KERNDIR=$(KSRC) cowloop.ko |
|---|
| 108 |
cp cowloop.ko debian/tmp/lib/modules/$(KVERS)/misc/ |
|---|
| 109 |
dh_compress -a |
|---|
| 110 |
dh_fixperms -a |
|---|
| 111 |
dh_installdeb -a |
|---|
| 112 |
dh_gencontrol -a -- -v$(VERSION) |
|---|
| 113 |
dh_md5sums |
|---|
| 114 |
dh_builddeb -a --destdir=$(DEB_DESTDIR) |
|---|
| 115 |
|
|---|
| 116 |
.PHONY: build clean binary-indep binary-arch binary kdist kdist_image kdist_configure kdist_clean kdist |
|---|