1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
#git:framework/web/web-provider
Name: livebox.web-provider
Summary: web framework for livebox
Version: 1.100_w2
Release: 1
Group: main/app
License: Flora License, Version 1.1
Source0: %{name}-%{version}.tar.gz
BuildRequires: attr
BuildRequires: cmake, gettext-tools
BuildRequires: libcap, libcap-devel
BuildRequires: pkgconfig(ail)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(ecore-evas)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(efl-assist)
BuildRequires: pkgconfig(ewebkit2)
BuildRequires: pkgconfig(wrt-core)
BuildRequires: pkgconfig(xmlsec1)
BuildRequires: pkgconfig(dpl-efl)
BuildRequires: pkgconfig(provider)
BuildRequires: pkgconfig(livebox-service)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(libsmack)
Requires(post): attr
%description
This is web framework responsible to manage liveboxes that consist of web contents
%package devel
Summary: Files for web provider devel.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Web Provider library (dev)
%prep
%setup -q
%build
%if 0%{?sec_build_binary_debug_enable}
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
%endif
%if "%{_repository}" == "wearable"
%define device_profile "wearable"
ln -sf src_wearable src
%else
%define device_profile "mobile"
ln -sf src_mobile src
rm livebox.web-provider.rule
mv livebox.web-provider.mobile.rule livebox.web-provider.rule
%endif
cmake . \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_PROJECT_VERSION=%{version} \
-DDEVICE_PROFILE=%{?device_profile:%device_profile}
#-fpie LDFLAGS="${LDFLAGS} -pie -O3"
CXXFLAGS="${CXXFLAGS} -Wall -Winline -Werror -fno-builtin-malloc" make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/license
cp LICENSE.Flora %{buildroot}/usr/share/license/%{name}
%make_install
%define app_data /opt/usr/apps/livebox.web-provider/data
mkdir -p %{buildroot}%{app_data}
%post
killall -9 web-provider
/usr/bin/web_provider_reset_db.sh
echo "smack setting..."
chsmack -a 'livebox.web-provider::db' /opt/usr/dbspace/.web_provider.db
chsmack -a 'livebox.web-provider::db' /opt/usr/dbspace/.web_provider.db-journal
setfattr -n security.capability -v 0sAQAAAgABAAAAAAAAAgAAAAAAAAA= %{_prefix}/apps/livebox.web-provider/bin/web-provider
chown 5000:5000 %{app_data}
chmod 755 %{app_data}
%files -n livebox.web-provider
%manifest livebox.web-provider.manifest
%defattr(-,root,root,-)
%{_libdir}/*.so*
%{_libdir}/web-provider/*.so*
%{_libdir}/web-provider/*.json
%{_datadir}/web-provider/*
%attr(755,root,root) %{_bindir}/web_provider_reset_db.sh
%{_prefix}/apps/livebox.web-provider/bin/web-provider
%{_datarootdir}/packages/livebox.web-provider.xml
%{_prefix}/share/res/*
%if "%{_repository}" == "wearable"
# wearable
%{_sysconfdir}/smack/accesses2.d/livebox.web-provider.rule
%else
# mobile
%{_sysconfdir}/smack/accesses.d/livebox.web-provider.rule
%endif
%{app_data}
%{_datadir}/license/%{name}
%attr(700,root,root) /etc/opt/upgrade/*.patch.sh
%files devel
%defattr(-,root,root,-)
%{_includedir}/web-provider/*
%{_libdir}/pkgconfig/*.pc
|