Clean ups for merge

This commit is contained in:
Paul Nasrat 2007-03-02 13:41:59 +00:00
parent 566842cb66
commit b1ecfff518

View File

@ -1,6 +1,5 @@
%define with_python_subpackage 1%{nil} %define with_python_subpackage 1%{nil}
%define with_python_version 2.5%{nil} %define with_python_version 2.5%{nil}
%define with_bzip2 1%{nil}
%define with_apidocs 1%{nil} %define with_apidocs 1%{nil}
# XXX legacy requires './' payload prefix to be omitted from rpm packages. # XXX legacy requires './' payload prefix to be omitted from rpm packages.
@ -15,14 +14,15 @@
%define __libdir %{__prefix}/%{_lib} %define __libdir %{__prefix}/%{_lib}
%define __mandir %{__prefix}%{__share}/man %define __mandir %{__prefix}%{__share}/man
Summary: The RPM package management system. Summary: The RPM package management system
Name: rpm Name: rpm
%define version 4.4.2 %define version 4.4.2
Version: %{version} Version: %{version}
%{expand: %%define rpm_version %{version}} %{expand: %%define rpm_version %{version}}
Release: 40%{?dist} Release: 40%{?dist}
Group: System Environment/Base Group: System Environment/Base
Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz Url: http://www.rpm.org/
Source: rpm-%{rpm_version}.tar.gz
Source1: mono-find-provides Source1: mono-find-provides
Source2: mono-find-requires Source2: mono-find-requires
Patch0: rpm-4.4.1-hkp-disable.patch Patch0: rpm-4.4.1-hkp-disable.patch
@ -63,18 +63,16 @@ Patch34: rpm-4.4.2-debugopt.patch
Patch35: rpm-4.4.2-query-flushbuffer.patch Patch35: rpm-4.4.2-query-flushbuffer.patch
Patch36: rpm-4.4.2-unicodekey.patch Patch36: rpm-4.4.2-unicodekey.patch
License: GPL License: GPL
Conflicts: patch < 2.5 Requires: patch > 2.5
%ifos linux Prereq: shadow-utils
Prereq: fileutils shadow-utils
%endif
Requires: popt = 1.10.2 Requires: popt = 1.10.2
Obsoletes: rpm-perl < %{version} Requires: crontab
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: elfutils-devel >= 0.112 BuildRequires: elfutils-devel >= 0.112
BuildRequires: elfutils-libelf-devel-static BuildRequires: elfutils-libelf-devel-static
BuildRequires: sed readline-devel zlib-devel BuildRequires: readline-devel zlib-devel
BuildRequires: beecrypt-devel >= 4.1.2 BuildRequires: beecrypt-devel >= 4.1.2
Requires: beecrypt >= 4.1.2 Requires: beecrypt >= 4.1.2
@ -83,13 +81,9 @@ BuildRequires: neon-devel
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
#XXX: lua fix this
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
# XXX Red Hat 5.2 has not bzip2 or python
%if %{with_bzip2}
BuildRequires: bzip2-devel >= 0.9.0c-2 BuildRequires: bzip2-devel >= 0.9.0c-2
%endif
%if %{with_python_subpackage} %if %{with_python_subpackage}
BuildRequires: python-devel >= %{with_python_version} BuildRequires: python-devel >= %{with_python_version}
%endif %endif
@ -104,7 +98,7 @@ package consists of an archive of files along with information about
the package like its version, a description, etc. the package like its version, a description, etc.
%package libs %package libs
Summary: Libraries for manipulating RPM packages. Summary: Libraries for manipulating RPM packages
Group: Development/Libraries Group: Development/Libraries
Requires: rpm = %{rpm_version}-%{release} Requires: rpm = %{rpm_version}-%{release}
@ -112,7 +106,7 @@ Requires: rpm = %{rpm_version}-%{release}
This package contains the RPM shared libraries. This package contains the RPM shared libraries.
%package devel %package devel
Summary: Development files for manipulating RPM packages. Summary: Development files for manipulating RPM packages
Group: Development/Libraries Group: Development/Libraries
Requires: rpm = %{rpm_version}-%{release} Requires: rpm = %{rpm_version}-%{release}
Requires: beecrypt >= 4.1.2 Requires: beecrypt >= 4.1.2
@ -133,7 +127,7 @@ This package should be installed if you want to develop programs that
will manipulate RPM packages and databases. will manipulate RPM packages and databases.
%package build %package build
Summary: Scripts and executable programs used to build packages. Summary: Scripts and executable programs used to build packages
Group: Development/Tools Group: Development/Tools
Requires: rpm = %{rpm_version}-%{release}, patch >= 2.5, file, elfutils Requires: rpm = %{rpm_version}-%{release}, patch >= 2.5, file, elfutils
Requires: findutils Requires: findutils
@ -145,10 +139,9 @@ that are used to build packages using the RPM Package Manager.
%if %{with_python_subpackage} %if %{with_python_subpackage}
%package python %package python
Summary: Python bindings for apps which will manipulate RPM packages. Summary: Python bindings for apps which will manipulate RPM packages
Group: Development/Libraries Group: Development/Libraries
Requires: rpm = %{rpm_version}-%{release} Requires: rpm = %{rpm_version}-%{release}
Requires: python >= %{with_python_version}
%description python %description python
The rpm-python package contains a module that permits applications The rpm-python package contains a module that permits applications
@ -160,7 +153,7 @@ programs that will manipulate RPM packages and databases.
%endif %endif
%package -n popt %package -n popt
Summary: A C library for parsing command line parameters. Summary: A C library for parsing command line parameters
Group: Development/Libraries Group: Development/Libraries
Version: 1.10.2 Version: 1.10.2
@ -228,17 +221,8 @@ WITH_PYTHON="--with-python=%{with_python_version}"
WITH_PYTHON="--without-python" WITH_PYTHON="--without-python"
%endif %endif
%ifos linux
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
./configure --prefix=%{__prefix} --sysconfdir=/etc \ %configure $WITH_PYTHON --enable-posixmutexes --without-javaglue
--localstatedir=/var --infodir='${prefix}%{__share}/info' \
--mandir='${prefix}%{__share}/man' \
$WITH_PYTHON --enable-posixmutexes --without-javaglue
%else
export CPPFLAGS=-I%{__prefix}/include
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{__prefix} $WITH_PYTHON \
--without-javaglue
%endif
make -C zlib || : make -C zlib || :
@ -272,8 +256,6 @@ for i in /usr/lib/rpmpopt /usr/lib/rpmrc; do
rm -f "$RPM_BUILD_ROOT"/"$i" rm -f "$RPM_BUILD_ROOT"/"$i"
done done
%ifos linux
# Save list of packages through cron # Save list of packages through cron
mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}/etc/cron.daily/rpm
@ -295,12 +277,6 @@ do
touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
done done
%endif
%if %{with_apidocs}
gzip -9n apidocs/man/man*/* || :
%endif
# Get rid of unpackaged files # Get rid of unpackaged files
{ cd $RPM_BUILD_ROOT { cd $RPM_BUILD_ROOT
rm -f .%{_libdir}/lib*.la rm -f .%{_libdir}/lib*.la
@ -321,7 +297,6 @@ install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/rpm
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%pre %pre
%ifos linux
if [ -f /var/lib/rpm/packages.rpm ]; then if [ -f /var/lib/rpm/packages.rpm ]; then
echo " echo "
You have (unsupported) You have (unsupported)
@ -334,12 +309,9 @@ to convert your database from db1 to db3 format.
fi fi
/usr/sbin/groupadd -g 37 rpm > /dev/null 2>&1 /usr/sbin/groupadd -g 37 rpm > /dev/null 2>&1
/usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 rpm -s /sbin/nologin > /dev/null 2>&1 /usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 rpm -s /sbin/nologin > /dev/null 2>&1
%endif
exit 0 exit 0
%post %post
%ifos linux
# Establish correct rpmdb ownership. # Establish correct rpmdb ownership.
/bin/chown rpm.rpm /var/lib/rpm/[A-Z]* /bin/chown rpm.rpm /var/lib/rpm/[A-Z]*
@ -351,10 +323,8 @@ exit 0
grep "db_stat: Program version 4.3 doesn't match environment version" 2>&1 > /dev/null && grep "db_stat: Program version 4.3 doesn't match environment version" 2>&1 > /dev/null &&
rm -f /var/lib/rpm/__db* rm -f /var/lib/rpm/__db*
%endif
exit 0 exit 0
%ifos linux
%postun %postun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
/usr/sbin/userdel rpm /usr/sbin/userdel rpm
@ -370,17 +340,11 @@ exit 0
%post -n popt -p /sbin/ldconfig %post -n popt -p /sbin/ldconfig
%postun -n popt -p /sbin/ldconfig %postun -n popt -p /sbin/ldconfig
%endif
%if %{with_python_subpackage}
%post python -p /sbin/ldconfig
%postun python -p /sbin/ldconfig
%endif
%define rpmattr %attr(0755, rpm, rpm) %define rpmattr %attr(0755, rpm, rpm)
%files %files
%defattr(-,root,root) %defattr(-,root,root,-)
%doc RPM-PGP-KEY RPM-GPG-KEY BETA-GPG-KEY CHANGES GROUPS doc/manual/[a-z]* %doc RPM-PGP-KEY RPM-GPG-KEY BETA-GPG-KEY CHANGES GROUPS doc/manual/[a-z]*
# XXX comment these lines out if building with rpm that knows not %pubkey attr # XXX comment these lines out if building with rpm that knows not %pubkey attr
%pubkey RPM-PGP-KEY %pubkey RPM-PGP-KEY
@ -388,8 +352,7 @@ exit 0
%pubkey BETA-GPG-KEY %pubkey BETA-GPG-KEY
%attr(0755, rpm, rpm) /bin/rpm %attr(0755, rpm, rpm) /bin/rpm
%ifos linux /etc/cron.daily/rpm
%config(noreplace,missingok) /etc/cron.daily/rpm
%config(noreplace,missingok) /etc/logrotate.d/rpm %config(noreplace,missingok) /etc/logrotate.d/rpm
%dir /etc/rpm %dir /etc/rpm
#%config(noreplace,missingok) /etc/rpm/macros.* #%config(noreplace,missingok) /etc/rpm/macros.*
@ -398,7 +361,6 @@ exit 0
%define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %define rpmdbattr %attr(0644, rpm, rpm) %verify(not md5 size mtime) %ghost %config(missingok,noreplace)
%rpmdbattr /var/lib/rpm/* %rpmdbattr /var/lib/rpm/*
%endif
%rpmattr %{__bindir}/rpm2cpio %rpmattr %{__bindir}/rpm2cpio
%rpmattr %{__bindir}/gendiff %rpmattr %{__bindir}/gendiff
@ -722,7 +684,7 @@ exit 0
* Mon Nov 28 2005 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-8 * Mon Nov 28 2005 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-8
- Add elfutils Build Requires to rpmbuild (#155129) - Add elfutils Build Requires to rpmbuild (#155129)
- Don't do conflicts if both files %ghost(#155256) - Don't do conflicts if both files %%ghost(#155256)
- Fix popt charset for various languages (#172155) - Fix popt charset for various languages (#172155)
- Don't include .la file (#174261) - Don't include .la file (#174261)