0 | 0 |
#!/usr/bin/make -f
|
1 | |
# Sample debian/rules that uses debhelper.
|
2 | |
# GNU copyright 1997 by Joey Hess.
|
3 | |
#
|
4 | |
# This version is for a hypothetical package that builds an
|
5 | |
# architecture-dependant package, as well as an architecture-independent
|
6 | |
# package.
|
7 | |
|
8 | |
# Uncomment this to turn on verbose mode.
|
9 | 1 |
#export DH_VERBOSE=1
|
10 | 2 |
|
11 | 3 |
CFLAGS=-DLANG_EN -O2 -Wall
|
12 | |
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
13 | |
CFLAGS += -g
|
14 | |
endif
|
15 | |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
16 | |
INSTALL_PROGRAM += -s
|
17 | |
endif
|
18 | 4 |
|
19 | |
configure: configure-stamp
|
20 | |
configure-stamp:
|
21 | |
dh_testdir
|
22 | |
touch configure-stamp
|
|
5 |
%:
|
|
6 |
dh $@ --parallel --builddirectory=build/
|
23 | 7 |
|
24 | |
build-arch: configure-stamp build-arch-stamp
|
25 | |
build-arch-stamp:
|
26 | |
dh_testdir
|
|
8 |
override_dh_auto_install:
|
|
9 |
dh_auto_install --builddirectory=build/
|
|
10 |
# Move the configuration file from /etc to /usr/share
|
|
11 |
mv debian/pnm2ppa/etc/pnm2ppa.conf debian/pnm2ppa/usr/share/pnm2ppa/
|
27 | 12 |
|
28 | |
# Add here command to compile/build the package.
|
29 | |
cd $(BUILD_TREE) && $(MAKE)
|
|
13 |
override_dh_installdocs:
|
|
14 |
dh_installdocs
|
|
15 |
# Remove useless or redundant files
|
|
16 |
cd debian/pnm2ppa/usr/share/doc/pnm2ppa/;\
|
|
17 |
rm en/CREDITS;\
|
|
18 |
rm en/INSTALL.BEOS;\
|
|
19 |
rm en/INSTALL.CALDERA;\
|
|
20 |
rm en/INSTALL.MANDRAKE*;\
|
|
21 |
rm en/INSTALL.REDHAT*;\
|
|
22 |
rm en/INSTALL.SOLARIS;\
|
|
23 |
rm en/INSTALL.SUSE;\
|
|
24 |
rm en/INSTALL;\
|
|
25 |
rm en/LICENSE;\
|
|
26 |
rm en/README;\
|
|
27 |
rm en/RELEASE-NOTES;\
|
|
28 |
rm en/TODO;\
|
|
29 |
rm en/pnm2ppa.1;\
|
|
30 |
rm pl/INSTALACJA;\
|
|
31 |
rm pl/INSTALACJA.SUSE
|
30 | 32 |
|
31 | |
touch build-arch-stamp
|
32 | |
|
33 | |
build: build-arch
|
34 | |
|
35 | |
clean:
|
36 | |
dh_testdir
|
37 | |
dh_testroot
|
38 | |
-rm -f build-arch-stamp configure-stamp
|
39 | |
|
40 | |
# clean up generated control files
|
41 | |
-rm -f debian/pnm2ppa.install debian/pnm2ppa.examples
|
42 | |
|
43 | |
dh_clean
|
44 | |
|
45 | |
install: DH_OPTIONS=
|
46 | |
install: build
|
47 | |
dh_testdir
|
48 | |
dh_testroot
|
49 | |
dh_clean -k
|
50 | |
|
51 | |
# Add here commands to install the package into debian/pnm2ppa.
|
52 | |
cd $(BUILD_TREE) && \
|
53 | |
$(MAKE) -e install \
|
54 | |
BINDIR=$(CURDIR)/debian/tmp/usr/bin \
|
55 | |
CONFDIR=$(CURDIR)/debian/tmp/etc \
|
56 | |
MANDIR=$(CURDIR)/debian/tmp/usr/share/man/man1
|
57 | |
|
58 | |
# Build architecture-dependent files here.
|
59 | |
binary-arch: build install
|
60 | |
dh_testdir -a
|
61 | |
dh_testroot -a
|
62 | |
dh_installdebconf -a
|
63 | |
dh_installdirs -a
|
64 | |
dh_install -a
|
65 | |
dh_installdocs -a
|
66 | |
dh_installexamples -a
|
67 | |
dh_installman -a
|
68 | |
dh_installchangelogs -a
|
69 | |
dh_strip -a
|
70 | |
dh_link -a
|
71 | |
dh_compress -a
|
72 | |
dh_fixperms -a -Xupdate-magicfilter
|
73 | |
dh_installdeb -a
|
74 | |
dh_shlibdeps -a
|
75 | |
dh_gencontrol -a
|
76 | |
dh_md5sums -a
|
77 | |
dh_builddeb -a
|
78 | |
|
79 | |
binary: binary-arch
|
80 | |
.PHONY: build clean binary-arch binary install configure
|