apply FSL(Flora Software License)
[profile/ivi/org.tizen.browser.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
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17
18 CFLAGS ?= -Wall
19 CXXFLAGS ?=  -Wall
20 LDFLAGS ?= 
21 PREFIX ?= /opt/apps/org.tizen.browser
22 RESDIR ?= /opt/apps/org.tizen.browser/res
23 DATADIR ?= /opt/apps/org.tizen.browser/data
24
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26         CFLAGS += -O0
27         CXXFLAGS += -O0
28 else
29         CFLAGS += -O2
30         CXXFLAGS += -O2
31 endif
32
33 CFLAGS += -fPIC
34 CXXFLAGS += -fPIC
35 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
36
37 configure: configure-stamp
38 configure-stamp:
39         dh_testdir
40         # Add here commands to configure the package.
41         CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DENABLE_GEOLOCATION_DIALOG=ON
42
43         touch configure-stamp
44
45 build: build-stamp
46
47 build-stamp: configure-stamp
48         dh_testdir
49
50         # Add here commands to compile the package.
51         $(MAKE)
52         #docbook-to-man debian/ncurses.sgml > ncurses.1
53
54         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
55                 cat $$f > $${f%.in}; \
56                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
57                 sed -i -e "s#@RESDIR@#$(RESDIR)#g" $${f%.in}; \
58                 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
59         done
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         -$(MAKE) clean
70         rm -rf CMakeCache.txt
71         rm -rf CMakeFiles
72         rm -rf cmake_install.cmake
73         rm -rf Makefile
74         rm -rf install_manifest.txt
75
76         rm -rf po/CMakeCache.txt
77         rm -rf po/CMakeFiles
78         rm -rf po/cmake_install.cmake
79         rm -rf po/Makefile
80         rm -rf po/install_manifest.txt
81
82         rm -rf browser.edj
83         rm -rf browser_theme.edj
84         rm -rf ug_effect.edj
85
86 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
87         cp -f /usr/share/misc/config.sub config.sub
88 endif
89 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
90         cp -f /usr/share/misc/config.guess config.guess
91 endif
92
93         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
94                 rm -f $${f%.in}; \
95         done
96
97         dh_clean 
98
99 install: build
100         dh_testdir
101         dh_testroot
102         dh_clean -k 
103         dh_installdirs
104
105         # Add here commands to install the package into debian/ncurses.
106         $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
107
108
109 # Build architecture-independent files here.
110 binary-indep: build install
111 # We have nothing to do by default.
112
113 # Build architecture-dependent files here.
114 binary-arch: build install
115         dh_testdir
116         dh_testroot
117         dh_installchangelogs 
118         dh_installdocs
119         dh_installexamples
120         dh_install --list-missing --sourcedir=debian/tmp
121 #       dh_installmenu
122 #       dh_installdebconf       
123 #       dh_installlogrotate
124 #       dh_installemacsen
125 #       dh_installpam
126 #       dh_installmime
127 #       dh_python
128 #       dh_installinit
129 #       dh_installcron
130 #       dh_installinfo
131         dh_installman
132         dh_link
133         dh_strip --dbg-package=org.tizen.browser-dbg
134         dh_compress
135         dh_fixperms
136 #       dh_perl
137         dh_makeshlibs
138         dh_installdeb
139         dh_shlibdeps
140         dh_gencontrol
141         dh_md5sums
142         dh_builddeb
143
144 binary: binary-indep binary-arch
145 .PHONY: build clean binary-indep binary-arch binary install configure