Debian Codegraph @

templates/debian/rules

raw
1 #!/usr/bin/make -f
2
3 #export DH_VERBOSE=1
4
5 MODULE = someproject
6 MODSRCPKG = $(MODULE)-source
7
8 %:
9 dh $@
10
11 execute_after_dh_install:
12 # Install the module source.
13 dh_installdirs -p$(MODSRCPKG) usr/src/modules/$(MODULE)/debian
14 tar c -v --exclude '.git' --exclude '.svn' --exclude 'CVS' --exclude 'debian' . | \
15 tar x -C debian/$(MODSRCPKG)/usr/src/modules/$(MODULE)
16 # Install the debian directory into the module source.
17 dh_install -p$(MODSRCPKG) debian/copyright debian/changelog debian/modules/* usr/src/modules/$(MODULE)/debian/
18 # Pack the module source.
19 tar c \
20 -C debian/$(MODSRCPKG)/usr/src \
21 --numeric-owner --owner=0 --group=0 \
22 --mode=a=rX,u+w \
23 --sort=name \
24 --mtime='@$(SOURCE_DATE_EPOCH)' \
25 --clamp-mtime \
26 --remove-files \
27 modules | xz -T1 -9 > debian/$(MODSRCPKG)/usr/src/$(MODULE).tar.xz
28 tar tfv debian/$(MODSRCPKG)/usr/src/$(MODULE).tar.xz