1 .PHONY: deb-checkdir deb-checkuid
4 @test -e debian/control || sh -cx '! : wrong directory'
6 @test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
8 %.deb: %.deb-share %.deb-DEBIAN
14 %.deb-checkdir: %.install
15 @test -d debian/$* || sh -cx '! : directory debian/$* missing'
16 @test "`id -u`" -eq 0 || sh -cx '! : need root privileges'
18 %.deb-docs-base: %.install
20 @rm -f debian/$*/usr/share/doc/$*/* || :
21 @install -d -m0755 debian/$*/usr/share/doc/$*
22 : debian/$*/usr/share/doc/$*/
23 @sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/'
24 @sh -cx 'install -m0644 debian/changelog \
25 debian/$*/usr/share/doc/$*/changelog.Debian'
26 @test ! -r changelog || \
27 sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/'
28 @test ! -r debian/changelog.upstream || \
29 sh -cx "install -m0644 debian/changelog.upstream \
30 debian/$*/usr/share/doc/$*/changelog"
31 @test -r debian/$*/usr/share/doc/$*/changelog || \
32 sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \
33 debian/$*/usr/share/doc/$*/changelog'
34 @test -s debian/$*/usr/share/doc/$*/changelog || \
35 sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog'
36 @gzip -9 debian/$*/usr/share/doc/$*/changelog*
37 %.deb-docs-docs: %.deb-docs-base
38 @for i in `cat debian/$*.docs 2>/dev/null || :`; do \
39 if test -d $$i; then \
40 sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \
42 sh -cx "install -m0644 $$j \
43 debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \
47 sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \
49 @for i in `ls -d debian/$*.README.* 2>/dev/null || :`; do \
50 sh -cx "install -m0644 $$i \
51 debian/$*/usr/share/doc/$*/$${i#debian/$*.}" || exit 1; \
53 @if test -r debian/$*.NEWS.Debian; then \
54 sh -cx 'install -m0644 debian/$*.NEWS.Debian \
55 debian/$*/usr/share/doc/$*/NEWS.Debian && \
56 gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \
58 %.deb-docs-examples: %.deb-docs-docs
59 @rm -rf debian/$*/usr/share/doc/$*/examples
60 : debian/$*/usr/share/doc/$*/examples/
61 @test ! -r debian/$*.examples || \
62 install -d -m0755 debian/$*/usr/share/doc/$*/examples
63 @for i in `cat debian/$*.examples 2>/dev/null || :`; do \
64 sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \
67 %.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples
68 : debian/$*/usr/share/doc/$*/ ok
70 %.deb-lintian: %.deb-checkdir
71 : debian/$*/usr/share/lintian/overrides
72 @test ! -r debian/$*.lintian-overrides || \
73 install -d -m0755 debian/$*/usr/share/lintian/overrides
74 @test ! -r debian/$*.lintian-overrides || \
75 sh -cx "install -m0644 debian/$*.lintian-overrides \
76 debian/$*/usr/share/lintian/overrides/$*"
77 %.deb-doc-base: %.deb-checkdir
78 : debian/$*/usr/share/doc-base
79 @! ls -d debian/$*.doc-base.* || \
80 install -d -m0755 debian/$*/usr/share/doc-base
81 @for i in `ls -d debian/$*.doc-base.* 2>/dev/null || :`; do \
82 sh -cx "install -m0644 $$i \
83 debian/$*/usr/share/doc-base/$${i#debian/$*.doc-base.}" || exit 1; \
85 %.deb-share: %.deb-docs %.deb-lintian %.deb-doc-base
86 : debian/$*/usr/share/doc,doc-base,lintian ok
88 %.deb-DEBIAN-base: %.install
89 @rm -rf debian/$*/DEBIAN
91 @install -d -m0755 debian/$*/DEBIAN
92 @for i in conffiles shlibs templates; do \
93 test ! -r debian/$*.$$i || \
94 sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \
97 %.deb-DEBIAN-scripts: %.deb-DEBIAN-base
98 @for i in preinst prerm postinst postrm config; do \
99 test ! -r debian/$*.$$i || \
100 sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \
103 %.deb-DEBIAN-md5sums: %.deb-DEBIAN-base %.deb-share
104 : debian/$*/DEBIAN/md5sums
105 @rm -f debian/$*/DEBIAN/md5sums
106 @cd debian/$* && find * -path 'DEBIAN' -prune -o \
107 -type f -exec md5sum {} >>DEBIAN/md5sums \;
108 @chmod 0644 debian/$*/DEBIAN/md5sums
109 @test -s debian/$*/DEBIAN/md5sums || \
110 rm -f debian/$*/DEBIAN/md5sums
111 %.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \
113 : debian/$*/DEBIAN/ ok