Code

control, rules: Use ${octave:Depends} and octave3.0-depends.
[pkg-pfstools.git] / debian / rules
index e775717e4c62224c8c99179c8192a5ba87f08ff4..4f9c2e5895f385409b8a16b0ff29ff09d40f12c0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # debian/rules for pfstools
 #
-# Written by Sebastian Harl <sh@tokkee.org>
+# Written by Sebastian Harl <tokkee@debian.org>
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -20,8 +20,9 @@ else
 endif
 
 include /usr/share/octave/debian/defs.make
+include /usr/share/dpatch/dpatch.make
 
-config.status: configure
+config.status: configure $(DPATCH_STAMPFN)
        dh_testdir
        
        for file in config.guess config.sub; do \
@@ -34,6 +35,7 @@ config.status: configure
        CXXFLAGS="$(CXXFLAGS)" ./configure \
                        --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr --mandir=\$${prefix}/share/man \
+                       --with-moc=moc-qt3 \
                        --with-octave-m-dir=$(MDIR)/pfstools \
                        --with-octave-oct-dir=$(OCTDIR)/pfstools
 
@@ -46,7 +48,7 @@ build-stamp: config.status
        
        touch build-stamp
 
-clean:
+clean: unpatch
        dh_testdir
        dh_testroot
        rm -f build-stamp 
@@ -71,10 +73,10 @@ install: build
        
        $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
        
-       chmod 644 debian/tmp/usr/share/octave/site/api-v13/m/pfstools/*
+       chmod 644 debian/tmp/$(MDIR)/pfstools/*
        
        # these binaries are not available
-       rm debian/tmp/usr/share/man/man1/pfs{in,out}jpeghdr.1
+       rm debian/tmp/usr/share/man/man1/pfs*jpeghdr.1
 
 binary-indep: build install
        # nothing to do here
@@ -83,17 +85,26 @@ binary-arch: build install
        dh_testdir
        dh_testroot
        dh_installchangelogs ChangeLog
-       dh_installdocs AUTHORS README TODO doc/faq.txt doc/pfs_format_spec.pdf
+       dh_installdocs README TODO doc/faq.txt doc/pfs_format_spec.pdf
+       dh_installdocs -A AUTHORS
        dh_installexamples
-       dh_install --sourcedir=debian/tmp --list-missing
-       dh_installman debian/pfsglview.1
+       dh_install --sourcedir=debian/tmp --fail-missing
+       # these files have been installed twice by dh_install
+       rm -f debian/pfstools/usr/bin/pfs*view debian/pfstools/usr/bin/pfsv \
+               debian/pfstools/usr/share/man/man1/pfsv.1 \
+               debian/pfstools/usr/share/man/man1/pfs*view.1
+       dh_installman
        dh_link
-       dh_strip
-       dh_compress
+       dh_strip --dbg-package=pfstools-dbg
+       # mkoctfile removes any symbol table and relocation information from the
+       # .oct files making them unusable for the -dbg package
+       rm -rf debian/pfstools-dbg/usr/lib/debug/usr/lib/octave/
+       dh_compress -X.pdf
        dh_fixperms
        dh_makeshlibs
        dh_installdeb
        dh_shlibdeps -Llibpfs-1.2-0 -ldebian/libpfs-1.2-0/usr/lib/
+       octave3.0-depends -poctave-pfstools
        dh_gencontrol
        dh_md5sums
        dh_builddeb