Code

rules: Replace the whatis entry in the enblend/enfuse manpages.
[pkg-enblend.git] / debian / rules
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
60         
61         cd build-tree-mp && $(MAKE)
62         $(MAKE)
64         sed -e "s/manual page for enblend.*/combine images using a multiresolution spline/" \
65                 src/enblend.1 > src/enblend.1.tmp
66         mv src/enblend.1.tmp src/enblend.1
67         sed -e "s/manual page for enfuse.*/poor man's HDR/" \
68                 src/enfuse.1 > src/enfuse.1.tmp
69         mv src/enfuse.1.tmp src/enfuse.1
70         
71         touch build-stamp
73 clean:
74         dh_testdir
75         dh_testroot
76         rm -f build-stamp
77         
78         [ ! -f Makefile ] || $(MAKE) distclean
79         rm -f doc/*.info
80         rm -rf build-tree-mp
81         
82         dh_clean
84 install: build-stamp
85         dh_testdir
86         dh_testroot
87         dh_clean -k
88         dh_installdirs
89         
90         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
91         rm -f $(CURDIR)/debian/tmp/usr/share/info/dir
92         install -m755  build-tree-mp/src/enblend \
93                 $(CURDIR)/debian/tmp/usr/bin/enblend-mp
94         install -m755  build-tree-mp/src/enfuse \
95                 $(CURDIR)/debian/tmp/usr/bin/enfuse-mp
97 binary-indep:
98         # nothing to do here
100 binary-arch: build install
101         dh_testdir
102         dh_testroot
103         dh_installchangelogs -a ChangeLog
104         dh_installdocs -A -a NEWS AUTHORS
105         dh_installexamples -a
106         dh_install -a --sourcedir=debian/tmp --fail-missing
107         dh_installman -a
108         dh_installinfo -penblend doc/enblend.info
109         dh_installinfo -penfuse doc/enfuse*.info
110         dh_link -a
111         dh_strip -a
112         dh_compress -a
113         dh_fixperms -a
114         dh_installdeb -a
115         dh_shlibdeps -a
116         dh_gencontrol -a
117         dh_md5sums -a
118         dh_builddeb -a
120 binary: binary-indep binary-arch
121 .PHONY: get-orig-source build clean binary-indep binary-arch binary install