* debian/* cleanup and update
[lichviet-widget] / qtc_packaging / debian_fremantle / rules
index 7a31fae..997bf97 100755 (executable)
@@ -9,47 +9,42 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+APPNAME := lichvietwidget
+builddir:
+        mkdir -p builddir
 
-
-
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       # qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
-
-       touch configure-stamp
-
+builddir/Makefile: builddir
+        cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro
 
 build: build-stamp
 
-build-stamp: configure-stamp  
-       dh_testdir
+build-stamp: builddir/Makefile
+        dh_testdir
 
-       # Add here commands to compile the package.
-       # $(MAKE) # Uncomment this line for use without Qt Creator
-       #docbook-to-man debian/lichvietwidget.sgml > lichvietwidget.1
+        # Add here commands to compile the package.
+        cd builddir && $(MAKE)
+        #docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1
 
-       touch $@
+        touch $@
 
-clean: 
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
+clean:
+        dh_testdir
+        dh_testroot
+        rm -f build-stamp
 
-       # Add here commands to clean up after the build process.
-       $(MAKE) clean
+        # Add here commands to clean up after the build process.
+        rm -rf builddir
 
-       dh_clean 
+        dh_clean
 
 install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k 
-       dh_installdirs
+        dh_testdir
+        dh_testroot
+        dh_clean -k
+        dh_installdirs
 
-       # Add here commands to install the package into debian/lichvietwidget.
-       $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/lichvietwidget install
+        # Add here commands to install the package into debian/arora.
+        cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
 
 
 # Build architecture-independent files here.
@@ -58,34 +53,20 @@ binary-indep: build install
 
 # Build architecture-dependent files here.
 binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs 
-       dh_installdocs
-       dh_installexamples
-#      dh_install
-#      dh_installmenu
-#      dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_python
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-#      dh_perl
-#      dh_makeshlibs
-       dh_installdeb
-       # dh_shlibdeps # Uncomment this line for use without Qt Creator
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+        dh_testdir
+        dh_testroot
+        dh_installdocs
+        dh_installexamples
+        dh_installman
+        dh_link
+        dh_strip
+        dh_compress
+        dh_fixperms
+        dh_installdeb
+        dh_shlibdeps
+        dh_gencontrol
+        dh_md5sums
+        dh_builddeb
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure