1 |
schoenebeck |
186 |
#!/usr/bin/make -f |
2 |
|
|
# -*- makefile -*- |
3 |
|
|
# Sample debian/rules that uses debhelper. |
4 |
|
|
# GNU copyright 1997 to 1999 by Joey Hess. |
5 |
|
|
|
6 |
|
|
# Uncomment this to turn on verbose mode. |
7 |
|
|
#export DH_VERBOSE=1 |
8 |
|
|
|
9 |
|
|
# This is the debhelper compatibility version to use. |
10 |
schoenebeck |
3351 |
export DH_COMPAT=9 |
11 |
schoenebeck |
186 |
|
12 |
|
|
# These are used for cross-compiling and for saving the configure script |
13 |
|
|
# from having to guess our platform (since we know it already) |
14 |
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
15 |
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
16 |
|
|
|
17 |
|
|
|
18 |
|
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
19 |
|
|
CFLAGS += -g |
20 |
|
|
endif |
21 |
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
22 |
|
|
INSTALL_PROGRAM += -s |
23 |
|
|
endif |
24 |
|
|
|
25 |
|
|
config.status: configure |
26 |
|
|
dh_testdir |
27 |
|
|
# Add here commands to configure the package. |
28 |
schoenebeck |
521 |
chmod a+x configure |
29 |
schoenebeck |
186 |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
build: build-stamp |
33 |
|
|
build-stamp: config.status |
34 |
|
|
dh_testdir |
35 |
|
|
|
36 |
|
|
# Add here commands to compile the package. |
37 |
|
|
$(MAKE) |
38 |
|
|
|
39 |
|
|
# the build should fail if the tests are not successful |
40 |
|
|
#$(MAKE) check |
41 |
|
|
|
42 |
schoenebeck |
2865 |
# Wiping 'dependency_libs' fields from all .la files |
43 |
|
|
# (see https://wiki.debian.org/ReleaseGoals/LAFileRemoval for details). |
44 |
|
|
# This is a workaround to avoid unnecessary lib dependencies of |
45 |
|
|
# apps/libs that link against libgig. Note that this might require |
46 |
|
|
# manual adjustments to projects linking statically against libgig. |
47 |
|
|
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` `find . -name '*.lai'` |
48 |
|
|
# rebuild of gigtools is required to get rid of their unnecessary lib dependencies as well |
49 |
|
|
( cd src/tools && $(MAKE) clean ) |
50 |
|
|
# explicitly remove "-luuid" occurrences from src/tools/Makefile |
51 |
|
|
sed -i "s/-luuid//" src/tools/Makefile |
52 |
|
|
# now rebuild gigtools |
53 |
|
|
$(MAKE) |
54 |
|
|
|
55 |
schoenebeck |
313 |
# generate Doxygen API documentation |
56 |
|
|
$(MAKE) docs |
57 |
|
|
|
58 |
schoenebeck |
186 |
touch build-stamp |
59 |
|
|
|
60 |
|
|
clean: |
61 |
|
|
dh_testdir |
62 |
|
|
dh_testroot |
63 |
|
|
rm -f build-stamp |
64 |
|
|
|
65 |
schoenebeck |
2806 |
$(MAKE) -f Makefile.svn || true |
66 |
schoenebeck |
521 |
chmod a+x configure |
67 |
flax |
440 |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info |
68 |
|
|
|
69 |
|
|
|
70 |
schoenebeck |
186 |
# Add here commands to clean up after the build process. |
71 |
|
|
-$(MAKE) distclean |
72 |
|
|
|
73 |
|
|
dh_clean -a |
74 |
|
|
|
75 |
|
|
install: build |
76 |
|
|
dh_testdir |
77 |
|
|
dh_testroot |
78 |
|
|
dh_clean -k -a |
79 |
|
|
dh_installdirs |
80 |
|
|
|
81 |
|
|
# Add here commands to install the package into debian/tmp |
82 |
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
83 |
schoenebeck |
3355 |
mkdir -p debian/tmp/etc/ld.so.conf.d |
84 |
|
|
echo /usr/lib/libgig > debian/tmp/etc/ld.so.conf.d/libgig.conf |
85 |
schoenebeck |
186 |
|
86 |
|
|
# Build architecture-independent files here. |
87 |
|
|
binary-indep: build install |
88 |
|
|
# We have nothing to do by default. |
89 |
|
|
|
90 |
|
|
# Build architecture-dependent files here. |
91 |
|
|
binary-arch: build install |
92 |
|
|
dh_testdir |
93 |
|
|
dh_testroot |
94 |
|
|
dh_install -a --list-missing |
95 |
|
|
dh_installchangelogs -a ChangeLog |
96 |
|
|
dh_installdocs -a |
97 |
|
|
# dh_installexamples |
98 |
|
|
# dh_installmenu |
99 |
|
|
# dh_installdebconf |
100 |
|
|
# dh_installlogrotate |
101 |
|
|
# dh_installemacsen |
102 |
|
|
# dh_installpam |
103 |
|
|
# dh_installmime |
104 |
|
|
# dh_installinit |
105 |
|
|
# dh_installcron |
106 |
|
|
# dh_installinfo |
107 |
|
|
dh_installman |
108 |
schoenebeck |
1953 |
dh_link |
109 |
|
|
# dh_strip -a |
110 |
schoenebeck |
186 |
dh_compress -a |
111 |
|
|
dh_fixperms -a |
112 |
|
|
# dh_perl |
113 |
|
|
# dh_python |
114 |
schoenebeck |
1953 |
dh_makeshlibs |
115 |
|
|
dh_installdeb |
116 |
|
|
dh_shlibdeps |
117 |
|
|
dh_gencontrol |
118 |
|
|
dh_md5sums |
119 |
|
|
dh_builddeb |
120 |
schoenebeck |
186 |
|
121 |
|
|
binary: binary-indep binary-arch |
122 |
|
|
.PHONY: build clean binary-indep binary-arch binary install |