4 # Part of Debian ‘dput’ package.
6 # Copyright © 2015 Ben Finney <ben+debian@benfinney.id.au>
8 # This is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of that License, or
11 # (at your option) any later version.
13 # No warranty expressed or implied. See the file ‘COPYING’ for details.
18 app_library_path
:= usr
/share
/${PACKAGE}
20 manpage_path
:= usr
/share
/man
21 bash_completion_path
:= etc
/bash_completion.d
22 package_doc_path
:= usr
/share
/doc
/${PACKAGE}
24 GZIP_OPTS
:= --best
--no-name
26 build
: build-arch build-indep
27 build-arch
: build-stamp
28 build-indep
: build-stamp
30 test -e debian
/control
34 test -e debian
/control
35 test 0 = "`id -u`" ||
(echo need root privileges
; exit
1)
36 rm -f build-stamp install-stamp
37 rm -rf debian
/substvars debian
/files
$(TMPDIR
)
38 rm -rf
*.pyc
*~ debian
/*~
40 # Build architecture-independent files here.
41 binary-indep
: build debian
/control
42 test -e debian
/control
43 test 0 = "`id -u`" ||
(echo need root privileges
; exit
1)
44 rm -rf debian
/substvars
$(TMPDIR
)
45 install -d
--mode
=0755 $(TMPDIR
)
46 install -d
--mode
=0755 $(TMPDIR
)/DEBIAN
47 install -d
--mode
=0755 $(TMPDIR
)/${bin_path}
48 install -d
--mode
=0755 $(TMPDIR
)/etc
49 install -d
--mode
=0755 $(TMPDIR
)/${bash_completion_path}
50 install -d
--mode
=0755 $(TMPDIR
)/${package_doc_path}
51 install -d
--mode
=0755 $(TMPDIR
)/${manpage_path}/man1
52 install -d
--mode
=0755 $(TMPDIR
)/${manpage_path}/man5
53 install -d
--mode
=0755 $(TMPDIR
)/${app_library_path}
54 install -d
--mode
=0755 $(TMPDIR
)/${app_library_path}/methods
55 install -d
--mode
=0755 $(TMPDIR
)/${app_library_path}/helper
56 install --mode
=0644 dput
/__init__.py
$(TMPDIR
)/${app_library_path}
57 install --mode
=0644 dput
/methods
/*.py
$(TMPDIR
)/${app_library_path}/methods
58 install --mode
=0644 dput
/helper
/*.py
$(TMPDIR
)/${app_library_path}/helper
59 install --mode
=0755 dput
/helper
/security-warning
$(TMPDIR
)/${app_library_path}/helper
60 install --mode
=0755 dput
/dput.py
$(TMPDIR
)/${app_library_path}
61 ln
--symbolic ..
/..
/${app_library_path}/dput.py
$(TMPDIR
)/${bin_path}/dput
62 install --mode
=0755 dput
/dcut.py
$(TMPDIR
)/${app_library_path}
63 ln
--symbolic ..
/..
/${app_library_path}/dcut.py
$(TMPDIR
)/${bin_path}/dcut
64 install --mode
=0644 dput.cf
$(TMPDIR
)/etc
65 install --mode
=0644 dput
.1 $(TMPDIR
)/${manpage_path}/man1
66 install --mode
=0644 dcut
.1 $(TMPDIR
)/${manpage_path}/man1
67 install --mode
=0644 dput.cf
.5 $(TMPDIR
)/${manpage_path}/man5
68 install --mode
=0644 README
$(TMPDIR
)/${package_doc_path}
69 install --mode
=0644 FAQ
$(TMPDIR
)/${package_doc_path}
70 install --mode
=0644 copyright
$(TMPDIR
)/${package_doc_path}
71 install --mode
=0644 TODO
$(TMPDIR
)/${package_doc_path}
72 install --mode
=0644 THANKS
$(TMPDIR
)/${package_doc_path}
73 install --mode
=0644 debian
/changelog
$(TMPDIR
)/${package_doc_path}
74 install --mode
=0644 bash_completion
$(TMPDIR
)/${bash_completion_path}/${PACKAGE}
75 gzip
${GZIP_OPTS} $(TMPDIR
)/${manpage_path}/man1
/*
76 gzip
${GZIP_OPTS} $(TMPDIR
)/${manpage_path}/man5
/*
77 gzip
${GZIP_OPTS} $(TMPDIR
)/${package_doc_path}/changelog
78 cd
$(TMPDIR
); find
-type f \
! -regex
'.*/DEBIAN/.*' -printf
'%P\0' | xargs
-r0 md5sum
> DEBIAN
/md5sums
79 install --mode
=0644 debian
/conffiles
$(TMPDIR
)/DEBIAN
80 install --mode
=0755 debian
/prerm
$(TMPDIR
)/DEBIAN
81 install --mode
=0755 debian
/postinst
$(TMPDIR
)/DEBIAN
83 dpkg
--build
$(TMPDIR
) ..
85 # Build architecture-dependent files here.
89 @echo
>&2 'source and diff are obsolete - use dpkg-source -b'; false
91 binary
: binary-indep binary-arch
92 .PHONY
: build
clean binary-indep binary-arch binary
99 # vim: fileencoding=utf-8 filetype=make :