Tizen 2.0 Release
[framework/web/wrt-commons.git] / debian / rules
1 #!/usr/bin/make -f
2
3 #export DH_VERBOSE=1
4 PACKAGE_VERSION ?= $(shell dpkg-parsechangelog | sed -n 's/^Version: // p')
5
6 ifneq (,$(findstring yes,$(DPL_LOGS)))
7 DPL_LOGS_STATUS = "ON"
8 else
9 DPL_LOGS_STATUS = "OFF"
10 endif
11
12 BUILD_DIR = cmake-build
13
14 configure: configure-stamp
15 configure-stamp:
16         dh_testdir
17         rm -rf $(BUILD_DIR)
18         mkdir $(BUILD_DIR)
19         ( cd $(BUILD_DIR); cmake ..          \
20                 -DCMAKE_INSTALL_PREFIX=/usr  \
21                 -DDPL_LOG=$(DPL_LOGS_STATUS) \
22                 -DVERSION=${PACKAGE_VERSION};)
23
24         touch configure-stamp
25
26 build: build-stamp
27 build-stamp: configure-stamp 
28         dh_testdir
29         ( cd $(BUILD_DIR); $(MAKE) -j 4 )
30         touch $@
31
32 clean:
33         dh_testdir
34         dh_testroot
35         rm -f build-stamp configure-stamp
36         rm -rf $(BUILD_DIR)
37         dh_clean 
38
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k 
43         dh_installdirs
44         ( cd $(BUILD_DIR); $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install )
45         cd ..
46
47 binary-indep: build install
48
49 binary-arch: build install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs 
53         dh_installdocs
54         dh_installexamples
55         dh_install --sourcedir=debian/tmp
56 #       dh_installmenu
57 #       dh_installdebconf       
58 #       dh_installlogrotate
59 #       dh_installemacsen
60 #       dh_installpam
61 #       dh_installmime
62 #       dh_installinit
63 #       dh_installcron
64 #       dh_installinfo
65         dh_installman
66         dh_link
67         dh_strip --dbg-package=wrt-commons-dbg
68         dh_compress
69         dh_fixperms
70 #       dh_perl
71 #       dh_python
72         dh_makeshlibs
73         dh_installdeb
74         dh_shlibdeps
75         dh_gencontrol
76         dh_md5sums
77         dh_builddeb
78
79 binary: binary-indep binary-arch
80 .PHONY: build clean binary-indep binary-arch binary install configure