Do not create home directory for tizenglobalapp user
[platform/core/appfw/slp-pkgmgr.git] / packaging / pkgmgr.spec
1 %bcond_with wayland
2
3 Name:       pkgmgr
4 Summary:    Packager Manager client library package
5 Version:    0.2.89
6 Release:    0
7 Group:      Application Framework/Package Management
8 License:    Apache-2.0
9 Source0:    %{name}-%{version}.tar.gz
10 Source1001: %{name}.manifest
11 Source1002: %{name}-client.manifest
12 Source1003: %{name}-client-devel.manifest
13 Source1004: %{name}-installer.manifest
14 Source1005: %{name}-installer-devel.manifest
15 Source1006: %{name}-types-devel.manifest
16 Source1007: %{name}.conf
17 Requires:   pwdutils
18
19 BuildRequires:  cmake
20 BuildRequires:  unzip
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(security-manager)
31 BuildRequires:  pkgconfig(xdgmime)
32 BuildRequires:  pkgconfig(db-util)
33 BuildRequires:  pkgconfig(libsmack)
34 BuildRequires:  pkgmgr-info-parser-devel
35 BuildRequires:  pkgmgr-info-parser
36 BuildRequires:  fdupes
37
38 %description
39 Packager Manager client library package for packaging
40
41
42 %package client
43 Summary:    Package Manager client library develpoment package
44 Requires:   %{name} = %{version}-%{release}
45 Requires: shared-mime-info
46 Requires(post): pkgmgr
47
48 %description client
49 Package Manager client library develpoment package for packaging
50
51
52 %package client-devel
53 Summary:    Package Manager client library develpoment package
54 Requires:   %{name} = %{version}-%{release}
55 Requires: pkgmgr-client
56
57 %description client-devel
58 Package Manager client library develpoment package for packaging
59
60
61 %package installer
62 Summary:    Library for installer frontend/backend
63 Requires:   %{name} = %{version}-%{release}
64
65 %description installer
66 Library for installer frontend/backend for packaging.
67
68
69 %package installer-devel
70 Summary:    Dev package for libpkgmgr-installer
71 Requires:   %{name} = %{version}-%{release}
72
73 %description installer-devel
74 Dev package for libpkgmgr-installer for packaging.
75
76
77 %package types-devel
78 Summary:    Package Manager manifest parser develpoment package
79 Requires:   %{name} = %{version}-%{release}
80
81 %description types-devel
82 Package Manager client types develpoment package for packaging
83
84
85 %prep
86 %setup -q
87 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
88
89 %build
90 %cmake .
91
92 %__make %{?_smp_mflags}
93
94 %install
95 %make_install
96 rm -f  %{buildroot}%{_bindir}/pkgmgr_backend_sample
97 rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
98 rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
99
100 mkdir -p %{buildroot}%{_tmpfilesdir}/
101 install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
102
103 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
104 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
105 mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
106
107 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/rpm
108 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/rpm
109 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/pkg
110 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkg
111 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/getsize
112 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/getsize
113 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/clearcache
114 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/clearcache
115
116
117 %fdupes %{buildroot}
118
119 %post
120 /sbin/ldconfig
121
122 # Create tizenglobalapp user needed for global installation
123 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
124
125 %post -n pkgmgr-client -p /sbin/ldconfig
126
127 %postun -n pkgmgr-client -p /sbin/ldconfig
128
129 %post -n pkgmgr-installer -p /sbin/ldconfig
130
131 %postun -n pkgmgr-installer -p /sbin/ldconfig
132
133
134 %files
135 %manifest %{name}.manifest
136 %defattr(-,root,root,-)
137 %{_includedir}/package-manager-debug.h
138 %{_includedir}/pkgmgr/comm_config.h
139 %dir %{_sysconfdir}/package-manager/backend
140 %dir %{_sysconfdir}/package-manager/backendlib
141 %{_sysconfdir}/package-manager/backend/*
142 %{_tmpfilesdir}/pkgmgr.conf
143 %exclude %{_includedir}/pkgmgr/comm_client.h
144 %exclude %{_sysconfdir}/package-manager/server/queue_status
145
146 %files client
147 %manifest %{name}-client.manifest
148 %defattr(-,root,root,-)
149 %dir %{_sysconfdir}/package-manager
150 %config %{_sysconfdir}/package-manager/pkg_path.conf
151 %{_libdir}/libpkgmgr-client.so.*
152
153 %files client-devel
154 %manifest %{name}-client-devel.manifest
155 %defattr(-,root,root,-)
156 %{_includedir}/package-manager.h
157 %{_libdir}/pkgconfig/pkgmgr.pc
158 %{_libdir}/libpkgmgr-client.so
159
160 %files installer
161 %manifest %{name}-installer.manifest
162 %defattr(-,root,root,-)
163 %{_libdir}/libpkgmgr_installer.so.*
164 %{_libdir}/libpkgmgr_installer_client.so.*
165
166 %files installer-devel
167 %manifest %{name}-installer-devel.manifest
168 %defattr(-,root,root,-)
169 %dir %{_includedir}/pkgmgr
170 %{_includedir}/pkgmgr/pkgmgr_installer.h
171 %{_libdir}/pkgconfig/pkgmgr-installer.pc
172 %{_libdir}/pkgconfig/pkgmgr-installer-client.pc
173 %{_libdir}/libpkgmgr_installer.so
174 %{_libdir}/libpkgmgr_installer_client.so
175
176 %files types-devel
177 %manifest %{name}-types-devel.manifest
178 %defattr(-,root,root,-)
179 %{_includedir}/package-manager-types.h
180 %{_includedir}/package-manager-plugin.h
181 %{_libdir}/pkgconfig/pkgmgr-types.pc