Added build script of Debian
[qtrapids] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 CFLAGS = -Wall -g
7
8 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9         CFLAGS += -O0
10 else
11         CFLAGS += -O2
12 endif
13
14 configure:
15         dh_testdir
16         cmake .
17         touch $@
18  
19 build: configure
20         $(MAKE)
21         touch $@
22
23 clean:
24         dh_testdir
25         dh_testroot
26         -$(MAKE) clean
27         rm -f CMakeCache.txt
28         rm -rf `find -name CMakeFiles` 
29         rm -f configure
30         rm -f build
31         dh_clean 
32
33 install: build
34         dh_testdir
35         dh_testroot
36         dh_clean -k
37         dh_installdirs
38         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
39         dh_install --sourcedir=debian/tmp
40         
41 # Build architecture-independent files here.
42 binary-indep: install
43 # We have nothing to do by default.
44
45 # Build architecture-dependent files here.
46 binary-arch: install
47         dh_testdir
48         dh_testroot
49         dh_installchangelogs
50         dh_strip
51         dh_compress
52         dh_fixperms
53         dh_installdeb
54         dh_shlibdeps
55         dh_gencontrol
56         dh_md5sums
57         maemo-optify
58         dh_builddeb
59
60 binary: binary-arch binary-indep
61 .PHONY: build clean binary-indep binary-arch binary install