Merge "[WK2] Revert patch / set a limit of layer count and atlas size." into 2.0_beta
[framework/web/webkit-efl.git] / debian-for-webkit1-efl / 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 WEBKIT_BUILD_DIR=$(TIZEN_OUTPUT_DIR)
36 ifeq "$(WEBKIT_BUILD_DIR)" ""
37     WEBKIT_BUILD_DIR="BuildWK"
38 endif
39
40 SOURCE_DIR=$(shell pwd)
41
42 config.status: 
43         dh_testdir
44         # Add here commands to configure the package.
45         mkdir -p $(WEBKIT_BUILD_DIR)
46         cd $(WEBKIT_BUILD_DIR) && cmake $(SOURCE_DIR) -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)
47
48 build: build-stamp
49
50 build-stamp:  config.status
51         dh_testdir
52
53         # Add here commands to compile the package.
54         cd $(WEBKIT_BUILD_DIR) && $(MAKE) $(JOBS)
55         #docbook-to-man debian/ncurses.sgml > ncurses.1
56
57         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
58                 cat $$f > $${f%.in}; \
59                 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
60         done
61 #               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
62
63         touch $@
64
65 clean:
66         dh_testdir
67         dh_testroot
68         rm -f build-stamp 
69
70         # Add here commands to clean up after the build process.
71         rm -rf $(WEBKIT_BUILD_DIR)
72
73 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
74         cp -f /usr/share/misc/config.sub config.sub
75 endif
76 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
77         cp -f /usr/share/misc/config.guess config.guess
78 endif
79
80         for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
81                 rm -f $${f%.in}; \
82         done
83
84         dh_clean 
85
86 install:
87         dh_testdir
88         dh_testroot
89         dh_clean -k 
90         dh_installdirs
91
92         # Add here commands to install the package into debian/ncurses.
93         cd $(WEBKIT_BUILD_DIR) && $(MAKE) $(JOBS) $(BUILDDIR) DESTDIR=$(CURDIR)/debian/tmp install
94         mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/share/edje/
95         cd $(WEBKIT_BUILD_DIR) && install -m 644 WebKit/efl/DefaultTheme/default.edj $(CURDIR)/debian/tmp$(PREFIX)/share/edje/webkit.edj
96
97
98 # Build architecture-independent files here.
99 binary-indep: build install
100 # We have nothing to do by default.
101
102 # Build architecture-dependent files here.
103 binary-arch: build install
104         dh_testdir
105         dh_testroot
106         dh_installchangelogs 
107         dh_installdocs
108         dh_installexamples
109         dh_install --sourcedir=debian/tmp
110 #       dh_installmenu
111 #       dh_installdebconf       
112 #       dh_installlogrotate
113 #       dh_installemacsen
114 #       dh_installpam
115 #       dh_installmime
116 #       dh_python
117 #       dh_installinit
118 #       dh_installcron
119 #       dh_installinfo
120         dh_installman
121         dh_link
122         dh_strip --dbg-package=libwebkit-engine-dbg
123         dh_compress
124         dh_fixperms
125 #       dh_perl
126         dh_makeshlibs
127         dh_installdeb
128         dh_shlibdeps
129         dh_gencontrol
130         dh_md5sums
131         dh_builddeb
132
133 binary: binary-indep binary-arch
134 .PHONY: build clean binary-indep binary-arch binary install