* debian/rules:
[debian/cdck.git] / debian / rules
index 3dd970c2e9fa5a87f03abc4fd2df19d48dc1d1aa..ebfa2d98ea22f25ae7a9f25a25a17f8e9270dbdd 100755 (executable)
@@ -9,6 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
@@ -26,27 +27,7 @@ endif
 
 config.status: configure
        dh_testdir
-       # Add here commands to configure the package.
-       CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
 
-
-build: build-stamp
-
-build-stamp:  config.status
-       dh_testdir
-
-       # Add here commands to compile the package.
-       $(MAKE)
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp 
-
-       # Add here commands to clean up after the build process.
-       -$(MAKE) distclean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
        cp -f /usr/share/misc/config.sub config.sub
 endif
@@ -54,18 +35,31 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" ""
        cp -f /usr/share/misc/config.guess config.guess
 endif
 
+       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS=" -Wl,-z,defs"
 
-       dh_clean 
 
-install: build
+build: build-stamp
+build-stamp: config.status $(QUILT_STAMPFN)
+       dh_testdir
+       $(MAKE) -j1
+       touch $@
+
+clean: unpatch
        dh_testdir
        dh_testroot
-       dh_clean -k 
-       dh_installdirs
+       rm -f config.sub config.guess
+       rm -f build-stamp install-stamp
+       [ ! -f Makefile ] || $(MAKE) distclean
+       dh_clean
 
-       # Add here commands to install the package into debian/cdck.
+install: install-stamp
+install-stamp: build-stamp
+       dh_testdir
+       dh_testroot
+       dh_clean -k
        $(MAKE) install DESTDIR=$(CURDIR)/debian/cdck
-
+       rm -rf $(CURDIR)/debian/cdck/usr/lib
+       touch $@
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -77,25 +71,10 @@ binary-arch: build install
        dh_testroot
        dh_installchangelogs ChangeLog
        dh_installdocs
-#      dh_installexamples
-#      dh_install
-#      dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
        dh_installman
-#      dh_link
-       dh_strip -Xlibcdck.la -Xlibcdck.a
+       dh_strip
        dh_compress
        dh_fixperms
-#      dh_perl
-#      dh_python
-#      dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
@@ -103,4 +82,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+.PHONY: build clean binary-indep binary-arch binary install