tizen beta release
[profile/ivi/webkit-efl.git] / debian-for-webkit2-efl / rules
1 #!/usr/bin/make -f
2
3 # These are used for cross-compiling and for saving the configure script
4 # from having to guess our platform (since we know it already)
5
6 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
7 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8
9 PREFIX ?= /usr
10
11 CFLAGS ?= -Wall
12
13 LDFLAGS ?=
14 PREFIX ?= /usr
15 DATADIR ?= /opt
16
17 ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
18 EFL_TARGET ?= arm
19 else
20 EFL_TARGET ?= i386
21 endif
22
23 JOBS=--jobs=$(shell grep ^processor /proc/cpuinfo | wc -l)
24
25 config.status:
26         dh_testdir
27         # Add here commands to configure the package.
28         cmake . -DPORT=Efl -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_COMPONENT=$(PREFIX)/include -DCMAKE_BUILD_TYPE=Release -DENABLE_WEBKIT=Off -DENABLE_WEBKIT2=On -DENABLE_DEMO=Off -DENABLE_WK2_PROFILING=Off -DENABLE_NETSCAPE_PLUGIN_API=On -DENABLE_SLP_SUPPORT_BLUE_RUNNER=Off -DENABLE_CLIENT_BASED_GEOLOCATION=On $(TIZEN_WEBKIT_EXTRA_OPTIONS)
29
30 build: build-stamp
31
32 build-stamp:  config.status
33         dh_testdir
34
35         # Add here commands to compile the package.
36         $(MAKE) $(JOBS)
37         #docbook-to-man debian/ncurses.sgml > ncurses.1
38
39         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
40                 cat $$f > $${f%.in}; \
41                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
42         done
43 #               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
44
45         touch $@
46
47 clean:
48         dh_testdir
49         dh_testroot
50         rm -f build-stamp
51
52         # Add here commands to clean up after the build process.
53         -$(MAKE) clean
54         rm -rf CMakeCache.txt
55         rm -rf CMakeFiles
56         rm -rf cmake_install.cmake
57         rm -rf Makefile
58         rm -rf install_manifest.txt
59
60         rm -rf JavascriptCore WebCore WebKit DerivedSources
61
62 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
63         cp -f /usr/share/misc/config.sub config.sub
64 endif
65 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
66         cp -f /usr/share/misc/config.guess config.guess
67 endif
68
69         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
70                 rm -f $${f%.in}; \
71         done
72
73         dh_clean
74
75 install:
76         dh_testdir
77         dh_testroot
78         dh_clean -k
79         dh_installdirs
80
81         # Add here commands to install the package into debian/ncurses.
82         $(MAKE) $(JOBS) $(BUILDDIR) DESTDIR=$(CURDIR)/debian/tmp install
83
84
85 # Build architecture-independent files here.
86 binary-indep: build install
87 # We have nothing to do by default.
88
89 # Build architecture-dependent files here.
90 binary-arch: build install
91         dh_testdir
92         dh_testroot
93         dh_installchangelogs
94         dh_installdocs
95         dh_installexamples
96         dh_install --sourcedir=debian/tmp
97         dh_installman
98         dh_link
99         dh_strip --dbg-package=libwebkit2-engine-dbg
100         dh_compress
101         dh_fixperms
102 #       dh_perl
103         dh_makeshlibs
104         dh_installdeb
105         dh_shlibdeps
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install