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
21 BuildRequires: gettext-tools
22 BuildRequires: pkgconfig(dbus-glib-1)
23 BuildRequires: pkgconfig(glib-2.0)
24 BuildRequires: pkgconfig(gio-2.0)
25 BuildRequires: pkgconfig(dlog)
26 BuildRequires: pkgconfig(bundle)
27 BuildRequires: pkgconfig(pkgmgr-info)
28 BuildRequires: pkgconfig(iniparser)
29 BuildRequires: pkgconfig(libtzplatform-config)
30 BuildRequires: pkgconfig(xdgmime)
31 BuildRequires: pkgconfig(db-util)
32 BuildRequires: pkgconfig(libsmack)
33 BuildRequires: pkgconfig(libsystemd-daemon)
34 BuildRequires: pkgconfig(minizip)
35 BuildRequires: pkgmgr-info-parser-devel
36 BuildRequires: pkgmgr-info-parser
40 Packager Manager client library package for packaging
44 Summary: Package Manager client library develpoment package
45 Requires: %{name} = %{version}-%{release}
46 Requires: shared-mime-info
47 Requires(post): pkgmgr
50 Package Manager client library develpoment package for packaging
54 Summary: Package Manager client library develpoment package
55 Requires: %{name} = %{version}-%{release}
56 Requires: pkgmgr-client
58 %description client-devel
59 Package Manager client library develpoment package for packaging
63 Summary: Library for installer frontend/backend
64 Requires: %{name} = %{version}-%{release}
66 %description installer
67 Library for installer frontend/backend for packaging.
70 %package installer-devel
71 Summary: Dev package for libpkgmgr-installer
72 Requires: %{name} = %{version}-%{release}
73 Requires: pkgmgr-installer = %{version}-%{release}
75 %description installer-devel
76 Dev package for libpkgmgr-installer for packaging.
80 Summary: Package Manager manifest parser develpoment package
81 Requires: %{name} = %{version}-%{release}
83 %description types-devel
84 Package Manager client types develpoment package for packaging
88 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
91 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
92 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
94 %__make %{?_smp_mflags}
98 rm -f %{buildroot}%{_bindir}/pkgmgr_backend_sample
99 rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
100 rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
102 mkdir -p %{buildroot}%{_tmpfilesdir}/
103 install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
105 mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
106 install -m 0644 %{SOURCE1008} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.service
107 install -m 0644 %{SOURCE1009} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.socket
108 ln -sf ../alarm_session_agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
110 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
111 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
112 mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
114 touch %{buildroot}%{_sysconfdir}/package-manager/backend/default
115 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/default
116 touch %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
117 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
125 # Create tizenglobalapp user needed for global installation
126 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
128 # change owner of TZ_USER_APP (/etc/skel/apps_rw) to tizenglobalapp
130 HOME="%{_sysconfdir}/skel"
131 . "%{_sysconfdir}/tizen-platform.conf"
133 chown %TZ_SYS_GLOBALAPP_USER:root $TZ_USER_APP
136 %post -n pkgmgr-client -p /sbin/ldconfig
138 %postun -n pkgmgr-client -p /sbin/ldconfig
140 %post -n pkgmgr-installer -p /sbin/ldconfig
142 %postun -n pkgmgr-installer -p /sbin/ldconfig
145 if [ ! -f %{TZ_SYS_DB}/.pkgmgr_parser.db ]; then
148 if [ -f /tmp/.preload_install_error ]; then
149 if [ ! -d /tmp/.postscript/error ]; then
150 mkdir -p /tmp/.postscript/error
152 echo "preload install failed" > /tmp/.postscript/error/%{name}_error
154 pkgcmd -l --global 1>&2
156 %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
158 rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh
161 %manifest %{name}.manifest
162 %defattr(-,root,root,-)
163 %dir %{_sysconfdir}/package-manager/backend
164 %dir %{_sysconfdir}/package-manager/backendlib
165 %{_sysconfdir}/package-manager/backend/*
166 %{_tmpfilesdir}/pkgmgr.conf
169 %manifest %{name}-client.manifest
171 %defattr(-,root,root,-)
172 %dir %{_sysconfdir}/package-manager
173 %config %{_sysconfdir}/package-manager/pkg_path.conf
174 %{_libdir}/libpkgmgr-client.so.*
177 %manifest %{name}-client-devel.manifest
178 %defattr(-,root,root,-)
180 %{_libdir}/pkgconfig/pkgmgr.pc
181 %{_libdir}/libpkgmgr-client.so
184 %manifest %{name}-installer.manifest
186 %defattr(-,root,root,-)
187 %{_libdir}/libpkgmgr_installer.so.*
188 %{_bindir}/pkgmgr-installer-signal-agent
189 %{_unitdir_user}/pkgmgr-installer-signal-agent.service
190 %{_unitdir_user}/pkgmgr-installer-signal-agent.socket
191 %{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket
193 %files installer-devel
194 %manifest %{name}-installer-devel.manifest
195 %defattr(-,root,root,-)
196 %dir %{_includedir}/pkgmgr
197 %{_includedir}/pkgmgr/*.h
198 %{_libdir}/pkgconfig/pkgmgr-installer.pc
199 %{_libdir}/libpkgmgr_installer.so
202 %manifest %{name}-types-devel.manifest
203 %defattr(-,root,root,-)
204 %{_includedir}/package-manager-*.h
205 %{_libdir}/pkgconfig/pkgmgr-types.pc