1 %define rpmlibdir %{_prefix}/lib
2 %define rpmhome %{rpmlibdir}/rpm
5 Summary: The Package Manager
7 Group: Base/Package Management
10 Url: http://www.rpm.org
11 BuildRequires: binutils
13 BuildRequires: file-devel
14 BuildRequires: findutils
16 BuildRequires: gettext-tools
17 BuildRequires: glibc-devel
19 BuildRequires: libacl-devel
20 BuildRequires: libattr-devel
21 BuildRequires: pkgconfig(bzip2)
22 BuildRequires: pkgconfig(libcap)
23 BuildRequires: libelf-devel
24 BuildRequires: libtool
25 BuildRequires: pkgconfig(lua)
27 BuildRequires: pkgconfig(ncurses)
29 BuildRequires: pkgconfig(popt)
30 BuildRequires: xz-devel
31 BuildRequires: pkgconfig(zlib)
32 BuildRequires: pkgconfig(nss)
33 BuildRequires: uthash-devel
34 BuildRequires: pkgconfig(libxml-2.0)
35 BuildRequires: pkgconfig(libsmack)
41 Source1: db-4.8.30.tar.bz2
42 Source2: db-4.8.30-integration.dif
43 Source4: rpm-tizen_macros
44 Source8: rpmconfigcheck
45 Source13: find-docs.sh
46 Source22: device-sec-policy
47 Source23: find-provides.ksyms
48 Source1001: rpm.manifest
49 Source0: rpm-%{version}.tar.bz2
51 # avoid bootstrapping problem
52 %define _binary_payload w9.bzdio
55 RPM Package Manager is the main tool for managing the software packages
58 RPM can be used to install and remove software packages. With rpm, it
59 is easy to update packages. RPM keeps track of all these manipulations
60 in a central database. This way it is possible to get an overview of
61 all installed packages. RPM also supports database queries.
64 Summary: Include Files and Libraries mandatory for Development
65 Requires: rpm = %{version}
66 Requires: pkgconfig(popt)
69 This package contains the RPM C library and header files. These
70 development files will simplify the process of writing programs which
71 manipulate RPM packages and databases and are intended to make it
72 easier to create graphical package managers or any other tools that
73 need an intimate knowledge of RPM packages in order to function.
76 Summary: Tools and Scripts to create rpm packages
77 Requires: rpm = %{version}
78 Provides: rpmbuild rpm:%{_bindir}/rpmbuild
90 If you want to build a rpm, you need this package. It provides rpmbuild
91 and requires some packages that are usually required
93 %package security-plugin
94 Summary: MSM security plugin for rpm
95 Requires: rpm = %{version}-%{release}
99 %description security-plugin
100 This package contains the MSM security plugin for rpm that performs
101 security-related functionality.
103 %package -n python-rpm
104 Summary: Python Bindings for Manipulating RPM Packages
105 Requires: rpm = %{version}
106 BuildRequires: pkgconfig(python)
108 %description -n python-rpm
109 The python-rpm package contains a module that permits applications
110 written in the Python programming language to use the interface
111 supplied by RPM Package Manager libraries.
113 This package should be installed if you want to develop Python programs
114 that will manipulate RPM packages and databases.
117 %setup -q -n rpm-%{version}
123 # will get linked from db3
126 if [ -s %{_sysconfdir}/rpm/tizen_macros ]; then
127 cp -a %{_sysconfdir}/rpm/tizen_macros %{SOURCE4}
129 cp -a %{SOURCE4} tizen_macros
134 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
136 export CFLAGS="%{optflags} -ffunction-sections"
137 export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
139 export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
143 --disable-dependency-tracking \
149 --with-vendor=tizen \
155 mkdir -p %{buildroot}%{rpmlibdir}
156 mkdir -p %{buildroot}%{_datadir}/locale
157 ln -s ../share/locale %{buildroot}%{rpmlibdir}/locale
159 install -m 644 db3/db.h %{buildroot}%{_includedir}/rpm
160 mkdir -p %{buildroot}%{_sysconfdir}/rpm
161 cp -a tizen_macros %{buildroot}%{rpmhome}
162 mkdir -p %{buildroot}%{rpmhome}/tizen
163 install -m 755 %{SOURCE13} %{buildroot}%{rpmhome}/tizen
164 install -m 755 %{SOURCE23} %{buildroot}%{rpmhome}
165 install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/device-sec-policy
166 install -m 644 %{SOURCE22} %{buildroot}%{__plugindir}/msm-device-sec-policy
167 ln -s ../tizen_macros %{buildroot}%{rpmhome}/tizen/macros
168 for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
169 mkdir -p %{buildroot}%{_usrsrc}/packages/$d
170 chmod 755 %{buildroot}%{_usrsrc}/packages/$d
172 for d in %{buildroot}%{rpmhome}/platform/*-linux/macros ; do
173 dd=${d%%-linux/macros}
175 mkdir -p %{buildroot}%{_usrsrc}/packages/RPMS/$dd
176 chmod 755 %{buildroot}%{_usrsrc}/packages/RPMS/$dd
178 mkdir -p %{buildroot}%{_localstatedir}/lib/rpm
179 gzip -9 %{buildroot}%{_mandir}/man[18]/*.[18]
180 export RPM_BUILD_ROOT
182 rm -rf doc/manual/Makefile*
183 rm -f %{buildroot}%{rpmlibdir}/rpmpopt
184 rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk}
185 rm -f %{buildroot}%{_datadir}/locale/de/LC_MESSAGES/rpm.mo
186 rm -f %{buildroot}%{rpmhome}/cpanflute %{buildroot}%{rpmhome}/cpanflute2
187 install -m 755 scripts/find-supplements %{buildroot}%{rpmhome}
188 install -m 755 scripts/find-supplements.ksyms %{buildroot}%{rpmhome}
189 install -m 755 scripts/firmware.prov %{buildroot}%{rpmhome}
190 install -m 755 scripts/debuginfo.prov %{buildroot}%{rpmhome}
191 rm -f %{buildroot}%{rpmlibdir}/locale %{buildroot}%{rpmlibdir}/rpmrc
192 mkdir -p %{buildroot}%{_sysconfdir}/rpm
193 chmod 755 %{buildroot}%{_sysconfdir}/rpm
194 mkdir -p %{buildroot}%{rpmhome}/macros.d
195 # remove some nonsense or non-working scripts
196 for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
197 magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
198 brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
199 rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
201 rm -f %{buildroot}%{rpmhome}/$f
203 for i in %{_datadir}/automake-*/*; do
204 if test -f "$i" && test -f %{buildroot}%{rpmhome}/"${i##*/}"; then
205 rm -f %{buildroot}%{rpmhome}/"${i##*/}"
208 %ifarch aarch64 ppc64le
209 install -m 755 config.guess %{buildroot}/usr/lib/rpm
210 install -m 755 config.sub %{buildroot}/usr/lib/rpm
212 rm -f %{buildroot}%{_libdir}/*.la
213 rm -f %{buildroot}%{__plugindir}/*.la
215 %fdupes %{buildroot}%{rpmhome}/platform
217 sh %{buildroot}%{rpmhome}/find-lang.sh %{buildroot} rpm
219 %ifarch armv7hl armv7l
220 # rpm is using the host_cpu as default for the platform,
221 #but armv7hl is not known by the kernel.
222 # so we need to enforce the platform here.
223 echo -n %{_target_cpu}-tizen-linux-gnueabi > %{buildroot}%{_sysconfdir}/rpm/platform
228 test -f %{_dbpath}/Packages || rpm --initdb
229 rm -f %{_dbpath}/Filemd5s \
230 %{_dbpath}/Filedigests \
231 %{_dbpath}/Requireversion \
232 %{_dbpath}/Provideversion
238 %manifest %{name}.manifest
239 %defattr(-,root,root)
249 %attr(0755, root, root) %dir %{rpmhome}
254 %{rpmhome}/tizen/macros
255 %{rpmhome}/tizen_macros
260 %{__plugindir}/exec.so
261 %{_libdir}/librpm.so.*
262 %{_libdir}/librpmio.so.*
263 %{_libdir}/librpmbuild.so.*
264 %{_libdir}/librpmsign.so.*
265 %dir %{_localstatedir}/lib/rpm
266 %dir %attr(755,root,root) %{_usrsrc}/packages/BUILD
267 %dir %attr(755,root,root) %{_usrsrc}/packages/SPECS
268 %dir %attr(755,root,root) %{_usrsrc}/packages/SOURCES
269 %dir %attr(755,root,root) %{_usrsrc}/packages/SRPMS
270 %dir %attr(755,root,root) %{_usrsrc}/packages/RPMS
271 %dir %attr(755,root,root) %{_usrsrc}/packages/BUILDROOT
272 %dir %attr(755,root,root) %{_usrsrc}/packages/RPMS/*
275 %manifest %{name}.manifest
276 %defattr(-,root,root)
281 %{rpmhome}/tizen/find-*
283 %{rpmhome}/find-supplements*
286 %{rpmhome}/find-debuginfo.sh
287 %{rpmhome}/find-lang.sh
288 %{rpmhome}/find-provides.ksyms
289 %{rpmhome}/*provides*
290 %{rpmhome}/*requires*
296 %ifarch aarch64 ppc64le
301 %manifest %{name}.manifest
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/rpmgraph
306 %{_libdir}/librpmbuild.so
307 %{_libdir}/librpmio.so
308 %{_libdir}/librpmsign.so
309 %{_libdir}/pkgconfig/rpm.pc
311 %files security-plugin
312 %manifest %{name}.manifest
313 %defattr(-,root,root)
314 %{__plugindir}/msm.so
315 %{__plugindir}/msm-device-sec-policy
316 %config(noreplace) %{_sysconfdir}/device-sec-policy
319 %defattr(-,root,root)
320 %{python_sitearch}/rpm
321 %attr(755,root,root) %{python_sitearch}/rpm/transaction.py