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 Requires(post): /usr/sbin/useradd
18 Requires(post): capi-system-info
22 BuildRequires: gettext-tools
23 BuildRequires: pkgconfig(dbus-glib-1)
24 BuildRequires: pkgconfig(glib-2.0)
25 BuildRequires: pkgconfig(gio-2.0)
26 BuildRequires: pkgconfig(dlog)
27 BuildRequires: pkgconfig(bundle)
28 BuildRequires: pkgconfig(pkgmgr-info)
29 BuildRequires: pkgconfig(iniparser)
30 BuildRequires: pkgconfig(libtzplatform-config)
31 BuildRequires: pkgconfig(xdgmime)
32 BuildRequires: pkgconfig(db-util)
33 BuildRequires: pkgconfig(libsmack)
34 BuildRequires: pkgconfig(libsystemd-daemon)
35 BuildRequires: pkgconfig(minizip)
36 BuildRequires: pkgmgr-info-parser-devel
37 BuildRequires: pkgmgr-info-parser
41 Packager Manager client library package for packaging
45 Summary: Package Manager client library develpoment package
46 Requires: %{name} = %{version}-%{release}
47 Requires: shared-mime-info
48 Requires(post): pkgmgr
51 Package Manager client library develpoment package for packaging
55 Summary: Package Manager client library develpoment package
56 Requires: %{name} = %{version}-%{release}
57 Requires: pkgmgr-client
59 %description client-devel
60 Package Manager client library develpoment package for packaging
64 Summary: Library for installer frontend/backend
65 Requires: %{name} = %{version}-%{release}
67 %description installer
68 Library for installer frontend/backend for packaging.
71 %package installer-devel
72 Summary: Dev package for libpkgmgr-installer
73 Requires: %{name} = %{version}-%{release}
74 Requires: pkgmgr-installer = %{version}-%{release}
76 %description installer-devel
77 Dev package for libpkgmgr-installer for packaging.
81 Summary: Package Manager manifest parser develpoment package
82 Requires: %{name} = %{version}-%{release}
84 %description types-devel
85 Package Manager client types develpoment package for packaging
89 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
92 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
93 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
95 %__make %{?_smp_mflags}
99 rm -f %{buildroot}%{_bindir}/pkgmgr_backend_sample
100 rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
101 rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
103 mkdir -p %{buildroot}%{_tmpfilesdir}/
104 install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
106 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
107 install -m 0644 %{SOURCE1008} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.service
108 install -m 0644 %{SOURCE1009} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.socket
109 ln -sf ../alarm_session_agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
111 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
112 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
113 mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
115 touch %{buildroot}%{_sysconfdir}/package-manager/backend/default
116 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/default
117 touch %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
118 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
126 # Create tizenglobalapp user needed for global installation
127 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
129 # change owner of TZ_USER_APP (/etc/skel/apps_rw) to tizenglobalapp
131 HOME="%{_sysconfdir}/skel"
132 . "%{_sysconfdir}/tizen-platform.conf"
134 chown %TZ_SYS_GLOBALAPP_USER:root $TZ_USER_APP
137 %post -n pkgmgr-client -p /sbin/ldconfig
139 %postun -n pkgmgr-client -p /sbin/ldconfig
141 %post -n pkgmgr-installer -p /sbin/ldconfig
143 %postun -n pkgmgr-installer -p /sbin/ldconfig
146 if [ ! -f %{TZ_SYS_DB}/.pkgmgr_parser.db ]; then
149 if [ -f /tmp/.preload_install_error ]; then
150 if [ ! -d /tmp/.postscript/error ]; then
151 mkdir -p /tmp/.postscript/error
153 echo "preload install failed" > /tmp/.postscript/error/%{name}_error
155 pkgcmd -l --global 1>&2
157 %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
159 rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
162 %manifest %{name}.manifest
163 %defattr(-,root,root,-)
164 %dir %{_sysconfdir}/package-manager/backend
165 %dir %{_sysconfdir}/package-manager/backendlib
166 %{_sysconfdir}/package-manager/backend/*
167 %{_tmpfilesdir}/pkgmgr.conf
170 %manifest %{name}-client.manifest
172 %defattr(-,root,root,-)
173 %dir %{_sysconfdir}/package-manager
174 %config %{_sysconfdir}/package-manager/pkg_path.conf
175 %{_libdir}/libpkgmgr-client.so.*
178 %manifest %{name}-client-devel.manifest
179 %defattr(-,root,root,-)
181 %{_libdir}/pkgconfig/pkgmgr.pc
182 %{_libdir}/libpkgmgr-client.so
185 %manifest %{name}-installer.manifest
187 %defattr(-,root,root,-)
188 %{_libdir}/libpkgmgr_installer.so.*
189 %{_bindir}/pkgmgr-installer-signal-agent
190 %{_unitdir_user}/pkgmgr-installer-signal-agent.service
191 %{_unitdir_user}/pkgmgr-installer-signal-agent.socket
192 %{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
194 %files installer-devel
195 %manifest %{name}-installer-devel.manifest
196 %defattr(-,root,root,-)
197 %dir %{_includedir}/pkgmgr
198 %{_includedir}/pkgmgr/*.h
199 %{_libdir}/pkgconfig/pkgmgr-installer.pc
200 %{_libdir}/libpkgmgr_installer.so
203 %manifest %{name}-types-devel.manifest
204 %defattr(-,root,root,-)
205 %{_includedir}/package-manager-*.h
206 %{_libdir}/pkgconfig/pkgmgr-types.pc