Upgrade to 0.4.3 base on merge from mainstream branch
[keepassx] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # Include dpatch stuff.
8 # include /usr/share/dpatch/dpatch.make
9
10 CFLAGS = -Wall -g
11 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12         CFLAGS += -O0
13 else
14         CFLAGS += -O2
15 endif
16
17 build: patch build-stamp
18 build-stamp: 
19         dh_testdir
20         #/opt/qt4-maemo5/bin/
21         qmake-qt4 PREFIX=/usr QMAKE_CFLAGS_DEBUG="$(CFLAGS)" QMAKE_CXXFLAGS_DEBUG="$(CFLAGS)" DEBUG=1 AUTOTYPE=0
22         $(MAKE)
23         touch build-stamp
24
25 clean: clean-patched unpatch
26 clean-patched:
27         dh_testdir
28         dh_testroot
29         rm -f build-stamp configure-stamp
30         -$(MAKE) distclean
31         rm -rf src/Makefile Makefile
32         dh_clean 
33
34 install: build
35         dh_testdir
36         dh_testroot
37         dh_clean -k 
38         dh_installdirs
39         make INSTALL_ROOT=$(CURDIR)/debian/keepassx install
40
41 binary-indep: build install
42 # We have nothing to do by default.
43
44 # Build architecture-dependent files here.
45 binary-arch: build install
46         dh_testdir
47         dh_testroot
48         dh_installchangelogs changelog
49         dh_installdocs
50         dh_installexamples
51         dh_installman debian/keepass.1
52         dh_desktop
53         dh_link
54         dh_strip
55         dh_compress
56         dh_fixperms
57         dh_installdeb
58         dh_shlibdeps
59         dh_gencontrol
60         dh_md5sums
61         dh_builddeb
62
63 patch: patch-stamp
64
65 patch-stamp:
66         dpatch apply-all
67
68 unpatch:
69         dpatch deapply-all
70         rm -rf debian/patched
71
72 binary: binary-indep binary-arch
73 .PHONY: build build-stamp clean clean-patched install binary-indep binary-arch binary patch patch-stamp unpatch binary