Merge "Fix memory leak of graphics surface.(Emulator)" into tizen_2.1
[framework/web/webkit-efl.git] / packaging / webkit2-efl.spec
1 Name: webkit2-efl
2 Summary: Webkit2 EFL
3 Version: 123997_0.11.37
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 %ifarch %{arm}
89 %define EFL_TARGET arm
90 %else
91 %if 0%{?simulator}
92 %define EFL_TARGET emulator
93 %else
94 %define EFL_TARGET i386
95 %endif
96 %endif
97
98 export SOURCE_DIR="$PWD"
99 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
100 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
101 then
102     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
103 fi
104 export TIZEN_WEBKIT_EXTRA_OPTIONS=%{TIZEN_WEBKIT_EXTRA_OPTIONS}
105 if [ "{TIZEN_WEBKIT_EXTRA_OPTIONS}" == "${TIZEN_WEBKIT_EXTRA_OPTIONS#%}" ]
106 then
107     export TIZEN_WEBKIT_EXTRA_OPTIONS=
108 fi
109
110 mkdir -p $WEBKIT_BUILD_DIR
111 cd $WEBKIT_BUILD_DIR
112
113 export MAKE_OPTION=%{MAKE_OPTION}
114 if [ "{MAKE_OPTION}" == "${MAKE_OPTION#%}" ]
115 then
116     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
117     make %{?jobs:-j%jobs}
118 else
119     make %{MAKE_OPTION} %{?jobs:-j%jobs}
120 fi
121
122 %install
123 rm -rf %{buildroot}
124
125 export WEBKIT_BUILD_DIR=%{WEBKIT_BUILD_DIR}
126 if [ -z "$WEBKIT_BUILD_DIR" -o "{WEBKIT_BUILD_DIR}" == "${WEBKIT_BUILD_DIR#%}" ]
127 then
128     export WEBKIT_BUILD_DIR="BuildWK2-%{EFL_TARGET}"
129 fi
130
131 cd $WEBKIT_BUILD_DIR
132 %make_install
133 mkdir -p %{buildroot}/usr/share/edje
134
135 %post
136 #!/bin/sh
137 #change file permissions
138 # 1. libraries
139 chmod 644 %{_libdir}/libewebkit2.so
140 # 2. Resources
141 chmod 644 /usr/share/edje/webkit.edj
142
143 %postun
144
145 %files
146 %manifest %{name}.manifest
147 %defattr(-,root,root,-)
148 %{_libdir}/*.so*
149 %{_bindir}/*
150 /usr/share/*
151
152 %files devel
153 %defattr(-,root,root,-)
154 %{_includedir}/*
155 %{_libdir}/pkgconfig/*