Code

Removed debian/pfsglview.1.
[pkg-pfstools.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for pfstools
3 #
4 # Written by Sebastian Harl <tokkee@debian.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
23 include /usr/share/dpatch/dpatch.make
25 config.status: configure $(DPATCH_STAMPFN)
26         dh_testdir
27         
28         for file in config.guess config.sub; do \
29                 if [ ! -e $$file.upstream ]; then \
30                         mv $$file $$file.upstream; \
31                         ln -s /usr/share/misc/$$file .; \
32                 fi \
33         done
34         
35         CXXFLAGS="$(CXXFLAGS)" ./configure \
36                         --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
37                         --prefix=/usr --mandir=\$${prefix}/share/man \
38                         --with-moc=moc-qt3 \
39                         --with-octave-m-dir=$(MDIR)/pfstools \
40                         --with-octave-oct-dir=$(OCTDIR)/pfstools
42 build: build-stamp
44 build-stamp: config.status
45         dh_testdir
46         
47         $(MAKE)
48         
49         touch build-stamp
51 clean: unpatch
52         dh_testdir
53         dh_testroot
54         rm -f build-stamp 
55         
56         [ ! -f Makefile ] || $(MAKE) clean
57         [ ! -f Makefile ] || $(MAKE) distclean
58         
59         for file in config.guess config.sub; do \
60                 if [ -e $$file.upstream ]; then \
61                         rm -f $$file; \
62                         mv $$file.upstream $$file; \
63                 fi \
64         done
65         
66         dh_clean 
68 install: build
69         dh_testdir
70         dh_testroot
71         dh_clean -k 
72         dh_installdirs
73         
74         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
75         
76         chmod 644 debian/tmp/$(MDIR)/pfstools/*
77         
78         # these binaries are not available
79         rm debian/tmp/usr/share/man/man1/pfs*jpeghdr.1
81 binary-indep: build install
82         # nothing to do here
84 binary-arch: build install
85         dh_testdir
86         dh_testroot
87         dh_installchangelogs ChangeLog
88         dh_installdocs README TODO doc/faq.txt doc/pfs_format_spec.pdf
89         dh_installdocs -A AUTHORS
90         dh_installexamples
91         dh_install --sourcedir=debian/tmp --list-missing
92         # these files have been installed twice
93         rm -f debian/pfstools/usr/bin/pfs*view debian/pfstools/usr/bin/pfsv \
94                 debian/pfstools/usr/share/man/man1/pfsv.1 \
95                 debian/pfstools/usr/share/man/man1/pfs*view.1
96         dh_installman
97         dh_link
98         dh_strip --dbg-package=pfstools-dbg
99         # mkoctfile removes any symbol table and relocation information from the
100         # .oct files making them unusable for the -dbg package
101         rm -rf debian/pfstools-dbg/usr/lib/debug/usr/lib/octave/
102         dh_compress -X.pdf
103         dh_fixperms
104         dh_makeshlibs
105         dh_installdeb
106         dh_shlibdeps -Llibpfs-1.2-0 -ldebian/libpfs-1.2-0/usr/lib/
107         dh_gencontrol
108         dh_md5sums
109         dh_builddeb
111 binary: binary-indep binary-arch
112 .PHONY: build clean binary-indep binary-arch binary install