2 Summary: Packager Manager client library package
5 Group: Application Framework/Package Management
7 Source0: %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
9 Source1002: %{name}-client.manifest
10 Source1003: %{name}-client-devel.manifest
11 Source1004: %{name}-installer.manifest
12 Source1005: %{name}-installer-devel.manifest
13 Source1006: %{name}-types-devel.manifest
14 Source1007: %{name}.conf
15 Source1008: %{name}-installer-signal-agent.service
16 Source1009: %{name}-installer-signal-agent.socket
17 Source1010: %{name}-installer-signal-agent@.service
18 Source1011: %{name}-installer-signal-agent@.socket
19 Requires(post): /usr/sbin/useradd
20 Requires(post): capi-system-info
24 BuildRequires: gettext-tools
25 BuildRequires: pkgconfig(glib-2.0)
26 BuildRequires: pkgconfig(gio-2.0)
27 BuildRequires: pkgconfig(dlog)
28 BuildRequires: pkgconfig(bundle)
29 BuildRequires: pkgconfig(pkgmgr-info)
30 BuildRequires: pkgconfig(iniparser)
31 BuildRequires: pkgconfig(libtzplatform-config)
32 BuildRequires: pkgconfig(xdgmime)
33 BuildRequires: pkgconfig(db-util)
34 BuildRequires: pkgconfig(libsmack)
35 BuildRequires: pkgconfig(libsystemd-daemon)
36 BuildRequires: pkgconfig(minizip)
37 BuildRequires: pkgmgr-info-parser-devel
38 BuildRequires: pkgmgr-info-parser
42 Packager Manager client library package for packaging
46 Summary: Package Manager client library develpoment package
47 Requires: %{name} = %{version}-%{release}
48 Requires: shared-mime-info
49 Requires(post): pkgmgr
52 Package Manager client library develpoment package for packaging
56 Summary: Package Manager client library develpoment package
57 Requires: %{name} = %{version}-%{release}
58 Requires: pkgmgr-client
60 %description client-devel
61 Package Manager client library develpoment package for packaging
65 Summary: Library for installer frontend/backend
66 Requires: %{name} = %{version}-%{release}
68 %description installer
69 Library for installer frontend/backend for packaging.
72 %package installer-devel
73 Summary: Dev package for libpkgmgr-installer
74 Requires: %{name} = %{version}-%{release}
75 Requires: pkgmgr-installer = %{version}-%{release}
77 %description installer-devel
78 Dev package for libpkgmgr-installer for packaging.
82 Summary: Package Manager manifest parser develpoment package
83 Requires: %{name} = %{version}-%{release}
85 %description types-devel
86 Package Manager client types develpoment package for packaging
90 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
93 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
94 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
96 %__make %{?_smp_mflags}
100 rm -f %{buildroot}%{_bindir}/pkgmgr_backend_sample
101 rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
102 rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
104 mkdir -p %{buildroot}%{_tmpfilesdir}/
105 install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
107 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
108 install -m 0644 %{SOURCE1008} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.service
109 install -m 0644 %{SOURCE1009} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.socket
110 ln -sf ../pkgmgr-installer-signal-agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
112 mkdir -p %{buildroot}%{_unitdir}/user-sockets@.target.wants
113 install -m 0644 %{SOURCE1010} %{buildroot}%{_unitdir}/pkgmgr-installer-signal-agent@.service
114 install -m 0644 %{SOURCE1011} %{buildroot}%{_unitdir}/pkgmgr-installer-signal-agent@.socket
115 ln -sf ../pkgmgr-installer-signal-agent@.socket %{buildroot}%{_unitdir}/user-sockets@.target.wants/pkgmgr-installer-signal-agent@.socket
117 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
118 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
119 mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
121 touch %{buildroot}%{_sysconfdir}/package-manager/backend/default
122 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/default
123 touch %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
124 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
132 # Create tizenglobalapp user needed for global installation
133 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root -u 201
135 # change owner of TZ_USER_APP (/etc/skel/apps_rw) to tizenglobalapp
137 HOME="%{_sysconfdir}/skel"
138 . "%{_sysconfdir}/tizen-platform.conf"
140 chown %TZ_SYS_GLOBALAPP_USER:root $TZ_USER_APP
143 %post -n pkgmgr-client -p /sbin/ldconfig
145 %postun -n pkgmgr-client -p /sbin/ldconfig
147 %post -n pkgmgr-installer -p /sbin/ldconfig
149 %postun -n pkgmgr-installer -p /sbin/ldconfig
152 if [ ! -f %{TZ_SYS_DB}/.pkgmgr_parser.db ]; then
155 if [ -f /tmp/.preload_install_error ]; then
156 if [ ! -d /tmp/.postscript/error ]; then
157 mkdir -p /tmp/.postscript/error
159 echo "preload install failed" > /tmp/.postscript/error/%{name}_error
161 pkgcmd -l --global 1>&2
163 %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
165 rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
168 %manifest %{name}.manifest
169 %defattr(-,root,root,-)
170 %dir %{_sysconfdir}/package-manager/backend
171 %dir %{_sysconfdir}/package-manager/backendlib
172 %{_sysconfdir}/package-manager/backend/*
173 %{_tmpfilesdir}/pkgmgr.conf
176 %manifest %{name}-client.manifest
178 %defattr(-,root,root,-)
179 %dir %{_sysconfdir}/package-manager
180 %config %{_sysconfdir}/package-manager/pkg_path.conf
181 %{_libdir}/libpkgmgr-client.so.*
184 %manifest %{name}-client-devel.manifest
185 %defattr(-,root,root,-)
187 %{_libdir}/pkgconfig/pkgmgr.pc
188 %{_libdir}/libpkgmgr-client.so
191 %manifest %{name}-installer.manifest
193 %defattr(-,root,root,-)
194 %{_libdir}/libpkgmgr_installer.so.*
195 %{_bindir}/pkgmgr-installer-signal-agent
196 %{_unitdir_user}/pkgmgr-installer-signal-agent.service
197 %{_unitdir_user}/pkgmgr-installer-signal-agent.socket
198 %{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
199 %{_unitdir}/pkgmgr-installer-signal-agent@.service
200 %{_unitdir}/pkgmgr-installer-signal-agent@.socket
201 %{_unitdir}/user-sockets@.target.wants/pkgmgr-installer-signal-agent@.socket
203 %files installer-devel
204 %manifest %{name}-installer-devel.manifest
205 %defattr(-,root,root,-)
206 %dir %{_includedir}/pkgmgr
207 %{_includedir}/pkgmgr/*.h
208 %{_libdir}/pkgconfig/pkgmgr-installer.pc
209 %{_libdir}/libpkgmgr_installer.so
212 %manifest %{name}-types-devel.manifest
213 %defattr(-,root,root,-)
214 %{_includedir}/package-manager-*.h
215 %{_libdir}/pkgconfig/pkgmgr-types.pc