| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
SHELL=/bin/bash |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
export DH_COMPAT=3 |
|---|
| 16 |
|
|---|
| 17 |
KVERS=2.6.9 |
|---|
| 18 |
|
|---|
| 19 |
ifdef KDREV |
|---|
| 20 |
FULLVER := $(shell dpkg-parsechangelog |grep ^Version | cut -f2 -d' ')+$(KDREV) |
|---|
| 21 |
DEBDEP := (= $(KDREV)) |
|---|
| 22 |
else |
|---|
| 23 |
FULLVER := $(shell dpkg-parsechangelog |grep ^Version | cut -f2 -d' ') |
|---|
| 24 |
DEBDEP := |
|---|
| 25 |
endif |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
TARGETDIR=lib/modules/$(KVERS)/kernel/drivers/block |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
ifdef KSRC |
|---|
| 32 |
MOD_DESTDIR := --destdir=$(KSRC)/.. |
|---|
| 33 |
endif |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
TARGETDIR=lib/modules/$(KVERS)/misc |
|---|
| 39 |
KSRC := /usr/src/linux |
|---|
| 40 |
MOD_DESTDIR := --destdir=$(CURDIR)/.. |
|---|
| 41 |
binary: forknoppix |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
gencontrol= sed 's/\ |
|---|
| 47 |
|
|---|
| 48 |
forknoppix: |
|---|
| 49 |
debian/rules clean ; debian/rules binary-indep ; debian/rules binary-arch ; debian/rules clean ; debian/rules kdist_image |
|---|
| 50 |
|
|---|
| 51 |
kdist_clean: clean |
|---|
| 52 |
|
|---|
| 53 |
kdist_configure: |
|---|
| 54 |
dh_testdir |
|---|
| 55 |
cat debian/{control.head,control.mod} | $(gencontrol) |
|---|
| 56 |
cp debian/templates.template debian/cloop-$(KVERS).templates |
|---|
| 57 |
cp debian/cloop.postinst.template debian/cloop-$(KVERS).postinst |
|---|
| 58 |
cp debian/cloop.config.template debian/cloop-$(KVERS).config |
|---|
| 59 |
|
|---|
| 60 |
configure: configure-stamp |
|---|
| 61 |
configure-stamp: |
|---|
| 62 |
dh_testdir |
|---|
| 63 |
cat debian/{control.head,control.utils,control.src} | $(gencontrol) |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
touch configure-stamp |
|---|
| 67 |
|
|---|
| 68 |
build: configure-stamp build-stamp |
|---|
| 69 |
build-stamp: |
|---|
| 70 |
dh_testdir |
|---|
| 71 |
$(MAKE) create_compressed_fs extract_compressed_fs APPSONLY=yes |
|---|
| 72 |
touch build-stamp |
|---|
| 73 |
|
|---|
| 74 |
build-mod: kdist_configure |
|---|
| 75 |
dh_testdir |
|---|
| 76 |
type gcc-2.95 >/dev/null 2>&1 && { CC=gcc-2.95; export CC; }; $(MAKE) cloop.ko KERNEL_DIR=$(KSRC) |
|---|
| 77 |
touch build-stamp |
|---|
| 78 |
|
|---|
| 79 |
clean: |
|---|
| 80 |
dh_testdir |
|---|
| 81 |
dh_testroot |
|---|
| 82 |
rm -f build-stamp configure-stamp |
|---|
| 83 |
-$(MAKE) clean APPSONLY=yes |
|---|
| 84 |
-dh_clean |
|---|
| 85 |
rm -rf debian/cloop-?.?.?* debian/cloop debian/cloop-module debian/*.files |
|---|
| 86 |
|
|---|
| 87 |
install: DH_OPTIONS= |
|---|
| 88 |
install: build |
|---|
| 89 |
dh_testdir |
|---|
| 90 |
dh_testroot |
|---|
| 91 |
dh_clean -k |
|---|
| 92 |
dh_installdirs -p cloop-utils usr/bin |
|---|
| 93 |
install -m 755 create_compressed_fs $(CURDIR)/debian/cloop-utils/usr/bin/ |
|---|
| 94 |
install -m 755 extract_compressed_fs $(CURDIR)/debian/cloop-utils/usr/bin/ |
|---|
| 95 |
dh_installman $(CURDIR)/debian/create_compressed_fs.1 |
|---|
| 96 |
cd debian/cloop-utils/usr/share/man/man1 && ln -s create_compressed_fs.1.gz extract_compressed_fs.1.gz |
|---|
| 97 |
|
|---|
| 98 |
install-mod: build-mod |
|---|
| 99 |
dh_testdir |
|---|
| 100 |
dh_testroot |
|---|
| 101 |
dh_clean -k |
|---|
| 102 |
dh_installdirs -p cloop-module-$(KVERS) $(TARGETDIR) |
|---|
| 103 |
install -m 644 cloop.ko $(CURDIR)/debian/cloop-module-$(KVERS)/$(TARGETDIR) |
|---|
| 104 |
rm cloop.ko compressed_loop.o |
|---|
| 105 |
|
|---|
| 106 |
install-src: configure-stamp |
|---|
| 107 |
dh_testdir |
|---|
| 108 |
dh_testroot |
|---|
| 109 |
dh_clean -k |
|---|
| 110 |
dh_installdirs -p cloop-src usr/src/modules/cloop |
|---|
| 111 |
echo $$UID |
|---|
| 112 |
tar -cf - {Makefile,*.[ch],debian/{control*,copyright,rules,dirs,postrm,README.Debian,templates.template,cloop.postinst.template,cloop.config.template,changelog,genchanges.sh},CHANGELOG,README} | tar -x -C debian/cloop-src/usr/src/modules/cloop |
|---|
| 113 |
dh_fixperms -i |
|---|
| 114 |
cd debian/cloop-src/usr/src ; tar -cf - modules | gzip -9 > cloop.tar.gz ; rm -rf modules |
|---|
| 115 |
|
|---|
| 116 |
binary-arch: build install build-deb |
|---|
| 117 |
|
|---|
| 118 |
binary-indep: install-src build-indep |
|---|
| 119 |
|
|---|
| 120 |
kdist_targets: clean build-mod install-mod build-deb |
|---|
| 121 |
|
|---|
| 122 |
kdist_image: kdist_targets clean |
|---|
| 123 |
|
|---|
| 124 |
kdist: kdist_targets |
|---|
| 125 |
|
|---|
| 126 |
KVERS="$(KVERS)" KSRC="$(KSRC)" KMAINT="$(KMAINT)" \ |
|---|
| 127 |
REV="$(KDREV)" KEMAIL="$(KEMAIL)" sh -v debian/genchanges.sh |
|---|
| 128 |
|
|---|
| 129 |
debian/rules clean |
|---|
| 130 |
|
|---|
| 131 |
build-deb: |
|---|
| 132 |
dh_testdir -a |
|---|
| 133 |
dh_testroot -a |
|---|
| 134 |
dh_installdebconf -a |
|---|
| 135 |
dh_installdocs -a README debian/README.Debian |
|---|
| 136 |
dh_installexamples -a |
|---|
| 137 |
dh_installmenu -a |
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
dh_installcron -a |
|---|
| 144 |
|
|---|
| 145 |
dh_installinfo -a |
|---|
| 146 |
dh_installchangelogs CHANGELOG -a |
|---|
| 147 |
dh_strip -a |
|---|
| 148 |
dh_link -a |
|---|
| 149 |
dh_compress -a |
|---|
| 150 |
dh_fixperms -a |
|---|
| 151 |
|
|---|
| 152 |
dh_installdeb -a |
|---|
| 153 |
dh_shlibdeps -a |
|---|
| 154 |
dh_gencontrol -a -- -v$(FULLVER) |
|---|
| 155 |
dh_md5sums -a |
|---|
| 156 |
dh_builddeb -a $(MOD_DESTDIR) |
|---|
| 157 |
|
|---|
| 158 |
build-indep: configure-stamp install-src |
|---|
| 159 |
dh_testdir -i |
|---|
| 160 |
dh_testroot -i |
|---|
| 161 |
|
|---|
| 162 |
dh_installdocs -i README debian/README.Debian |
|---|
| 163 |
dh_installexamples -i |
|---|
| 164 |
dh_installmenu -i |
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
dh_installcron -i |
|---|
| 171 |
|
|---|
| 172 |
dh_installinfo -i |
|---|
| 173 |
dh_installchangelogs CHANGELOG -i |
|---|
| 174 |
dh_strip -i |
|---|
| 175 |
dh_link -i |
|---|
| 176 |
dh_compress -i |
|---|
| 177 |
dh_fixperms -i |
|---|
| 178 |
|
|---|
| 179 |
dh_installdeb -i |
|---|
| 180 |
dh_shlibdeps -i |
|---|
| 181 |
dh_gencontrol -i |
|---|
| 182 |
dh_md5sums -i |
|---|
| 183 |
dh_builddeb -i |
|---|
| 184 |
|
|---|
| 185 |
.PHONY: build clean binary-indep binary-arch binary kdist kdist_image kdist_configure kdist_clean kdist |
|---|