build: Rewrite the build system to be nicer.
[fwd] / debian / rules
index b149ebf..39c2a7c 100755 (executable)
@@ -1,45 +1,18 @@
 #! /usr/bin/make -f
 
-export DH_COMPAT = 4
+CDBS = /usr/share/cdbs/1
 
-build:
-       rm -rf build deb-build
-       mkdir deb-build
-       cd deb-build; ../configure --prefix=/usr --mandir=/usr/share/man
-       make -C deb-build
-       touch build
+include $(CDBS)/class/autotools.mk
+include $(CDBS)/rules/debhelper.mk
 
-clean:
-       dh_clean
-       rm -rf deb-build build
+###--------------------------------------------------------------------------
+### General definitions.
 
-install: build
-       dh_clean
-       make -C deb-build install DESTDIR=`pwd`/debian/fw
+DEB_BUILDDIR = $(CURDIR)/build
 
-binary-indep:
+###--------------------------------------------------------------------------
+### Documentation.
 
-binary-arch: install
-       dh_testdir -a
-       dh_testroot -a
-       dh_compress -a
-       dh_installdocs -a GRAMMAR
-       dh_strip -a
-       dh_shlibdeps -a
-       dh_gencontrol -a
-       dh_fixperms -a
-       dh_installdeb -a
-       dh_md5sums -a
-       dh_builddeb -a
+DEB_INSTALL_DOCS_fw     = GRAMMAR
 
-binary: binary-indep binary-arch
-
-source:
-       rm -rf deb-build/*.tar.gz deb-build/=deb=
-       make -C deb-build dist
-       mkdir deb-build/=deb=
-       cd deb-build/=deb=; tar xvfz ../*.tar.gz
-       d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
-       rm -rf deb-build/=deb=
-
-.PHONY: binary binary-arch binary-indep clean install source
+###----- That's all, folks --------------------------------------------------
\ No newline at end of file