blob: 890ed3278de30caa12d75d565af050937286bd2c (
plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
Name: download-provider
Summary: Download the contents in background
Version: 1.1.6
Release: 0
Group: System/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: libprivilege-control-conf
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(xdgmime)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(wifi-direct)
BuildRequires: pkgconfig(libsmack)
BuildRequires: gettext-devel
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(libtzplatform-config)
Requires(post): /sbin/ldconfig
Requires(post): /usr/bin/vconftool
Requires: sqlite
Requires: connman
Requires: net-config
%description
Description: download the contents in background
%package devel
Summary: Download-provider
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Description: download the contents in background (development files)
%prep
%setup -q
%define _data_install_path %{_datadir}/%{name}
%define _imagedir %{_data_install_path}/images
%define _localedir %{_data_install_path}/locales
%define _sqlschemadir %{_data_install_path}/sql
%define _sqlschemafile %{_sqlschemadir}/download-provider-schema.sql
%define cmake \
CFLAGS="${CFLAGS:-%optflags} -fPIC -D_REENTRANT -fvisibility=hidden"; export CFLAGS \
FFLAGS="${FFLAGS:-%optflags} -fPIC -fvisibility=hidden"; export FFLAGS \
LDFLAGS+=" -Wl,--as-needed -Wl,--hash-style=both"; export LDFLAGS \
%__cmake \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DBIN_INSTALL_DIR:PATH=%{_bindir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DPKG_NAME=%{name} \\\
-DPKG_VERSION=%{version} \\\
-DPKG_RELEASE=%{release} \\\
-DIMAGE_DIR:PATH=%{_imagedir} \\\
-DLOCALE_DIR:PATH=%{_localedir} \\\
-DSYSTEMD_DIR:PATH=%{_unitdir} \\\
-DDATABASE_SCHEMA_DIR=%{_sqlschemadir} \\\
-DDATABASE_SCHEMA_FILE=%{_sqlschemafile} \\\
-DSUPPORT_WIFI_DIRECT:BOOL=OFF \\\
-DSUPPORT_LOG_MESSAGE:BOOL=ON \\\
-DSUPPORT_CHECK_IPC:BOOL=ON \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
%{?_cmake_skip_rpath} \\\
-DBUILD_SHARED_LIBS:BOOL=ON
%build
%if 0%{?tizen_build_binary_release_type_eng}
export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
%endif
%cmake .
make %{?jobs:-j%jobs}
%install
%make_install
mkdir -p %{buildroot}/%{_data_install_path}
mkdir -p %{buildroot}%{_unitdir}/default.target.wants
mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
ln -s ../download-provider.service %{buildroot}%{_unitdir}/default.target.wants/
ln -s ../download-provider.socket %{buildroot}%{_unitdir}/sockets.target.wants/
%fdupes %{buildroot}%{_localedir}
%post
/sbin/ldconfig
%systemd_post %{name}.service
vconftool set -t int db/setting/default_memory/wap 0
%preun
%systemd_preun %{name}.service
%postun
/sbin/ldconfig
%systemd_postun %{name}.service
%files
%defattr(-,root,root,-)
%manifest %{name}.manifest
%license LICENSE.APLv2
%{_bindir}/%{name}
%{_imagedir}/*.png
%{_imagedir}/*.gif
%{_libdir}/libdownloadagent2.so*
%{_libdir}/libdownload-provider-interface.so*
%{_unitdir}/download-provider.service
%{_unitdir}/default.target.wants/download-provider.service
%{_unitdir}/download-provider.socket
%{_unitdir}/sockets.target.wants/download-provider.socket
%{_sqlschemafile}
%{_localedir}/*
%files devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libdownloadagent2.so
%{_libdir}/libdownload-provider-interface.so
%{_includedir}/download-provider/download-provider-defs.h
%{_includedir}/download-provider/download-provider-interface.h
%{_libdir}/pkgconfig/download-provider.pc
%{_libdir}/pkgconfig/download-provider-interface.pc
|