c9e5c9219b677f3f94da0ae33a5cd24ce8009398
1 #!/usr/bin/make -f
2 # debian/rules for enblend-enfuse
3 #
4 # Written by Sebastian Harl <sh@tokkee.org>.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -O0
18 else
19 CFLAGS += -O2
20 endif
22 CONFARGS=--host=$(DEB_HOST_GNU_TYPE) \
23 --build=$(DEB_BUILD_GNU_TYPE) \
24 --prefix=/usr --mandir=\$${prefix}/share/man \
25 --enable-gpu-support=yes \
26 --with-boost-filesystem=yes \
27 --with-openexr=yes
29 # --disable-openmp \
30 # --enable-image-cache=yes \
33 get-orig-source:
34 dh_testdir
35 dh_testroot
36 chmod 755 debian/bin/uscan_repack.sh
37 uscan --verbose --force-download --rename
39 # Hack: Since out of tree building of documentation is broken, make a out-tree
40 # build for mp versions and in-tree build for the regular binaries. Out of tree
41 # configure fails if in-tree configure run is detected, therefore force correct
42 # ordering by making config.status depend on build-tree-mp/config.status.
43 config.status: configure build-tree-mp/config.status
44 dh_testdir
45 CFLAGS="$(CFLAGS)" ./configure $(CONFARGS) \
46 --disable-openmp \
47 --enable-image-cache=yes
49 build-tree-mp/config.status: configure
50 dh_testdir
51 if ! test -e build-tree-mp ; then mkdir build-tree-mp ; fi
52 cd build-tree-mp && CFLAGS="$(CFLAGS)" ../configure $(CONFARGS) \
53 --enable-openmp \
54 --disable-image-cache
56 build: build-stamp
58 build-stamp: config.status build-tree-mp/config.status
59 dh_testdir
61 cd build-tree-mp && $(MAKE)
62 $(MAKE)
64 $(MAKE) pdf
66 sed -e "s/manual page for enblend.*/combine images using a multiresolution spline/" \
67 src/enblend.1 > src/enblend.1.tmp
68 mv src/enblend.1.tmp src/enblend.1
69 sed -e "s/manual page for enfuse.*/poor man's HDR/" \
70 src/enfuse.1 > src/enfuse.1.tmp
71 mv src/enfuse.1.tmp src/enfuse.1
73 touch build-stamp
75 clean:
76 dh_testdir
77 dh_testroot
78 rm -f build-stamp
80 [ ! -f Makefile ] || $(MAKE) distclean
81 rm -f doc/*.info doc/enblend.tpt doc/enfuse.tpt
82 rm -rf build-tree-mp
84 dh_clean
86 install: build-stamp
87 dh_testdir
88 dh_testroot
89 dh_clean -k
90 dh_installdirs
92 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
93 rm -f $(CURDIR)/debian/tmp/usr/share/info/dir
94 install -m755 build-tree-mp/src/enblend \
95 $(CURDIR)/debian/tmp/usr/bin/enblend-mp
96 install -m755 build-tree-mp/src/enfuse \
97 $(CURDIR)/debian/tmp/usr/bin/enfuse-mp
99 binary-indep:
100 # nothing to do here
102 binary-arch: build install
103 dh_testdir
104 dh_testroot
105 dh_installchangelogs -a ChangeLog
106 dh_installdocs -A -a NEWS AUTHORS
107 dh_installexamples -a
108 dh_install -a --sourcedir=debian/tmp --fail-missing
109 dh_installman -a
110 dh_installinfo -penblend doc/enblend.info
111 dh_installinfo -penfuse doc/enfuse*.info
112 dh_link -a
113 dh_strip -a
114 dh_compress -a -X.pdf
115 dh_fixperms -a
116 dh_installdeb -a
117 dh_shlibdeps -a
118 dh_gencontrol -a
119 dh_md5sums -a
120 dh_builddeb -a
122 binary: binary-indep binary-arch
123 .PHONY: get-orig-source build clean binary-indep binary-arch binary install