File: rules

package info (click to toggle)
module-assistant 0.11.14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 628 kB
  • sloc: perl: 1,350; sh: 372; makefile: 168
file content (28 lines) | stat: -rwxr-xr-x 877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/make -f

#export DH_VERBOSE=1

MODULE		 = someproject
MODSRCPKG	 = $(MODULE)-source

%:
	dh $@

execute_after_dh_install:
# Install the module source.
	dh_installdirs -p$(MODSRCPKG) usr/src/modules/$(MODULE)/debian
	tar c -v --exclude '.git' --exclude '.svn' --exclude 'CVS' --exclude 'debian' . | \
		tar x -C debian/$(MODSRCPKG)/usr/src/modules/$(MODULE)
# Install the debian directory into the module source.
	dh_install -p$(MODSRCPKG) debian/copyright debian/changelog debian/modules/* usr/src/modules/$(MODULE)/debian/
# Pack the module source.
	tar c \
		-C debian/$(MODSRCPKG)/usr/src \
		--numeric-owner --owner=0 --group=0 \
		--mode=a=rX,u+w \
		--sort=name \
		--mtime='@$(SOURCE_DATE_EPOCH)' \
		--clamp-mtime \
		--remove-files \
		modules | xz -T1 -9 > debian/$(MODSRCPKG)/usr/src/$(MODULE).tar.xz
	tar tfv debian/$(MODSRCPKG)/usr/src/$(MODULE).tar.xz