3 | 3 |
# Uncomment this to turn on verbose mode.
|
4 | 4 |
#export DH_VERBOSE=1
|
5 | 5 |
|
6 | |
# These are used for cross-compiling and for saving the configure script
|
7 | |
# from having to guess our platform (since we know it already)
|
8 | |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
9 | |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
6 |
# This has to be exported to make some magic below work.
|
|
7 |
export DH_OPTIONS
|
10 | 8 |
|
|
9 |
GEOTIFF_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
|
11 | 10 |
|
12 | |
CFLAGS = -Wall -g
|
|
11 |
%:
|
|
12 |
dh $@ --with autotools_dev --parallel
|
13 | 13 |
|
14 | |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
15 | |
CFLAGS += -O0
|
16 | |
else
|
17 | |
CFLAGS += -O2
|
18 | |
endif
|
|
14 |
override_dh_clean:
|
|
15 |
dh_clean libgeotiff.* xtiffio.h newgeo.tif
|
19 | 16 |
|
20 | |
config.status: configure
|
21 | |
dh_testdir
|
22 | |
dh_autotools-dev_updateconfig
|
23 | |
# Add here commands to configure the package.
|
24 | |
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
25 | |
--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
|
26 | |
--includedir=\$${prefix}/include/geotiff $(shell dpkg-buildflags --export=configure)
|
|
17 |
override_dh_install:
|
|
18 |
dh_install --list-missing
|
27 | 19 |
|
28 | |
build: build-arch build-indep
|
29 | |
build-arch: build-stamp
|
30 | |
build-indep: build-stamp
|
|
20 |
override_dh_installchangelogs:
|
|
21 |
dh_installchangelogs ChangeLog
|
31 | 22 |
|
32 | |
build-stamp: config.status
|
|
23 |
override_dh_makeshlibs:
|
|
24 |
# Forces failure ignoring to collect new symbols
|
|
25 |
dh_makeshlibs -- -c0 -v$(GEOTIFF_VERSION)
|
33 | 26 |
|
34 | |
dh_testdir
|
35 | |
|
36 | |
# Add here commands to compile the package.
|
37 | |
$(MAKE)
|
38 | |
|
39 | |
touch $@
|
40 | |
|
41 | |
clean:
|
42 | |
dh_testdir
|
43 | |
dh_testroot
|
44 | |
dh_autotools-dev_restoreconfig
|
45 | |
|
46 | |
# Add here commands to clean up after the build process.
|
47 | |
[ ! -f $(CURDIR)/Makefile ] || $(MAKE) distclean
|
48 | |
|
49 | |
rm -f config.status config.log
|
50 | |
rm -f libgeotiff.* xtiffio.h newgeo.tif
|
51 | |
|
52 | |
dh_clean
|
53 | |
|
54 | |
install: build
|
55 | |
dh_testdir
|
56 | |
dh_testroot
|
57 | |
dh_prep
|
58 | |
dh_installdirs
|
59 | |
|
60 | |
# Add here commands to install the package into debian/tmp
|
61 | |
$(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
|
62 | |
|
63 | |
|
64 | |
# Build architecture-independent files here.
|
65 | |
binary-indep: build-indep install
|
66 | |
# We have nothing to do by default.
|
67 | |
|
68 | |
# Build architecture-dependent files here.
|
69 | |
binary-arch: build-arch install
|
70 | |
dh_testdir
|
71 | |
dh_testroot
|
72 | |
dh_installchangelogs ChangeLog
|
73 | |
dh_installdocs
|
74 | |
dh_installman
|
75 | |
dh_installexamples
|
76 | |
dh_install --list-missing --autodest
|
77 | |
dh_link
|
78 | |
dh_strip
|
79 | |
dh_compress
|
80 | |
dh_fixperms
|
81 | |
dh_makeshlibs
|
82 | |
dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib
|
83 | |
dh_installdeb
|
84 | |
dh_gencontrol
|
85 | |
dh_md5sums
|
86 | |
dh_builddeb
|
87 | |
|
88 | |
binary: binary-indep binary-arch
|
89 | |
.PHONY: build clean binary-indep binary-arch binary install clean
|