blob: 99c211afaf5d51590c9011641b6f7564ee06af7f (
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
Name: privacy-manager-server
Version: 0.0.4
Release: 0
License: Apache-2.0
Summary: Privacy Management
Group: Security/Libraries
Source0: %{name}-%{version}.tar.gz
Source1: privacy-manager-server.service
Source1001: privacy-manager-server.manifest
Source1002: privacy-manager-server-devel.manifest
Source1003: privacy-manager-client.manifest
Source1004: privacy-manager-client-devel.manifest
Source1005: capi-security-privacy-manager.manifest
Source1006: capi-security-privacy-manager-devel.manifest
BuildRequires: cmake
BuildRequires: gettext-tools
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(libtzplatform-config)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description
Privacy Management
%package -n privacy-manager-server-devel
Summary: Privacy Manager Server
Requires: privacy-manager-server = %{version}
%description -n privacy-manager-server-devel
privacy-manager server devel
%package -n privacy-manager-client
Summary: Privacy Manager client
Requires: privacy-manager-server = %{version}
%description -n privacy-manager-client
privacy-manager client
%package -n privacy-manager-client-devel
Summary: Privacy Manager client devel
Requires: privacy-manager-client = %{version}
%description -n privacy-manager-client-devel
Privacy Management(development files)
%package -n capi-security-privacy-manager
Summary: Privacy Manager API
Requires: privacy-manager-client = %{version}
%description -n capi-security-privacy-manager
The Privacy Manager API provides functions to get/set information
about privacy information of installed packages.
%package -n capi-security-privacy-manager-devel
Summary: Privacy Manager API (Development)
Requires: capi-security-privacy-manager = %{version}
%description -n capi-security-privacy-manager-devel
The Privacy Manager API provides functions to get/set
information about privacy information of installed packages.(DEV)
%prep
%setup -q
cp %{SOURCE1001} .
cp %{SOURCE1002} .
cp %{SOURCE1003} .
cp %{SOURCE1004} .
cp %{SOURCE1005} .
cp %{SOURCE1006} .
%build
%{!?build_type:%define build_type "Release"}
%cmake . -DPREFIX=%{_prefix} \
-DEXEC_PREFIX=%{_exec_prefix} \
-DLIBDIR=%{_libdir} \
-DINCLUDEDIR=%{_includedir} \
-DCMAKE_BUILD_TYPE=%{build_type} \
-DVERSION=%{version} \
-DFILTER_LISTED_PKG=ON \
-DPRIVACY_POPUP=OFF
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_prefix}/bin
cp res/usr/bin/* %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{TZ_SYS_DB}
cp res/opt/dbspace/.privacylist.db /%{buildroot}%{TZ_SYS_DB}
mkdir -p %{buildroot}%{_datadir}/privacy-manager/
cp res/usr/share/privacy-manager/privacy-filter-list.ini %{buildroot}%{_datadir}/privacy-manager/
%make_install
mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
#install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/privacy-manager-server.service
#ln -sf /usr/lib/systemd/system/privacy-manager-server.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/privacy-manager-server.service
%post -n privacy-manager-server
/sbin/ldconfig
echo "Check privacy DB"
if [ ! -f %{TZ_SYS_DB}/.privacy.db ]
then
echo "Create privacy DB"
%{_bindir}/privacy_manager_create_clean_db.sh
fi
chsmack -a 'User' %{TZ_SYS_DB}/.privacy.db*
chsmack -a 'User' %{TZ_SYS_DB}/.privacylist.db*
%postun -p /sbin/ldconfig
%post -n privacy-manager-client -p /sbin/ldconfig
%postun -n privacy-manager-client -p /sbin/ldconfig
%post -n capi-security-privacy-manager -p /sbin/ldconfig
%postun -n capi-security-privacy-manager -p /sbin/ldconfig
%files -n privacy-manager-server
%defattr(-,root,root,-)
%license LICENSE.APLv2
%manifest privacy-manager-server.manifest
%{_libdir}/libprivacy-manager-server.so*
%{TZ_SYS_DB}/.privacylist.db
/usr/bin/*
%files -n privacy-manager-server-devel
%{_includedir}/privacy_manager/server/privacy_manager_daemon.h
%{_libdir}/pkgconfig/privacy-manager-server.pc
%files -n privacy-manager-client
%defattr(-,root,root,-)
%license LICENSE.APLv2
%manifest privacy-manager-client.manifest
%{_libdir}/libprivacy-manager-client.so*
%{_datadir}/privacy-manager/privacy-filter-list.ini
%{_sysconfdir}/package-manager/parserlib/libprivileges.so
%files -n privacy-manager-client-devel
%defattr(-,root,root,-)
%manifest privacy-manager-client-devel.manifest
%{_includedir}/*
%{_libdir}/pkgconfig/privacy-manager-client.pc
%files -n capi-security-privacy-manager
%license LICENSE.APLv2
%{_libdir}/libcapi-security-privacy-manager.so.*
%manifest capi-security-privacy-manager.manifest
%files -n capi-security-privacy-manager-devel
%manifest capi-security-privacy-manager-devel.manifest
%{_includedir}/privacymgr/*.h
%{_libdir}/libcapi-security-privacy-manager.so
%{_libdir}/pkgconfig/capi-security-privacy-manager.pc
|