File: rules

package info (click to toggle)
kernel-patch-kdb 0.6-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 308 kB
  • ctags: 12
  • sloc: makefile: 60; sh: 55
file content (80 lines) | stat: -rwxr-xr-x 1,750 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /usr/bin/make -f

PATCH=kdb
KVERSION=2.2.13

PACKAGE=kernel-patch-${KVERSION}-${PATCH}
VERSION=0.6

patchname=kdb-v${VERSION}-${KVERSION}

####################

arch=$(shell dpkg --print-architecture)

topdir=$(shell pwd)
destdir=${topdir}/debian/tmp
mandir=${destdir}/usr/share/man
docdir=${destdir}/usr/share/doc/${PACKAGE}
man1dir=${mandir}/man1
patchdir=${destdir}/usr/src/kernel-patches

build: build-stamp
build-stamp:
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean

binary-indep:	build

binary-arch:	build
	dh_testdir
	dh_testroot
	dh_clean -k

	dh_installdirs
	install -m755 -d ${patchdir}/$(arch)/apply
	install -m755 -d ${patchdir}/$(arch)/unpatch
	install -m755 -d ${patchdir}/$(arch)/${PATCH}
	gzip -9c ${topdir}/${patchname} >${patchdir}/$(arch)/${PATCH}/${patchname}.gz
	install -m755 debian/${PATCH}.apply ${patchdir}/$(arch)/apply/${PATCH}
	install -m755 debian/${PATCH}.unpatch ${patchdir}/$(arch)/unpatch/${PATCH}

	install -m755 -d ${man1dir}
	cd doc && for i in bp bt env ll md rd ss; do \
		install -m644 kdb_$${i}.man ${man1dir}/kdb_$${i}.1 ;\
	done

	for i in bpa bd bc be bl; do \
		ln -s kdb_bp.1 ${man1dir}/kdb_$${i}.1 ;\
	done
	ln -s kdb_bt.1 ${man1dir}/kdb_btp.1
	ln -s kdb_env.1 ${man1dir}/kdb_set.1
	for i in mds mm; do \
		ln -s kdb_md.1 ${man1dir}/kdb_$${i}.1 ;\
	done
	ln -s kdb_rd.1 ${man1dir}/kdb_rm.1
	ln -s kdb_ss.1 ${man1dir}/kdb_ssb.1

	dh_installdocs
	groff -mm -t -Tascii doc/kdb.mm >${docdir}/kdb.txt
	groff -mm -t -Tps doc/kdb.mm >${docdir}/kdb.ps

	dh_installchangelogs

	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch binary-indep

.PHONY: binary binary-arch binary-indep clean checkroot