rpm/rpm.spec

827 lines
23 KiB
RPMSpec
Raw Normal View History

%define commit 1d46592aea3a9df9a960793f5871978cc3ec9e1e
%define short_commit %(echo %{commit} | head -c 4)
# When updating, change commit hash above to the commit in
# https://abf.io/soft/rpm5 that you want to build from
# and bump "Release".
%{?build_selinux}%{?!build_selinux:%bcond_with selinux}
%{?build_squirrel}%{?!build_squirrel:%bcond_without squirrel}
2014-05-26 16:58:34 +04:00
%bcond_with bootstrap
2012-02-01 14:15:49 +04:00
%bcond_with debug
2012-08-01 14:59:23 +04:00
%bcond_without ossp_uuid
2012-02-01 14:15:49 +04:00
%bcond_without augeas
#XXX: this macro is a bit awkward, better can be done!
%if %{with bootstrap}
2014-05-26 10:25:09 +04:00
%bcond_with perl
%bcond_with python
2012-08-01 14:59:23 +04:00
%bcond_with tcl
%bcond_with embed
2014-05-26 09:59:38 +04:00
%bcond_with docs
2012-02-01 14:15:49 +04:00
%bcond_with sqlite
2014-05-26 13:18:49 +04:00
%define __noautoreq 'perl\\(XML::LibXML\\)'
2012-02-01 14:15:49 +04:00
%else
%bcond_without perl
%bcond_without python
2012-08-01 14:59:23 +04:00
%bcond_without tcl
%bcond_without embed
2014-05-26 12:24:05 +04:00
%bcond_without docs
2012-08-01 14:59:23 +04:00
# use what's in berkeley db
%bcond_with sqlite
2012-02-01 14:15:49 +04:00
%endif
%bcond_with notyet
%if %{with notyet}
%bcond_without xar
%bcond_without ruby
%bcond_without js
%else
%bcond_with xar
%bcond_with ruby
%bcond_with js
%endif
%if %{with debug}
%global debugcflags %{debugcflags} -g3 -O0 -DDEBUG
2012-02-01 14:15:49 +04:00
%endif
2012-08-01 14:59:23 +04:00
# can probably be restored now..
%if %{with bootstrap}
#include %%{_sourcedir}/bootstrap.spec
%endif
2012-02-01 14:15:49 +04:00
2012-08-01 14:59:23 +04:00
%define bdb db52
2012-02-01 14:15:49 +04:00
2015-12-22 02:22:24 +10:00
%define libver 5.4
%define minorver 10
2012-02-01 14:15:49 +04:00
2015-12-22 02:22:24 +10:00
%define librpmname %mklibname rpm %{libver}
%define librpmnamedevel %mklibname rpm -d
%define librpmstatic %mklibname rpm -d -s
2012-02-01 14:15:49 +04:00
Summary: The RPM package management system
Name: rpm
Epoch: 1
2012-08-01 14:59:23 +04:00
Version: %{libver}.%{minorver}
Release: 113.git%{short_commit}
2012-08-01 14:59:23 +04:00
License: LGPLv2.1+
2012-02-01 14:15:49 +04:00
Group: System/Configuration/Packaging
Url: http://rpm5.org/
Source0: https://abf.io/soft/rpm5/archive/rpm5-%{commit}.tar.gz
2012-02-01 14:15:49 +04:00
# These are a bit dated with a lot of redundant macros and many of them no
# of use at all anymore! Should ideally just contain the macros different
# from the default; _arch, optflags, _lib & _multilib*.
# stripping away the rest (along with os specificity) and create a resulting
# cpu-macros.tar.gz to push upstream would seem like a sane improvement.
2012-08-01 14:59:23 +04:00
Source2: rpm.rpmlintrc
2012-02-01 14:15:49 +04:00
Source3: cpu-os-macros.tar.gz
2015-12-22 02:22:24 +10:00
Source5: RPMBDB-0.1.tar.xz
2017-09-23 13:59:31 +03:00
Source6: autosetup.macros
%if %{with debug}
# git diff master debug
Patch0: debug.patch
%endif
2018-12-25 01:21:08 +03:00
2012-08-01 14:59:23 +04:00
BuildRequires: autoconf >= 2.57
BuildRequires: bzip2-devel
BuildRequires: automake >= 1.8
BuildRequires: elfutils-devel
BuildRequires: sed >= 4.0.3
BuildRequires: beecrypt-devel >= 4.2.1-8
BuildRequires: pkgconfig(libgcrypt)
2012-08-01 14:59:23 +04:00
BuildRequires: ed
BuildRequires: gettext-devel
BuildRequires: byacc
BuildRequires: pkgconfig(neon)
2012-10-18 00:16:00 +04:00
#BuildRequires: rpm-%{_target_vendor}-setup-build
BuildRequires: rpm-mandriva-setup-build
2012-08-01 14:59:23 +04:00
BuildRequires: readline-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libpcreposix)
%if %{mdvver} >= 201900
# libnsl.so was removed from glibc-devel
BuildRequires: pkgconfig(libnsl)
%endif
2012-08-01 14:59:23 +04:00
BuildRequires: acl-devel
BuildRequires: magic-devel
BuildRequires: pkgconfig(popt) >= 1.15
BuildRequires: libxml2-devel >= 2.7.8-9
2012-08-01 14:59:23 +04:00
# we're now building with internal..
#BuildRequires: pkgconfig(lua)
# needed by internal lua
BuildRequires: expat-devel
2012-02-01 14:15:49 +04:00
%ifarch %{ix86} x86_64 ppc ppc64 ia64
2012-08-01 14:59:23 +04:00
BuildRequires: pkgconfig(libcpuinfo)
2012-02-01 14:15:49 +04:00
%endif
2012-08-01 14:59:23 +04:00
BuildRequires: syck-devel
BuildRequires: keyutils-devel
BuildRequires: gomp-devel
BuildRequires: pkgconfig(gnutls)
BuildRequires: gnupg2
2012-02-01 14:15:49 +04:00
# required by parts of test suite...
BuildRequires: wget
# Should we prefer internal xar in stead? internal xar contains at least
# lzma/xz patches, what's the state of these and upstream?
# does internal xar contain any other rpm specific patches as well, or..?
%if %{with xar}
BuildRequires: xar-devel
%endif
BuildRequires: %{bdb}-devel >= 5.2.36-3
2012-02-01 14:15:49 +04:00
# required by test suite
BuildRequires: %{bdb}-utils
%if %{with perl}
BuildRequires: perl-devel
%endif
%if %{with python}
BuildRequires: python-devel
2012-02-01 14:15:49 +04:00
%endif
%if %{with js}
2012-08-01 14:59:23 +04:00
BuildRequires: pkgconfig(mozjs185)
2012-02-01 14:15:49 +04:00
%endif
%if %{with ruby}
BuildRequires: ruby-devel
%endif
%if %{with tcl}
2012-08-01 14:59:23 +04:00
BuildRequires: tcl-devel
%endif
%if %{with squirrel}
BuildRequires: squirrel-devel
2012-02-01 14:15:49 +04:00
%endif
%if %{with selinux}
BuildRequires: selinux-devel
2019-07-27 15:23:51 +00:00
BuildRequires: semanage-devel
BuildRequires: sepol-devel
%endif
2012-02-01 14:15:49 +04:00
%if %{with docs}
2012-08-01 14:59:23 +04:00
BuildRequires: doxygen
BuildRequires: graphviz
#BuildRequires: texlive
2012-02-01 14:15:49 +04:00
%endif
%if %{with sqlite}
2012-08-01 14:59:23 +04:00
BuildRequires: pkgconfig(sqlite3)
2012-02-01 14:15:49 +04:00
%endif
2012-08-01 14:59:23 +04:00
%if %{with ossp_uuid}
BuildRequires: pkgconfig(ossp-uuid)
2012-02-01 14:15:49 +04:00
%endif
%if %{with augeas}
2012-08-01 14:59:23 +04:00
BuildRequires: pkgconfig(augeas)
2012-02-01 14:15:49 +04:00
%endif
%if %{with debug}
BuildRequires: pkgconfig(valgrind)
%endif
2012-08-01 14:59:23 +04:00
BuildRequires: spec-helper >= 0.31.12
BuildRequires: stdc++-static-devel >= 4.6.2-8
2012-08-01 14:59:23 +04:00
BuildRequires: elfutils >= 0.153
BuildRequires: libtool >= 2.4.2-3
2012-08-01 14:59:23 +04:00
Requires: cpio
Requires: gawk
Requires: mktemp
Requires: update-alternatives
2012-02-01 14:15:49 +04:00
Requires: %{bdb}_recover
Suggests: %{bdb}-utils
Requires: %{librpmname} = %{EVRD}
Requires(pre): %{librpmname} = %{EVRD}
2012-02-01 14:15:49 +04:00
Conflicts: rpm-build < 1:5.3.10-0.20110422.3
Requires(pre): coreutils
%rename rpmconstant
%rename multiarch-utils
2012-08-01 14:59:23 +04:00
%rename rpm-manbo-setup
2012-10-18 00:51:11 +04:00
#rename rpm-%{_target_vendor}-setup
2012-10-18 00:57:52 +04:00
%rename rpm-mandriva-setup
2012-02-01 14:15:49 +04:00
2012-08-01 20:49:55 +04:00
%description
2012-02-01 14:15:49 +04:00
RPM is a powerful command line driven package management system capable of
installing, uninstalling, verifying, querying, and updating software packages.
Each software package consists of an archive of files along with information
about the package like its version, a description, etc.
2015-12-22 02:22:24 +10:00
# TODO: review which files goes into what packages...?
%files -f %{name}.lang
%doc CHANGES doc/manual/[a-z]*
%if %{with docs}
%exclude %{_docdir}/rpm/html
%endif
/bin/rpm
%{_bindir}/multiarch-dispatch
%{_bindir}/rpmconstant*
%{_bindir}/rpm2cpio*
%{_rpmhome}/bin/augtool
%{_rpmhome}/bin/chroot
%{_rpmhome}/bin/cp
%{_rpmhome}/bin/dbconvert
%{_rpmhome}/bin/find
#%%{_rpmhome}/bin/grep
#%%{_rpmhome}/bin/lua
%{_rpmhome}/bin/mtree
%{_rpmhome}/bin/mgo
#%%{_rpmhome}/bin/rc
%{_rpmhome}/bin/rpmdbchk
%{_rpmhome}/bin/rpmspecdump
%{_rpmhome}/bin/wget
%if %{with xar}
%{_rpmhome}/bin/txar
%endif
%{_rpmhome}/dbconvert.sh
%{_rpmhome}/rpm.*
%{_rpmhome}/rpm2cpio
%{_rpmhome}/rpmdb_loadcvt
%{_rpmhome}/tgpg
%dir %{_localstatedir}/lib/rpm
%dir %{_localstatedir}/lib/rpm/log
%dir %{_localstatedir}/lib/rpm/tmp
%{_rpmhome}/macros.d/*
%{_rpmhome}/cpuinfo.yaml
%{_rpmhome}/macros
%{_rpmhome}/rpmpopt
%{_rpmhome}/platform/*/macros
%config(noreplace) %{_localstatedir}/lib/rpm/DB_CONFIG
%dir %{_localstatedir}/spool/repackage
%dir %{_rpmhome}
%dir %{_rpmhome}/bin
%dir %{_rpmhome}/lib
%dir %{_rpmhome}/platform/
%dir %{_rpmhome}/platform/*/
%dir %{_rpmhome}/macros.d
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/macros
%dir %{_sysconfdir}/%{name}/macros.d
%dir %{_sysconfdir}/%{name}/premacros.d
%dir %{_sysconfdir}/%{name}/sysinfo
%{_sysconfdir}/%{name}/macros.d/*.macros
%{_sysconfdir}/%{name}/premacros.d/*.macros
%{_mandir}/man[18]/*.[18]*
%lang(pl) %{_mandir}/pl/man[18]/*.[18]*
%lang(ru) %{_mandir}/ru/man[18]/*.[18]*
%lang(ja) %{_mandir}/ja/man[18]/*.[18]*
%lang(sk) %{_mandir}/sk/man[18]/*.[18]*
%lang(fr) %{_mandir}/fr/man[18]/*.[18]*
%lang(ko) %{_mandir}/ko/man[18]/*.[18]*
%exclude %{_mandir}/man8/rpmbuild.8*
%exclude %{_mandir}/man8/rpmdeps.8*
%{_sysconfdir}/cron.daily/rpm
%config(noreplace,missingok) %{_sysconfdir}/logrotate.d/rpm
%dir %{multiarch_bindir}
%dir %{multiarch_includedir}
%if "%{_lib}" == "lib64"
%dir %(linux32 rpm -E %%{multiarch_bindir})
%dir %(linux32 rpm -E %%{multiarch_includedir})
%endif
%{_includedir}/multiarch-dispatch.h
#----------------------------------------------------------------------------
%define libgcrypt_maj %(readlink %{_libdir}/libgcrypt.so | \
awk -F '\\.so\\.' '{print $NF}' | cut -d'.' -f1 || \
echo 0)
%define libgcrypt_ver %(%{_bindir}/libgcrypt-config --version || echo 0)
%define libgcrypt_libname %mklibname gcrypt %{libgcrypt_maj}
2015-12-22 02:22:24 +10:00
%package -n %{librpmname}
2012-02-01 14:15:49 +04:00
Summary: Libraries used by rpm
Group: System/Libraries
# Forcing upgrades of anything else linked against it as rpmdb is incompatible
# with older versions (#61658, comment #136)
Conflicts: librpm < 5.3
Conflicts: %{_lib}db5.1 < 5.1.25
Conflicts: %{_lib}elfutils1 < 0.152
Conflicts: %{_lib}beecrypt7 < 4.2.1
# RPM 5 previously did not use libgcrypt, but, due to urpmi bug
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=6849,
# libgcrypt is not pulled before RPM when updating old systems,
# this was reported to lead to corruption of RPM DB,
# so we have to manually force urpmi to install libgcrypt before RPM.
Requires(pre): %{libgcrypt_libname} >= %{libgcrypt_ver}
2012-02-01 14:15:49 +04:00
2015-12-22 02:22:24 +10:00
%description -n %{librpmname}
2012-02-01 14:15:49 +04:00
RPM is a powerful command line driven package management system capable of
installing, uninstalling, verifying, querying, and updating software packages.
This package contains common files to all applications based on rpm.
2015-12-22 02:22:24 +10:00
%files -n %{librpmname}
%{_libdir}/librpm-%{libver}.so
%{_libdir}/librpmconstant-%{libver}.so
%{_libdir}/librpmdb-%{libver}.so
%{_libdir}/librpmio-%{libver}.so
%{_libdir}/librpmmisc-%{libver}.so
%{_libdir}/librpmbuild-%{libver}.so
%if %{with js}
%{_rpmhome}/lib/librpmjsm.so.*
%{_rpmhome}/lib/rpmjsm.so
%endif
#----------------------------------------------------------------------------
%package -n %{librpmnamedevel}
2012-02-01 14:15:49 +04:00
Summary: Development files for applications which will manipulate RPM packages
Group: Development/C
Requires: %{librpmname} = %{EVRD}
Provides: rpm-devel = %{EVRD}
%rename %{_lib}rpmconstant-devel
%description -n %{librpmnamedevel}
This package contains the RPM C library and header files. These
development files will simplify the process of writing programs
which manipulate RPM packages and databases and are intended to make
it easier to create graphical package managers or any other tools
that need an intimate knowledge of RPM packages in order to function.
This package should be installed if you want to develop programs that
will manipulate RPM packages and databases.
2015-12-22 02:22:24 +10:00
%files -n %{librpmnamedevel}
#%%doc apidocs/html
%{_includedir}/rpm
%{_libdir}/librpm.so
%{_libdir}/librpmconstant.so
%{_libdir}/librpmdb.so
%{_libdir}/librpmio.so
%{_libdir}/librpmmisc.so
%{_libdir}/librpmbuild.so
%{_libdir}/pkgconfig/rpm.pc
%if %{with js}
%{_rpmhome}/lib/librpmjsm.so
%endif
#----------------------------------------------------------------------------
%package -n %{librpmstatic}
2012-02-01 14:15:49 +04:00
Summary: Static libraries for rpm development
Group: Development/C
Requires: %{librpmnamedevel} = %{EVRD}
%description -n %{librpmstatic}
Static libraries for rpm development.
2015-12-22 02:22:24 +10:00
%files -n %{librpmstatic}
%{_libdir}/librpm.a
%{_libdir}/librpmconstant.a
%{_libdir}/librpmdb.a
%{_libdir}/librpmio.a
%{_libdir}/librpmmisc.a
%{_libdir}/librpmbuild.a
#----------------------------------------------------------------------------
%package build
2012-02-01 14:15:49 +04:00
Summary: Scripts and executable programs used to build packages
Group: System/Configuration/Packaging
Requires: autoconf
Requires: automake
Requires: file
Requires: gcc-c++
2015-02-19 14:01:14 +03:00
Requires: gzip-utils
Requires: libtool-base >= 2.4.2-3
Requires: patch >= 2.5.9-7
2012-02-01 14:15:49 +04:00
Requires: make
Requires: unzip
2015-02-19 13:25:59 +03:00
Requires: which
Requires: elfutils >= 0.152-4
2012-02-01 14:15:49 +04:00
Requires: rpm = %{EVRD}
2012-10-18 00:51:11 +04:00
#Requires: rpm-%{_target_vendor}-setup-build
Requires: rpm-mandriva-setup-build
2012-08-01 14:59:23 +04:00
Requires: spec-helper >= 0.31.12
2012-10-18 00:51:11 +04:00
#Requires: rpmlint-%{_target_vendor}-policy >= 0.3.2
2013-11-05 14:45:32 +04:00
Requires: rpmlint-rosa-policy >= 0.3.2
2014-05-26 10:25:09 +04:00
%if %{without bootstrap}
2012-08-01 14:59:23 +04:00
Requires: python-rpm = %{EVRD}
Requires: perl-RPM = %{EVRD}
2014-05-26 10:25:09 +04:00
%endif
2013-11-05 14:45:32 +04:00
# Used by __urlgetfile to download files from external sources
Requires: wget
Conflicts: rpmlint < 1.4-4
2012-02-01 14:15:49 +04:00
Conflicts: multiarch-utils < 1:5.3.10
Conflicts: rpm < 1:5.4.4-32
2012-08-01 14:59:23 +04:00
%rename rpm-manbo-setup-build
2012-02-01 14:15:49 +04:00
2015-12-22 02:22:24 +10:00
%description build
2012-02-01 14:15:49 +04:00
This package contains scripts and executable programs that are used to
build packages using RPM.
2015-12-22 02:22:24 +10:00
%files build
%{_bindir}/gendiff
%{_bindir}/rpmbuild
%{_bindir}/multiarch-platform
#%%{_rpmhome}/bin/abi-compliance-checker.pl
%{_rpmhome}/bin/api-sanity-autotest.pl
%{_rpmhome}/bin/api-sanity-checker.pl
%{_rpmhome}/bin/dbsql
%{_rpmhome}/bin/debugedit
%{_rpmhome}/bin/install-sh
%{_rpmhome}/bin/lua
%{_rpmhome}/bin/luac
%{_rpmhome}/bin/mkinstalldirs
%{_rpmhome}/bin/pom2spec
%{_rpmhome}/bin/rpmcache
%{_rpmhome}/bin/rpmcmp
%{_rpmhome}/bin/rpmdeps
%{_rpmhome}/bin/rpmdigest
%{_rpmhome}/bin/rpmkey
%{_rpmhome}/bin/rpmlua
%{_rpmhome}/bin/rpmluac
%{_rpmhome}/bin/rpmrepo
%{_rpmhome}/bin/sqlite3
%dir %{_rpmhome}/helpers
%{_rpmhome}/helpers/*
%dir %{_rpmhome}/qf
%{_rpmhome}/qf/*
%{_rpmhome}/vcheck
%{_rpmhome}/brp-*
%{_rpmhome}/check-files
%{_rpmhome}/check-multiarch-files
#%%{_rpmhome}/cross-build
%{_rpmhome}/find-debuginfo.sh
%{_rpmhome}/find-lang.sh
%{_rpmhome}/find-prov.pl
%{_rpmhome}/find-provides.perl
%{_rpmhome}/find-req.pl
%{_rpmhome}/find-requires.perl
%{_rpmhome}/fontconfig.prov
%{_rpmhome}/gem_helper.rb
%{_rpmhome}/getpo.sh
%{_rpmhome}/gstreamer.sh
%{_rpmhome}/http.req
%{_rpmhome}/javadeps.sh
%{_rpmhome}/kmod-deps.sh
%{_rpmhome}/mkmultiarch
%{_rpmhome}/mono-find-provides
%{_rpmhome}/mono-find-requires
%{_rpmhome}/executabledeps.sh
%{_rpmhome}/libtooldeps.sh
%{_rpmhome}/osgideps.pl
%{_rpmhome}/perldeps.pl
%{_rpmhome}/perl.prov
%{_rpmhome}/perl.req
%{_rpmhome}/php.prov
%{_rpmhome}/php.req
%{_rpmhome}/pkgconfigdeps.sh
%{_rpmhome}/pythondeps.sh
%{_rpmhome}/pythoneggs.py
2016-10-12 19:55:07 +10:00
%{_rpmhome}/qmldeps.sh
2015-12-22 02:22:24 +10:00
%{_rpmhome}/rubygems.rb
%{_rpmhome}/symclash.*
%{_rpmhome}/u_pkg.sh
%{_rpmhome}/vpkg-provides.sh
%{_rpmhome}/vpkg-provides2.sh
%if %{with js}
%{_rpmhome}/bin/tjs
%endif
%{_rpmhome}/macros.rpmbuild
%{_mandir}/man8/rpmbuild.8*
%{_mandir}/man8/rpmdeps.8*
#----------------------------------------------------------------------------
2012-02-01 14:15:49 +04:00
%if %{with python}
2015-12-22 02:22:24 +10:00
%package -n python-rpm
2012-02-01 14:15:49 +04:00
Summary: Python bindings for apps which will manipulate RPM packages
Group: Development/Python
2015-12-22 02:22:24 +10:00
%description -n python-rpm
2012-02-01 14:15:49 +04:00
The rpm-python package contains a module which permits applications
written in the Python programming language to use the interface
supplied by RPM (RPM Package Manager) libraries.
This package should be installed if you want to develop Python
programs that will manipulate RPM packages and databases.
2015-12-22 02:22:24 +10:00
%files -n python-rpm
%if %{with embed}
%{_rpmhome}/lib/rpmpython.so
2012-02-01 14:15:49 +04:00
%endif
2015-12-22 02:22:24 +10:00
%dir %{py_platsitedir}/rpm
%{py_platsitedir}/rpm/*.py
%{py_platsitedir}/rpm/*.so
%endif
#----------------------------------------------------------------------------
2012-02-01 14:15:49 +04:00
%if %{with perl}
%define perlmod RPM
2015-12-22 02:22:24 +10:00
%package -n perl-%{perlmod}
2012-02-01 14:15:49 +04:00
Summary: Perl bindings for RPM
Group: Development/Perl
Requires: perl-IO-String
%description -n perl-%{perlmod}
The RPM Perl module provides an object-oriented interface to querying both
the installed RPM database as well as files on the filesystem.
2014-01-15 02:33:42 -05:00
2015-12-22 02:22:24 +10:00
%files -n perl-%{perlmod}
#%%doc perl/Changes
%if %{with embed}
%{_rpmhome}/lib/rpmperl.so
%endif
%{_mandir}/man3/RPM*
%{perl_vendorarch}/%{perlmod}.pm
%dir %{perl_vendorarch}/%{perlmod}
%{perl_vendorarch}/%{perlmod}/*.pm
%{perl_vendorarch}/auto/%{perlmod}
%endif
#----------------------------------------------------------------------------
2014-01-15 02:33:42 -05:00
2015-12-22 02:22:24 +10:00
%if %{with perl}
%package -n perl-RPMBDB
Summary: Perl extension for accessing certain Berkeley DB functionality
Group: Development/Perl
Requires: %{librpmname} = %{EVRD}
%description -n perl-RPMBDB
2014-01-15 02:33:42 -05:00
This perl extension provides certain Berkeley DB functionality used by urpmi.
2015-12-22 02:22:24 +10:00
%files -n perl-RPMBDB
%{perl_vendorarch}/RPMBDB.pm
%dir %{perl_vendorarch}/auto/RPMBDB
%{perl_vendorarch}/auto/RPMBDB/RPMBDB.so
2012-02-01 14:15:49 +04:00
%endif
2015-12-22 02:22:24 +10:00
#----------------------------------------------------------------------------
2012-08-01 14:59:23 +04:00
%if %{with ruby}
2015-12-22 02:22:24 +10:00
%package -n rpm-rubyembed
2012-08-01 14:59:23 +04:00
Summary: Ruby embedding module for rpm
Group: Development/Ruby
Requires: ruby(abi)
%description -n rpm-rubyembed
This package provides embedded ruby interpreter support for RPM.
2015-12-22 02:22:24 +10:00
%files -n rpm-rubyembed
%{_rpmhome}/bin/trb
%{_rpmhome}/lib/rpm.so
%{_rpmhome}/lib/rpmruby.so
2012-08-01 14:59:23 +04:00
%endif
2015-12-22 02:22:24 +10:00
#----------------------------------------------------------------------------
2012-08-01 14:59:23 +04:00
%if %{with tcl}
2015-12-22 02:22:24 +10:00
%package -n rpm-tclembed
2012-08-01 14:59:23 +04:00
Summary: Tcl embedding module for rpm
Group: Development/Other
Requires: tcl
%description -n rpm-tclembed
This package provides embedded Tcl interpreter support for RPM.
2015-12-22 02:22:24 +10:00
%files -n rpm-tclembed
%{_rpmhome}/lib/rpmtcl.so
2012-08-01 14:59:23 +04:00
%endif
2015-12-22 02:22:24 +10:00
#----------------------------------------------------------------------------
2012-08-01 14:59:23 +04:00
%if %{with squirrel}
2015-12-22 02:22:24 +10:00
%package -n rpm-squirrelembed
2012-08-01 14:59:23 +04:00
Summary: Squirrel embedding module for rpm
Group: Development/Other
Requires: squirrel
%description -n rpm-squirrelembed
This package provides embedded Squirrel interpreter support for RPM.
2015-12-22 02:22:24 +10:00
%files -n rpm-squirrelembed
%{_rpmhome}/lib/rpmsquirrel.so
2012-08-01 14:59:23 +04:00
%endif
2015-12-22 02:22:24 +10:00
#----------------------------------------------------------------------------
2012-02-01 14:15:49 +04:00
%if %{with docs}
2015-12-22 02:22:24 +10:00
%package apidocs
2012-02-01 14:15:49 +04:00
Summary: API documentation for RPM
Group: Books/Computer books
BuildArch: noarch
2015-12-22 02:22:24 +10:00
%description apidocs
2012-02-01 14:15:49 +04:00
This package contains the RPM API documentation generated in HTML format.
2015-12-22 02:22:24 +10:00
%files apidocs
%dir %{_docdir}/rpm/html
%{_docdir}/rpm/html/*
2012-02-01 14:15:49 +04:00
%endif
2015-12-22 02:22:24 +10:00
#----------------------------------------------------------------------------
2012-02-01 14:15:49 +04:00
%prep
%setup -q -a5 -n rpm5-%{commit}
2012-02-01 14:15:49 +04:00
mkdir -p cpu-os-macros
tar -zxf %{SOURCE3} -C cpu-os-macros
%apply_patches
2012-02-01 14:15:49 +04:00
%build
./autogen.sh
2012-02-01 14:15:49 +04:00
%configure2_5x --enable-nls \
--with-pic \
%if %{with debug}
--enable-debug \
--enable-build-debug \
2012-02-01 14:15:49 +04:00
--with-valgrind \
%endif
--enable-posixmutexes \
%if %{with python}
--with-python=%{python_version} \
%if %{with embed}
--with-pythonembed=external \
%endif
%else
--without-python \
%endif
%if %{with perl}
--with-perl=vendor \
%if %{with embed}
--with-perlembed=external \
%endif
%else
--without-perl \
%endif
%if %{with js}
--with-mozjs185=external \
%else
--without-mozjs185 \
%endif
%if %{with ruby}
--with-ruby=external \
%if %{with embed}
--with-rubyembed=external \
%endif
%endif
%if %{with tcl}
--with-tcl=external \
2012-08-01 14:59:23 +04:00
%endif
%if %{with squirrel}
--with-squirrel=external \
2012-02-01 14:15:49 +04:00
%endif
--with-glob \
%if %{with selinux}
--with-selinux \
%else
2012-02-01 14:15:49 +04:00
--without-selinux \
%endif
2012-02-01 14:15:49 +04:00
%if %{with docs}
--with-apidocs \
%endif
--with-libelf \
--with-popt=external \
--with-xz=external \
--with-bzip2=external \
2012-08-01 14:59:23 +04:00
--with-lua=internal \
--with-expat=external \
2012-02-01 14:15:49 +04:00
--with-pcre=external \
%ifarch %{ix86} x86_64 ppc ppc64 ia64
--with-cpuinfo=external \
%else
--without-cpuinfo \
%endif
--with-syck=external \
--with-file=external \
--with-path-magic=%{_datadir}/misc/magic.mgc \
--with-beecrypt=external \
--with-usecrypto=beecrypt \
--with-gcrypt=external \
2012-02-01 14:15:49 +04:00
--with-keyutils=external \
--with-neon=external \
--with-acl \
--enable-openmp \
%if %{with xar}
--with-xar=%{_includedir}/xar \
%endif
--with-db \
2012-08-01 14:59:23 +04:00
--with-dbsql=external \
2012-02-01 14:15:49 +04:00
--without-db-tools-integrated \
%if %{with sqlite}
--with-sqlite=external \
%else
--without-sqlite \
%endif
2012-08-01 14:59:23 +04:00
%if %{with ossp_uuid}
%if 0
# TODO: needs to be fixed properly for automatic detection in internal lua build
%endif
--with-uuid=%{_libdir}:%{_includedir}/ossp-uuid \
2012-02-01 14:15:49 +04:00
%else
--without-uuid \
%endif
%if %{with augeas}
--with-augeas=external \
%else
--without-augeas \
%endif
%if 0
--with-extra-path-macros=%{_usrlibrpm}/macros.d/mandriva \
%else
--with-extra-path-macros=%{_usrlibrpm}/platform/%%{_target}/macros:%{_sysconfdir}/rpm/macros.d/*.macros:%{_usrlibrpm}/macros.d/mandriva \
%endif
--with-vendor=mandriva \
--enable-build-warnings
# XXX: Making ie. a --with-pre-macros option might be more aestethic and easier
# of use to others if pushed back upstream?
# For our case, this is only used to define _prefer_target_cpu before any other
# macros so that rpm knows about this for libcpuinfo when loading macros, but
# could perhaps be useful to others, ie. for defining a _target_vendor earlier,
# so that vendor specific macros to load could be defined at runtime rather
# than compile time.. Sounds convenient if LSB certification is done on a specific
# set of binaries (does it..?) wrt. Manbo Labs.
echo '#define PREMACROFILES "%{_sysconfdir}/rpm/premacros.d/*.macros"' >> config.h
%make
%if %{with docs}
%make apidocs
%endif
2014-01-15 02:33:42 -05:00
%if %{with perl}
pushd RPMBDB-*
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" CCCDLFLAGS="-fno-PIE -fPIC"
sed -i -e 's,-fPIC -fno-PIE,-fno-PIE -fPIC,g' ../perl/Makefile.perl
%make
popd
%endif
2012-02-01 14:15:49 +04:00
%check
#make check
2012-02-01 14:15:49 +04:00
%install
%makeinstall_std -k
2014-01-15 02:33:42 -05:00
%if %{with perl}
%makeinstall_std -C RPMBDB-*
%endif
2012-02-01 14:15:49 +04:00
# XXX: why isn't this installed by 'make install'?
install -m755 scripts/symclash.* %{buildroot}%{_rpmhome}
# Save list of packages through cron
install -m755 scripts/rpm.daily -D %{buildroot}%{_sysconfdir}/cron.daily/rpm
install -m644 scripts/rpm.log -D %{buildroot}%{_sysconfdir}/logrotate.d/rpm
mkdir -p %{buildroot}/var/spool/repackage
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/{{pre,}macros.d,sysinfo}
# actual usefulness of this seems rather dubious with macros.d now...
cat > %{buildroot}%{_sysconfdir}/%{name}/macros <<EOF
# Put your own system macros here
# usually contains
2012-02-01 14:15:49 +04:00
# Set this one according your locales
# %%_install_langs
EOF
2012-08-01 14:59:23 +04:00
# FIXME: weird issue, seems to have issue with lines starting with '%%_'...
2012-02-01 14:15:49 +04:00
cat > %{buildroot}%{_sysconfdir}/%{name}/premacros.d/cpuinfo_target.macros <<EOF
# This sets which of the available architectures to prefer when building
# packages with libcpuinfo support enabled.
2012-08-01 14:59:23 +04:00
%%_prefer_target_cpu x86_64 i586
2012-02-01 14:15:49 +04:00
EOF
# Get rid of unpackaged files
# XXX: is there any of these we might want to keep?
2012-08-01 14:59:23 +04:00
for f in %{py_platsitedir}/poptmodule.a %{py_platsitedir}/rpmmodule.a \
%{py_platsitedir}/rpm/*.a %{_rpmhome}/*.a %{_rpmhome}/lib/*.a\
2012-02-01 14:15:49 +04:00
%{_rpmhome}/{Specfile.pm,cpanflute2,cpanflute,sql.prov,sql.req,tcl.req} \
%{_rpmhome}/{config.site,cross-build,rpmdiff.cgi} \
%{_rpmhome}/trpm %{_bindir}/rpmdiff; do
rm -f %{buildroot}$f
done
%find_lang %{name}
mkdir -p %{buildroot}/var/lib/rpm/{log,tmp}
2012-08-01 14:59:23 +04:00
for dbi in `./rpm --macros macros/macros --eval %_dbi_tags_4|tr : ' '` __db.00{0..9}; do
2012-02-01 14:15:49 +04:00
touch %{buildroot}/var/lib/rpm/$dbi
2012-08-01 14:59:23 +04:00
echo "%attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/rpm/$dbi" >> %{name}.lang
2012-02-01 14:15:49 +04:00
done
install -d %{buildroot}/bin
# FIXME: considering that most libraries dynamically linked against is located
# in /usr/lib*, this doesn't make much sense unless we either statically link
# against them (Ark Linux actually does this) or move the libraries to /lib*,
# neither being very attractive options, not to mention maintenance headaches
# spread across these library packages...
# So moving rpm back to /usr/bin probably makes the most sense...
# An optional, "minimal" rpm-static package with /bin/rpm could perhaps be done
# if anyone expresses actual interest in this...
mv %{buildroot}%{_bindir}/rpm %{buildroot}/bin/rpm
cp -r cpu-os-macros %{buildroot}%{_usrlibrpm}/platform
2017-09-23 13:59:31 +03:00
install -m644 %{SOURCE6} -D %{buildroot}%{_sysconfdir}/%{name}/macros.d/autosetup.macros
2012-02-01 14:15:49 +04:00
%if %{with docs}
install -d %{buildroot}%{_docdir}/rpm
cp -r apidocs/html %{buildroot}%{_docdir}/rpm
%endif
2012-08-01 14:59:23 +04:00
install -d %{buildroot}%{multiarch_bindir}
install -d %{buildroot}%{multiarch_includedir}
%if "%{_lib}" == "lib64"
install -d %{buildroot}%(linux32 rpm -E %%{multiarch_bindir})
install -d %{buildroot}%(linux32 rpm -E %%{multiarch_includedir})
%endif
2012-02-01 14:15:49 +04:00
# should really be handled by make script..
ln -f %{buildroot}%{_rpmhome}/bin/{rpmlua,lua}
ln -f %{buildroot}%{_rpmhome}/bin/{rpmluac,luac}