Get rid of src/include.mk
[debian/uanytun.git] / debian / rules
index 512ff1c..ca309e9 100755 (executable)
@@ -12,7 +12,7 @@
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       cd src && ./configure && cd ..
+       cd src && ./configure --prefix=/usr --sysconfdir=/etc --examplesdir=/usr/share/uanytun/examples && cd ..
        touch configure-stamp
 
 build: build-stamp
@@ -30,23 +30,23 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       # workarounds:
-       touch src/include.mk
-       rm -f src/tun.c
-
-       cd src && $(MAKE) clean && cd ..
+       cd src && $(MAKE) distclean && cd ..
        cd doc && $(MAKE) clean && cd ..
 
+       # drop leftover file:
+       rm -f src/tun.c
+
+       # Add here commands to clean up after the build process.
+       $(MAKE) --directory=$(CURDIR)/src distclean
        dh_clean
 
 install: build
        dh_testdir
        dh_testroot
-       dh_installdirs usr/sbin usr/share/uanytun/examples/config
+       dh_installdirs etc/init.d usr/sbin usr/share/uanytun/examples/config
 
        # Add here commands to install the package into debian/uanytun.
-       install -m 755 src/uanytun debian/uanytun/usr/sbin/
-       cp -a etc/uanytun/*        debian/uanytun/usr/share/uanytun/examples/config/
+       cd src && $(MAKE) DESTDIR=$(CURDIR)/debian/uanytun install && cd ..
 
 # Build architecture-independent files here.
 binary-indep: install
@@ -59,7 +59,7 @@ binary-arch: install
        dh_installchangelogs ChangeLog
        dh_installdocs
        dh_installexamples
-       dh_installinit etc/init.d/uanytun
+       dh_installinit
        dh_installman doc/uanytun.8
        dh_link
        dh_strip