Merge "[Release] Webkit2-efl-123997_0.11.76" into tizen_2.2
[framework/web/webkit-efl.git] / packaging / webkit2-efl.spec
1 Name: webkit2-efl
2 Summary: Webkit2 EFL
3 Version: 123997_0.11.76
4 Release: 1
5 Group: Applications/Internet
6 License: LGPLv2.1 or BSD
7 Source0: %{name}-%{version}.tar.gz
8
9 Requires(post): /sbin/ldconfig
10 Requires(post): xkeyboard-config
11 Requires(postun): /sbin/ldconfig
12
13 BuildRequires: cmake, edje-bin, embryo-bin, python, bison, flex, gperf, libjpeg-turbo-devel, perl, gettext, ruby
14 BuildRequires: pkgconfig(cairo)
15 BuildRequires: pkgconfig(capi-network-connection)
16 BuildRequires: pkgconfig(capi-telephony-network-info)
17 BuildRequires: pkgconfig(dlog)
18 BuildRequires: pkgconfig(ecore)
19 BuildRequires: pkgconfig(ecore-evas)
20 BuildRequires: pkgconfig(ecore-file)
21 BuildRequires: pkgconfig(edbus)
22 BuildRequires: pkgconfig(edje)
23 BuildRequires: pkgconfig(eeze)
24 BuildRequires: pkgconfig(efl-assist)
25 BuildRequires: pkgconfig(eina)
26 BuildRequires: pkgconfig(elementary)
27 BuildRequires: pkgconfig(enchant)
28 BuildRequires: pkgconfig(evas)
29 BuildRequires: pkgconfig(feedback)
30 BuildRequires: pkgconfig(fontconfig)
31 BuildRequires: pkgconfig(freetype2)
32 BuildRequires: pkgconfig(glib-2.0)
33 BuildRequires: pkgconfig(gstreamer-0.10)
34 BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
35 BuildRequires: pkgconfig(harfbuzz)
36 BuildRequires: pkgconfig(icu-i18n)
37 BuildRequires: pkgconfig(libmedia-utils)
38 BuildRequires: pkgconfig(libsoup-2.4)
39 BuildRequires: pkgconfig(openssl)
40 BuildRequires: pkgconfig(libxml-2.0)
41 BuildRequires: pkgconfig(libxslt)
42 BuildRequires: pkgconfig(location)
43 BuildRequires: pkgconfig(mmutil-imgp)
44 BuildRequires: pkgconfig(mmutil-jpeg)
45 BuildRequires: pkgconfig(mm-session)
46 BuildRequires: pkgconfig(mm-sound)
47 BuildRequires: pkgconfig(sqlite3)
48 BuildRequires: pkgconfig(utilX)
49 BuildRequires: pkgconfig(vconf)
50 BuildRequires: pkgconfig(xt)
51 BuildRequires: pkgconfig(capi-appfw-application)
52 BuildRequires: pkgconfig(leveldb)
53 BuildRequires: pkgconfig(capi-location-manager)
54 BuildRequires: pkgconfig(capi-system-sensor)
55 BuildRequires: pkgconfig(capi-system-device)
56 BuildRequires: pkgconfig(ui-gadget-1)
57 BuildRequires: pkgconfig(xext)
58 BuildRequires: pkgconfig(libavcodec)
59 BuildRequires: pkgconfig(gles20)
60 BuildRequires: pkgconfig(tts)
61 BuildRequires: pkgconfig(capi-system-power)
62
63
64 %description
65 Browser Engine based on Webkit2 EFL (Shared Library)
66
67 %package devel
68 Summary: Webkit2 EFL
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
71 %description devel
72 Browser Engine dev library based on Webkit EFL (developement files)
73
74 %prep
75 %setup -q
76
77 %build
78
79 # Temporary workaround
80 %ifarch %{arm}
81 export CFLAGS="$(echo $CFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
82 export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
83 export FFLAGS="$(echo $FFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
84 %else
85 export CFLAGS="$(echo $CFLAGS | sed 's/-Wl,--as-needed//g')"
86 export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-Wl,--as-needed//g')"
87 %endif
88
89 %if 0%{?nodebug}
90 CFLAGS=$(echo $CFLAGS | sed 's/ -g / /')
91 CXXFLAGS=$(echo $CXXFLAGS | sed 's/ -g / /')
92 %endif
93
94 %ifarch %{arm}
95 %define EFL_TARGET arm
96 %else
97 %if 0%{?simulator}
98 %define EFL_TARGET emulator
99 %else
100 %define EFL_TARGET i386
101 %endif
102 %endif
103
104 export SOURCE_DIR="$PWD"
105 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
106 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
107 then
108     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
109 fi
110 export TIZEN_WEBKIT_EXTRA_OPTIONS=%{TIZEN_WEBKIT_EXTRA_OPTIONS}
111 if [ "{TIZEN_WEBKIT_EXTRA_OPTIONS}" == "${TIZEN_WEBKIT_EXTRA_OPTIONS#%}" ]
112 then
113     export TIZEN_WEBKIT_EXTRA_OPTIONS=
114 fi
115
116 mkdir -p $WEBKIT_BUILD_DIR
117 cd $WEBKIT_BUILD_DIR
118
119 export MAKE_OPTION=%{MAKE_OPTION}
120 if [ "{MAKE_OPTION}" == "${MAKE_OPTION#%}" ]
121 then
122     cmake $SOURCE_DIR -DPORT=Efl -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_WEBKIT=Off -DENABLE_WEBKIT2=On -DENABLE_ALLINONE=On -DEFL_TARGET=%{EFL_TARGET} -DDefaultTheme_RESOURCE_NAME=webkit.edj $TIZEN_WEBKIT_EXTRA_OPTIONS
123     make %{?jobs:-j%jobs}
124 else
125     make %{MAKE_OPTION} %{?jobs:-j%jobs}
126 fi
127
128 %install
129 rm -rf %{buildroot}
130
131 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
132 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
133 then
134     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
135 fi
136
137 cd $WEBKIT_BUILD_DIR
138 %make_install
139 mkdir -p %{buildroot}/usr/share/edje
140
141 %post
142 #!/bin/sh
143 #change file permissions
144 # 1. libraries
145 chmod 644 %{_libdir}/libewebkit2.so
146 # 2. Resources
147 chmod 644 /usr/share/edje/webkit.edj
148
149 %postun
150
151 %files
152 %manifest %{name}.manifest
153 %defattr(-,root,root,-)
154 %{_libdir}/*.so*
155 %{_bindir}/*
156 /usr/share/*
157
158 %files devel
159 %defattr(-,root,root,-)
160 %{_includedir}/*
161 %{_libdir}/pkgconfig/*