c8284308545666c3c5b23d6a99dfd751bcfbccdb
1 #!/usr/bin/make -f
2 # debian/rules for pfstools
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 CXXFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CXXFLAGS += -O0
18 else
19 CXXFLAGS += -O2
20 endif
22 include /usr/share/octave/debian/defs.make
24 config.status: configure
25 dh_testdir
27 for file in config.guess config.sub; do \
28 if [ ! -e $$file.upstream ]; then \
29 mv $$file $$file.upstream; \
30 ln -s /usr/share/misc/$$file .; \
31 fi \
32 done
34 CXXFLAGS="$(CXXFLAGS)" ./configure \
35 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
36 --prefix=/usr --mandir=\$${prefix}/share/man \
37 --with-moc=moc-qt3 \
38 --with-octave-m-dir=$(MDIR)/pfstools \
39 --with-octave-oct-dir=$(OCTDIR)/pfstools
41 build: build-stamp
43 build-stamp: config.status
44 dh_testdir
46 $(MAKE)
48 touch build-stamp
50 clean:
51 dh_testdir
52 dh_testroot
53 rm -f build-stamp
55 [ ! -f Makefile ] || $(MAKE) clean
56 [ ! -f Makefile ] || $(MAKE) distclean
58 for file in config.guess config.sub; do \
59 if [ -e $$file.upstream ]; then \
60 rm -f $$file; \
61 mv $$file.upstream $$file; \
62 fi \
63 done
65 dh_clean
67 install: build
68 dh_testdir
69 dh_testroot
70 dh_clean -k
71 dh_installdirs
73 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
75 chmod 644 debian/tmp/usr/share/octave/site/api-v13/m/pfstools/*
77 # these binaries are not available
78 rm debian/tmp/usr/share/man/man1/pfs{in,out}jpeghdr.1
80 binary-indep: build install
81 # nothing to do here
83 binary-arch: build install
84 dh_testdir
85 dh_testroot
86 dh_installchangelogs ChangeLog
87 dh_installdocs AUTHORS README TODO doc/faq.txt doc/pfs_format_spec.pdf
88 dh_installexamples
89 dh_install --sourcedir=debian/tmp --list-missing
90 dh_installman debian/pfsglview.1
91 dh_link
92 dh_strip
93 dh_compress -X.pdf
94 dh_fixperms
95 dh_makeshlibs
96 dh_installdeb
97 dh_shlibdeps -Llibpfs-1.2-0 -ldebian/libpfs-1.2-0/usr/lib/
98 dh_gencontrol
99 dh_md5sums
100 dh_builddeb
102 binary: binary-indep binary-arch
103 .PHONY: build clean binary-indep binary-arch binary install