File mingw32-rpm.spec of Package mingw32-rpm
#
# spec file for package mingw32-rpm
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: mingw32-rpm
Version: 4.7.2
Release: 0
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
Url: http://rpm.org/
Source0: http://rpm.org/releases/rpm-4.7.x/rpm-%{version}.tar.bz2
Source1: %{name}-rpmlintrc
Patch10: rpm-beecrypt.diff
Patch100: rpm-mingw.diff
#!BuildIgnore: post-build-checks
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw32-filesystem
BuildRequires: mingw32-libbeecrypt-devel
BuildRequires: mingw32-libbz2-devel
BuildRequires: mingw32-libdb-devel
BuildRequires: mingw32-libgnurx-devel
BuildRequires: mingw32-libintl-devel
BuildRequires: mingw32(pkg:liblzma)
BuildRequires: mingw32-popt-devel
BuildRequires: mingw32-sqlite-devel
BuildRequires: mingw32-win_iconv-devel
BuildRequires: mingw32-zlib-devel
%_mingw32_package_header_debug
BuildArch: noarch
%description
RPM Package Manager a tool for managing software packages.
%package devel
Summary: RPM include Files and Libraries mandatory for development
Group: Development/Libraries
%description devel
RPM Package Manager a tool for managing software packages.
This package contains the RPM C library and header files.
%_mingw32_debug_package
%lang_package
%prep
%setup -q -n rpm-%{version}
%patch -P 10
%patch -P 100
%build
autoreconf -fi
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}
%{_mingw32_configure} \
--enable-sqlite3 \
--disable-largefile \
--disable-python \
--with-lua=no --with-external-db \
--with-internal-beecrypt=no \
--enable-shared --disable-static
make %{?_smp_mflags} || make
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
gzip -9 %{buildroot}/%{_mingw32_mandir}/man[18]/*.[18]
rm -rf %{buildroot}%{_mingw32_mandir}/{fr,ja,ko,pl,ru,sk}
mkdir -p %{buildroot}%{_mingw32_sysconfdir}/rpm
chmod 755 %{buildroot}%{_mingw32_sysconfdir}/rpm
# remove some nonsense or non-working scripts
pushd %{buildroot}%{_mingw32_libdir}/rpm
rm -f $f rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd rpmfile *.pl rpmdb_* rpmpop* \
tcl.req brp-strip-static-archive brp-strip-comment-note brp-java-gcjcompile
popd
gzip -9 CHANGES
rm %{buildroot}%{_mingw32_libdir}/*.la
rm %{buildroot}%{_mingw32_libdir}/librpmbuild.a
%find_lang rpm
%files
%defattr(-,root,root)
%doc CHANGES.gz COPYING GROUPS
%doc doc/manual
%{_mingw32_sysconfdir}/rpm
%{_mingw32_bindir}/rpm.exe
%{_mingw32_bindir}/rpm2cpio.exe
%{_mingw32_bindir}/rpmgraph.exe
%{_mingw32_bindir}/librpm-0.dll
%{_mingw32_bindir}/librpmio-0.dll
%{_mingw32_bindir}/gendiff
%{_mingw32_libdir}/rpm
%{_mingw32_mandir}/man[18]/*.[18]*
%files lang -f rpm.lang
%defattr(-,root,root)
%files devel
%defattr(644,root,root,755)
%{_mingw32_includedir}/rpm
%{_mingw32_libdir}/librpm.dll.a
%{_mingw32_libdir}/librpmio.dll.a
%{_mingw32_libdir}/pkgconfig/rpm.pc
%changelog