Get rid of src/include.mk
[debian/uanytun.git] / debian / rules
index 1c7bb80..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,12 +30,14 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       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
@@ -44,9 +46,7 @@ install: build
        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/
-       install        etc/init.d/uanytun debian/uanytun/etc/init.d/
+       cd src && $(MAKE) DESTDIR=$(CURDIR)/debian/uanytun install && cd ..
 
 # Build architecture-independent files here.
 binary-indep: install