Added build script of Debian
[qtrapids] / debian / rules
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..a550c35
--- /dev/null
@@ -0,0 +1,61 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+configure:
+       dh_testdir
+       cmake .
+       touch $@
+build: configure
+       $(MAKE)
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       -$(MAKE) clean
+       rm -f CMakeCache.txt
+       rm -rf `find -name CMakeFiles` 
+       rm -f configure
+       rm -f build
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+       dh_install --sourcedir=debian/tmp
+       
+# Build architecture-independent files here.
+binary-indep: install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       maemo-optify
+       dh_builddeb
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install