7fb44084ad4c80f4767487bb64d10b4ee7a97641
[apps/native/menu-screen.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 -fPIC -fpie
13 CXXFLAGS +=  -Wall -fPIC -fpie
14 LDFLAGS ?= 
15 PREFIX ?= /usr
16 DATADIR ?= /opt
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O0
20         CXXFLAGS += -O0
21 else
22         CFLAGS += -O2
23         CXXFLAGS += -O2
24 endif
25
26 ifneq (,$(findstring arm,$(DEB_HOST_ARCH)))
27         export ARCH = arm
28 else
29         export ARCH = i686
30 endif
31
32 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed -pie
33
34 configure: configure-stamp
35 configure-stamp:
36         dh_testdir
37         # Add here commands to configure the package.
38         CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
39
40         touch configure-stamp
41
42 build: build-stamp
43
44 build-stamp: configure-stamp 
45         dh_testdir
46
47         # Add here commands to compile the package.
48         $(MAKE)
49         #docbook-to-man debian/wavplayer.sgml > wavplayer.1
50
51         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
52                 cat $$f > $${f%.in}; \
53                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
54                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
55         done
56
57
58         touch $@
59
60 clean:
61         dh_testdir
62         dh_testroot
63         rm -f build-stamp configure-stamp
64
65         # Add here commands to clean up after the build process.
66         -$(MAKE) clean
67         rm -rf CMakeCache.txt
68         rm -rf CMakeFiles
69         rm -rf cmake_install.cmake
70         rm -rf Makefile
71         rm -rf install_manifest.txt
72
73         rm -rf data/CMakeCache.txt
74         rm -rf data/CMakeFiles
75         rm -rf data/cmake_install.cmake
76         rm -rf data/install_manifest.txt
77         rm -rf data/Makefile
78
79         rm -rf data/themes/CMakeCache.txt
80         rm -rf data/themes/CMakeFiles
81         rm -rf data/themes/cmake_install.cmake
82         rm -rf data/themes/install_manifest.txt
83         rm -rf data/themes/Makefile
84
85         rm -rf data/kdm/CMakeCache.txt
86         rm -rf data/kdm/CMakeFiles
87         rm -rf data/kdm/cmake_install.cmake
88         rm -rf data/kdm/install_manifest.txt
89         rm -rf data/kdm/Makefile
90                                         
91         rm -rf data/po/CMakeCache.txt
92         rm -rf data/po/CMakeFiles
93         rm -rf data/po/cmake_install.cmake
94         rm -rf data/po/install_manifest.txt
95         rm -rf data/po/Makefile
96                                         
97         rm -rf data/themes/*.edj
98         rm -rf data/*.edj
99         rm -rf *.so
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         $(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 --dbg-package=org.tizen.menu-screen-dbg
142         dh_compress
143         dh_fixperms
144 #       dh_perl
145         dh_makeshlibs
146         dh_installdeb
147         dh_shlibdeps
148         dh_gencontrol
149         dh_md5sums
150         dh_builddeb
151
152 binary: binary-indep binary-arch
153 .PHONY: build clean binary-indep binary-arch binary install configure