change sound path of mms media
[apps/core/preloaded/message-app.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 LDFLAGS ?= 
14 PREFIX ?= /opt/apps/org.tizen.message
15 RESDIR ?= /opt/apps/org.tizen.message/res
16 DATADIR ?= /opt/apps/org.tizen.message/data
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O0
20 else
21         CFLAGS += -O2
22 endif
23
24 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
25
26 configure: configure-stamp
27 configure-stamp:
28         dh_testdir
29         # Add here commands to configure the package.
30         CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=${PREFIX}
31
32         touch configure-stamp
33
34 build: build-stamp
35
36 build-stamp: configure-stamp 
37         dh_testdir
38
39         # Add here commands to compile the package.
40         $(MAKE)
41               
42         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
43                 cat $$f > $${f%.in}; \
44                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
45                 sed -i -e "s#@RESDIR@#$(RESDIR)#g" $${f%.in}; \
46                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
47         done
48
49         touch $@
50
51 clean:
52         dh_testdir
53         dh_testroot
54         rm -f build-stamp configure-stamp
55
56         # Add here commands to clean up after the build process.
57         -$(MAKE) clean
58         rm -f CMakeCache.txt
59         rm -rf CMakeFiles main/CMakeFiles composer/CMakeFiles setting/CMakeFiles viewer/CMakeFiles class0/CMakeFiles dialog/CMakeFiles common/CMakeFiles
60         rm -f cmake_install.cmake main/cmake_install.cmake composer/cmake_install.cmake setting/cmake_install.cmake viewer/cmake_install.cmake class0/cmake_install.cmake dialog/cmake_install.cmake common/cmake_install.cmake
61         rm -f Makefile main/Makefile composer/Makefile setting/Makefile viewer/Makefile class0/Makefile dialog/Makefile common/Makefile
62         rm -f install_manifest.txt main/install_manifest.txt composer/install_manifest.txt setting/install_manifest.txt class0/install_manifest.txt dialog/install_manifest.txt viewer/install_manifest.txt common/install_manifest.txt
63         rm -f main/po/CMakeCache.txt
64         rm -rf main/po/CMakeFiles
65         rm -f main/po/cmake_install.cmake
66         rm -f main/po/Makefile
67 #       rm -f po/install_manifest.txt
68
69         rm -f *.so composer/*.so setting/*.so viewer/*.so common/*.so
70         rm -f *.edj thread/theme/*.edj composer/data/composer_edc/*.edj bubble/theme/*.edj setting/theme/*.edj viewer/theme/*.edj common/data/*.edj
71         rm -f main/*.desktop
72         rm -f class0/*.desktop
73
74         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
75                 rm -f $${f%.in}; \
76         done
77
78         dh_clean 
79
80 install: build
81         dh_testdir
82         dh_testroot
83         dh_clean -k 
84         dh_installdirs
85
86         # Add here commands to install the package into debian/wavplayer.
87         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
88
89
90 # Build architecture-independent files here.
91 binary-indep: build install
92 # We have nothing to do by default.
93
94 # Build architecture-dependent files here.
95 binary-arch: build install
96         dh_testdir
97         dh_testroot
98         dh_installchangelogs 
99         dh_installdocs
100         dh_installexamples
101         dh_install --sourcedir=debian/tmp
102 #       dh_installmenu
103 #       dh_installdebconf       
104 #       dh_installlogrotate
105 #       dh_installemacsen
106 #       dh_installpam
107 #       dh_installmime
108 #       dh_python
109 #       dh_installinit
110 #       dh_installcron
111 #       dh_installinfo
112         dh_installman
113         dh_link
114         dh_strip --dbg-package=org.tizen.message-dbg
115         dh_compress
116         dh_fixperms
117 #       dh_perl
118         dh_makeshlibs
119         dh_installdeb
120         dh_shlibdeps
121         dh_gencontrol
122         dh_md5sums
123         dh_builddeb
124
125 binary: binary-indep binary-arch
126 .PHONY: build clean binary-indep binary-arch binary install configure