diff --git a/dpkg-perl-libexecdir.patch b/dpkg-perl-libexecdir.patch deleted file mode 100644 index dc27f72..0000000 --- a/dpkg-perl-libexecdir.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ./scripts/Makefile.am.orig 2015-04-09 23:09:22.000000000 +0100 -+++ ./scripts/Makefile.am 2015-07-02 02:45:12.844920000 +0100 -@@ -21,7 +21,7 @@ bin_SCRIPTS = \ - dpkg-source \ - dpkg-vendor - --changelogdir = $(pkglibdir)/parsechangelog -+changelogdir = $(pkglibexecdir)/parsechangelog - changelog_SCRIPTS = \ - changelog/debian - -@@ -123,7 +123,7 @@ do_perl_subst = $(AM_V_GEN) \ - sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \ - -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \ - -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \ -- -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \ -+ -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibexecdir)':" \ - -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \ - -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':" - diff --git a/dpkg.spec b/dpkg.spec index f995fb0..7bab17c 100644 --- a/dpkg.spec +++ b/dpkg.spec @@ -15,7 +15,6 @@ Group: System Environment/Base License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD URL: https://tracker.debian.org/pkg/dpkg Source0: http://ftp.debian.org/debian/pool/main/d/dpkg/%{name}_%{version}.tar.xz -Patch0: dpkg-perl-libexecdir.patch Patch1: dpkg-fix-logrotate.patch Patch2: dpkg-perl-libexecdir.epel6.patch BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel @@ -149,12 +148,10 @@ user interfaces. %prep %setup -q -#patch0 -p1 %patch1 -p1 %if 0%{?rhel} && 0%{?rhel} < 7 %patch2 -p1 %endif - # Filter unwanted Requires: cat << \EOF > %{name}-req #!/bin/sh @@ -165,6 +162,11 @@ EOF %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req chmod +x %{__perl_requires} +# https://bugzilla.redhat.com/show_bug.cgi?id=1510214 +# crapy /usr/lib/rpm/perl.req in EL7 +# mark string "use --format" as requires perl(--format) +sed -i 's/^use --/may use --/' scripts/dpkg-source.pl + %build %if 0%{?fedora} || 0%{?rhel} > 6 # We can't run autoreconf on epel <= 6 because needs gettext-0.18 when epel6 @@ -184,11 +186,11 @@ autoreconf # todo add this #--with-devlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ -make %{?_smp_mflags} +%make_build %install -make install DESTDIR=%{buildroot} +%make_install mkdir -p %{buildroot}/%{pkgconfdir}/origins