Merge "[Release] Webkit2-efl-123997_0.11.63" 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.63
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(eina)
25 BuildRequires: pkgconfig(elementary)
26 BuildRequires: pkgconfig(enchant)
27 BuildRequires: pkgconfig(evas)
28 BuildRequires: pkgconfig(feedback)
29 BuildRequires: pkgconfig(fontconfig)
30 BuildRequires: pkgconfig(freetype2)
31 BuildRequires: pkgconfig(glib-2.0)
32 BuildRequires: pkgconfig(gstreamer-0.10)
33 BuildRequires: pkgconfig(gstreamer-plugins-base-0.10)
34 BuildRequires: pkgconfig(harfbuzz)
35 BuildRequires: pkgconfig(icu-i18n)
36 BuildRequires: pkgconfig(libmedia-utils)
37 BuildRequires: pkgconfig(libsoup-2.4)
38 BuildRequires: pkgconfig(openssl)
39 BuildRequires: pkgconfig(libxml-2.0)
40 BuildRequires: pkgconfig(libxslt)
41 BuildRequires: pkgconfig(location)
42 BuildRequires: pkgconfig(mmutil-imgp)
43 BuildRequires: pkgconfig(mmutil-jpeg)
44 BuildRequires: pkgconfig(mm-session)
45 BuildRequires: pkgconfig(mm-sound)
46 BuildRequires: pkgconfig(sqlite3)
47 BuildRequires: pkgconfig(utilX)
48 BuildRequires: pkgconfig(vconf)
49 BuildRequires: pkgconfig(xt)
50 BuildRequires: pkgconfig(capi-appfw-application)
51 BuildRequires: pkgconfig(leveldb)
52 BuildRequires: pkgconfig(capi-location-manager)
53 BuildRequires: pkgconfig(capi-system-sensor)
54 BuildRequires: pkgconfig(capi-system-device)
55 BuildRequires: pkgconfig(ui-gadget-1)
56 BuildRequires: pkgconfig(xext)
57 BuildRequires: pkgconfig(libavcodec)
58 BuildRequires: pkgconfig(gles20)
59 BuildRequires: pkgconfig(tts)
60 BuildRequires: pkgconfig(capi-system-power)
61
62
63 %description
64 Browser Engine based on Webkit2 EFL (Shared Library)
65
66 %package devel
67 Summary: Webkit2 EFL
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
70 %description devel
71 Browser Engine dev library based on Webkit EFL (developement files)
72
73 %prep
74 %setup -q
75
76 %build
77
78 # Temporary workaround
79 %ifarch %{arm}
80 export CFLAGS="$(echo $CFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
81 export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
82 export FFLAGS="$(echo $FFLAGS | sed 's/-mfpu=[a-zA-Z0-9-]*/-mfpu=neon/g')"
83 %else
84 export CFLAGS="$(echo $CFLAGS | sed 's/-Wl,--as-needed//g')"
85 export CXXFLAGS="$(echo $CXXFLAGS | sed 's/-Wl,--as-needed//g')"
86 %endif
87
88 %if 0%{?nodebug}
89 CFLAGS=$(echo $CFLAGS | sed 's/ -g / /')
90 CXXFLAGS=$(echo $CXXFLAGS | sed 's/ -g / /')
91 %endif
92
93 %ifarch %{arm}
94 %define EFL_TARGET arm
95 %else
96 %if 0%{?simulator}
97 %define EFL_TARGET emulator
98 %else
99 %define EFL_TARGET i386
100 %endif
101 %endif
102
103 export SOURCE_DIR="$PWD"
104 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
105 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
106 then
107     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
108 fi
109 export TIZEN_WEBKIT_EXTRA_OPTIONS=%{TIZEN_WEBKIT_EXTRA_OPTIONS}
110 if [ "{TIZEN_WEBKIT_EXTRA_OPTIONS}" == "${TIZEN_WEBKIT_EXTRA_OPTIONS#%}" ]
111 then
112     export TIZEN_WEBKIT_EXTRA_OPTIONS=
113 fi
114
115 mkdir -p $WEBKIT_BUILD_DIR
116 cd $WEBKIT_BUILD_DIR
117
118 export MAKE_OPTION=%{MAKE_OPTION}
119 if [ "{MAKE_OPTION}" == "${MAKE_OPTION#%}" ]
120 then
121     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
122     make %{?jobs:-j%jobs}
123 else
124     make %{MAKE_OPTION} %{?jobs:-j%jobs}
125 fi
126
127 %install
128 rm -rf %{buildroot}
129
130 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
131 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
132 then
133     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
134 fi
135
136 cd $WEBKIT_BUILD_DIR
137 %make_install
138 mkdir -p %{buildroot}/usr/share/edje
139
140 %post
141 #!/bin/sh
142 #change file permissions
143 # 1. libraries
144 chmod 644 %{_libdir}/libewebkit2.so
145 # 2. Resources
146 chmod 644 /usr/share/edje/webkit.edj
147
148 %postun
149
150 %files
151 %manifest %{name}.manifest
152 %defattr(-,root,root,-)
153 %{_libdir}/*.so*
154 %{_bindir}/*
155 /usr/share/*
156
157 %files devel
158 %defattr(-,root,root,-)
159 %{_includedir}/*
160 %{_libdir}/pkgconfig/*