remove pwdutils dependency
[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
18 BuildRequires:  cmake
19 BuildRequires:  unzip
20 BuildRequires:  gettext-tools
21 BuildRequires:  pkgconfig(dbus-glib-1)
22 BuildRequires:  pkgconfig(glib-2.0)
23 BuildRequires:  pkgconfig(gio-2.0)
24 BuildRequires:  pkgconfig(dlog)
25 BuildRequires:  pkgconfig(bundle)
26 BuildRequires:  pkgconfig(pkgmgr-info)
27 BuildRequires:  pkgconfig(iniparser)
28 BuildRequires:  pkgconfig(libtzplatform-config)
29 BuildRequires:  pkgconfig(security-manager)
30 BuildRequires:  pkgconfig(xdgmime)
31 BuildRequires:  pkgconfig(db-util)
32 BuildRequires:  pkgconfig(libsmack)
33 BuildRequires:  pkgmgr-info-parser-devel
34 BuildRequires:  pkgmgr-info-parser
35 BuildRequires:  fdupes
36
37 %description
38 Packager Manager client library package for packaging
39
40
41 %package client
42 Summary:    Package Manager client library develpoment package
43 Requires:   %{name} = %{version}-%{release}
44 Requires: shared-mime-info
45 Requires(post): pkgmgr
46
47 %description client
48 Package Manager client library develpoment package for packaging
49
50
51 %package client-devel
52 Summary:    Package Manager client library develpoment package
53 Requires:   %{name} = %{version}-%{release}
54 Requires: pkgmgr-client
55
56 %description client-devel
57 Package Manager client library develpoment package for packaging
58
59
60 %package installer
61 Summary:    Library for installer frontend/backend
62 Requires:   %{name} = %{version}-%{release}
63
64 %description installer
65 Library for installer frontend/backend for packaging.
66
67
68 %package installer-devel
69 Summary:    Dev package for libpkgmgr-installer
70 Requires:   %{name} = %{version}-%{release}
71
72 %description installer-devel
73 Dev package for libpkgmgr-installer for packaging.
74
75
76 %package types-devel
77 Summary:    Package Manager manifest parser develpoment package
78 Requires:   %{name} = %{version}-%{release}
79
80 %description types-devel
81 Package Manager client types develpoment package for packaging
82
83 %prep
84 %setup -q
85 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} .
86
87 %build
88 %cmake .
89
90 %__make %{?_smp_mflags}
91
92 %install
93 %make_install
94 rm -f  %{buildroot}%{_bindir}/pkgmgr_backend_sample
95 rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so
96 rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so
97
98 mkdir -p %{buildroot}%{_tmpfilesdir}/
99 install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf
100
101 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend
102 mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib
103 mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade
104
105 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/rpm
106 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/rpm
107 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/pkg
108 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkg
109 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/getsize
110 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/getsize
111 touch  %{buildroot}%{_sysconfdir}/package-manager/backend/clearcache
112 chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/clearcache
113
114
115 %fdupes %{buildroot}
116
117 %post
118 /sbin/ldconfig
119
120 # Create tizenglobalapp user needed for global installation
121 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
122
123 %post -n pkgmgr-client -p /sbin/ldconfig
124
125 %postun -n pkgmgr-client -p /sbin/ldconfig
126
127 %post -n pkgmgr-installer -p /sbin/ldconfig
128
129 %postun -n pkgmgr-installer -p /sbin/ldconfig
130
131
132 %files
133 %manifest %{name}.manifest
134 %defattr(-,root,root,-)
135 %dir %{_sysconfdir}/package-manager/backend
136 %dir %{_sysconfdir}/package-manager/backendlib
137 %{_sysconfdir}/package-manager/backend/*
138 %{_tmpfilesdir}/pkgmgr.conf
139
140 %files client
141 %manifest %{name}-client.manifest
142 %defattr(-,root,root,-)
143 %dir %{_sysconfdir}/package-manager
144 %config %{_sysconfdir}/package-manager/pkg_path.conf
145 %{_libdir}/libpkgmgr-client.so.*
146
147 %files client-devel
148 %manifest %{name}-client-devel.manifest
149 %defattr(-,root,root,-)
150 %{_includedir}/package-manager.h
151 %{_libdir}/pkgconfig/pkgmgr.pc
152 %{_libdir}/libpkgmgr-client.so
153
154 %files installer
155 %manifest %{name}-installer.manifest
156 %defattr(-,root,root,-)
157 %{_libdir}/libpkgmgr_installer.so.*
158 %{_libdir}/libpkgmgr_installer_client.so.*
159
160 %files installer-devel
161 %manifest %{name}-installer-devel.manifest
162 %defattr(-,root,root,-)
163 %dir %{_includedir}/pkgmgr
164 %{_includedir}/pkgmgr/pkgmgr_installer.h
165 %{_libdir}/pkgconfig/pkgmgr-installer.pc
166 %{_libdir}/pkgconfig/pkgmgr-installer-client.pc
167 %{_libdir}/libpkgmgr_installer.so
168 %{_libdir}/libpkgmgr_installer_client.so
169
170 %files types-devel
171 %manifest %{name}-types-devel.manifest
172 %defattr(-,root,root,-)
173 %{_includedir}/package-manager-types.h
174 %{_includedir}/package-manager-plugin.h
175 %{_includedir}/package-manager-debug.h
176 %{_includedir}/pkgmgr/comm_config.h
177 %{_libdir}/pkgconfig/pkgmgr-types.pc