apply FSL(Flora Software License)
[apps/home/call.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 CFLAGS ?= -Wall -g
13 CXXFLAGS ?=  -Wall -g
14 LDFLAGS ?= 
15 PREFIX ?= /opt/apps/org.tizen.call
16 RESDIR ?= ${PREFIX}/res
17 DATADIR ?= ${PREFIX}/data
18
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20         CFLAGS += -O0
21         CXXFLAGS += -O0
22 else
23         CFLAGS += -O2
24         CXXFLAGS += -O2
25 endif
26
27 CFLAGS += -fPIC
28 CXXFLAGS += -fPIC
29
30 LDFLAGS += -Wl,--rpath=$(/PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
31
32 CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp
33
34
35 configure: configure-stamp
36 configure-stamp:
37         dh_testdir
38         # Add here commands to configure the package.
39         mkdir -p $(CMAKE_TMP_DIR);
40         cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
41
42         touch configure-stamp
43
44 build: build-stamp
45
46 build-stamp: configure-stamp 
47         dh_testdir
48
49         # Add here commands to compile the package.
50         cd $(CMAKE_TMP_DIR) && $(MAKE)
51         #docbook-to-man debian/wavplayer.sgml > wavplayer.1
52
53         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
54                 cat $$f > $${f%.in}; \
55                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
56                 sed -i -e "s#@PREFIX@#$(RESDIR)#g" $${f%.in}; \
57                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
58         done
59
60
61         touch $@
62
63 clean:
64         dh_testdir
65         dh_testroot
66         rm -f build-stamp configure-stamp
67
68         # Add here commands to clean up after the build process.
69         -cd $(CMAKE_TMP_DIR) && $(MAKE) clean
70         rm -rf $(CMAKE_TMP_DIR)
71
72         rm -rf CMakeCache.txt
73         rm -rf CMakeFiles
74         rm -rf cmake_install.cmake
75         rm -rf Makefile
76         rm -rf install_manifest.txt
77         
78         rm -rf daemon/CMakeFiles
79         rm -rf daemon/cmake_install.cmake
80         rm -rf daemon/Makefile
81         rm -rf daemon/install_manifest.txt
82
83         rm -rf ui/CMakeFiles
84         rm -rf ui/cmake_install.cmake
85         rm -rf ui/Makefile
86         rm -rf ui/install_manifest.txt
87
88         rm -rf ui/*.edj
89         rm -rf ui/themes/*.edj
90
91         rm -rf ui/po/CMakeFiles
92         rm -rf ui/po/cmake_install.cmake
93         rm -rf ui/po/Makefile
94
95         rm -rf ui/org.tizen.call.desktop
96         
97         rm -rf cmake_tmp
98         
99         
100
101         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
102                 rm -f $${f%.in}; \
103         done
104
105         dh_clean 
106
107 install: build
108         dh_testdir
109         dh_testroot
110         dh_clean -k 
111         dh_installdirs
112
113         # Add here commands to install the package into debian/wavplayer.
114         cd $(CMAKE_TMP_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
115
116
117 # Build architecture-independent files here.
118 binary-indep: build install
119 # We have nothing to do by default.
120
121 # Build architecture-dependent files here.
122 binary-arch: build install
123         dh_testdir
124         dh_testroot
125 #       dh_installchangelogs 
126 #       dh_installdocs
127 #       dh_installexamples
128         dh_install --sourcedir=debian/tmp
129 #       dh_installmenu
130 #       dh_installdebconf       
131 #       dh_installlogrotate
132 #       dh_installemacsen
133 #       dh_installpam
134 #       dh_installmime
135 #       dh_python
136 #       dh_installinit
137 #       dh_installcron
138 #       dh_installinfo
139         dh_installman
140         dh_link
141 #       dh_strip
142         dh_strip --dbg-package=org.tizen.call-dbg
143         dh_compress
144         dh_fixperms
145 #       dh_perl
146         dh_makeshlibs
147         dh_installdeb
148         dh_shlibdeps
149         dh_gencontrol
150         dh_md5sums
151         dh_builddeb
152
153 binary: binary-indep binary-arch
154 .PHONY: build clean binary-indep binary-arch binary install configure