tizen beta release
[profile/ivi/webkit-efl.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
16 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
17 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
18
19 PREFIX ?= /usr
20
21 CFLAGS ?= -Wall
22
23 LDFLAGS ?=
24 PREFIX ?= /usr
25 DATADIR ?= /opt
26
27 ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
28 EFL_TARGET ?= arm
29 else
30 EFL_TARGET ?= i386
31 endif
32
33 JOBS=--jobs=$(shell grep ^processor /proc/cpuinfo | wc -l)
34
35 config.status: 
36         dh_testdir
37         # Add here commands to configure the package.
38         cmake . -DPORT=Efl -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_COMPONENT=$(PREFIX)/include -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="$(CFLAGS)" -DEFL_TARGET=$(EFL_TARGET) $(TIZEN_WEBKIT_EXTRA_OPTIONS)
39
40 build: build-stamp
41
42 build-stamp:  config.status
43         dh_testdir
44
45         # Add here commands to compile the package.
46         $(MAKE) $(JOBS)
47         #docbook-to-man debian/ncurses.sgml > ncurses.1
48
49         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
50                 cat $$f > $${f%.in}; \
51                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
52         done
53 #               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
54
55         touch $@
56
57 clean:
58         dh_testdir
59         dh_testroot
60         rm -f build-stamp 
61
62         # Add here commands to clean up after the build process.
63         -$(MAKE) clean
64         rm -rf CMakeCache.txt
65         rm -rf CMakeFiles
66         rm -rf cmake_install.cmake
67         rm -rf Makefile
68         rm -rf install_manifest.txt
69
70         rm -rf JavascriptCore WebCore WebKit DerivedSources
71
72 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
73         cp -f /usr/share/misc/config.sub config.sub
74 endif
75 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
76         cp -f /usr/share/misc/config.guess config.guess
77 endif
78
79         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
80                 rm -f $${f%.in}; \
81         done
82
83         dh_clean 
84
85 install:
86         dh_testdir
87         dh_testroot
88         dh_clean -k 
89         dh_installdirs
90
91         # Add here commands to install the package into debian/ncurses.
92         $(MAKE) $(JOBS) $(BUILDDIR) DESTDIR=$(CURDIR)/debian/tmp install
93         mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/share/edje/
94         install -m 644 WebKit/efl/DefaultTheme/default.edj $(CURDIR)/debian/tmp$(PREFIX)/share/edje/webkit.edj  # For apps using webkit; by youmin.ha@samsung.com
95
96
97 # Build architecture-independent files here.
98 binary-indep: build install
99 # We have nothing to do by default.
100
101 # Build architecture-dependent files here.
102 binary-arch: build install
103         dh_testdir
104         dh_testroot
105         dh_installchangelogs 
106         dh_installdocs
107         dh_installexamples
108         dh_install --sourcedir=debian/tmp
109 #       dh_installmenu
110 #       dh_installdebconf       
111 #       dh_installlogrotate
112 #       dh_installemacsen
113 #       dh_installpam
114 #       dh_installmime
115 #       dh_python
116 #       dh_installinit
117 #       dh_installcron
118 #       dh_installinfo
119         dh_installman
120         dh_link
121         dh_strip --dbg-package=libwebkit-engine-dbg
122         dh_compress
123         dh_fixperms
124 #       dh_perl
125         dh_makeshlibs
126         dh_installdeb
127         dh_shlibdeps
128         dh_gencontrol
129         dh_md5sums
130         dh_builddeb
131
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary install