[rp-pppoe] Let package honor %_pkgdocdir (Fix F20FTBFS RHBZ #993206,

corsepiu corsepiu at fedoraproject.org
Thu Jul 3 14:06:19 UTC 2014


commit ed7d4225f32977461e9d898a63093888757da8dc
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Thu Jul 3 16:05:22 2014 +0200

    Let package honor %_pkgdocdir (Fix F20FTBFS RHBZ #993206,
    
      F21FTBFS RHBZ #1107035).
    - Modernize spec.

 rp-pppoe.spec |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/rp-pppoe.spec b/rp-pppoe.spec
index db1e8b6..e689e38 100644
--- a/rp-pppoe.spec
+++ b/rp-pppoe.spec
@@ -1,7 +1,7 @@
 Summary: A PPP over Ethernet client (for xDSL support).
 Name: rp-pppoe
 Version: 3.11
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 Url: http://www.roaringpenguin.com/pppoe/
@@ -39,6 +39,10 @@ BuildRequires: systemd-units >= 39-2
 
 ExcludeArch: s390 s390x
 
+# _pkgdocdir is available in rhel >= 6 and fedora >= 20
+# This line can be removed once f19 is EOL.
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
 %description
 PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used by
 many ADSL Internet Service Providers. This package contains the
@@ -51,16 +55,17 @@ the official PPPoE specification.
 %patch0 -p1 -b .config
 %patch1 -p1 -b .ip-allocation
 
+# configure honors docdir, but Makefile.in doesn't
+sed -i -e 's,^docdir=.*$,docdir=@docdir@,' src/Makefile.in
+
 %build
 cd src
 autoconf
 export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strict-aliasing"
-%configure
+%configure --docdir=%{_pkgdocdir}
 make
 
 %install
-rm -rf %{buildroot}
-
 mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}
 
 make -C src install DESTDIR=%{buildroot}
@@ -77,12 +82,8 @@ ln -sf pppoe-start %{buildroot}%{_sbindir}/adsl-start
 
 rm -rf %{buildroot}/etc/ppp/pppoe.conf \
        %{buildroot}/etc/rc.d/init.d/pppoe \
-       %{buildroot}/usr/doc \
        %{buildroot}%{_sysconfdir}/ppp/plugins
 
-%clean
-rm -rf %{buildroot}
-
 %preun
 if [ "$1" = "0" ]; then
    # Package removal, not upgrade
@@ -104,8 +105,7 @@ fi
 
 
 %files
-%defattr(-,root,root)
-%doc doc/LICENSE scripts/pppoe-connect scripts/pppoe-setup scripts/pppoe-init
+%doc scripts/pppoe-connect scripts/pppoe-setup scripts/pppoe-init
 %doc scripts/pppoe-start scripts/pppoe-status scripts/pppoe-stop
 %doc configs
 %config(noreplace) %{_sysconfdir}/ppp/pppoe-server-options
@@ -115,6 +115,11 @@ fi
 %{_mandir}/man?/*
 
 %changelog
+* Thu Jul 03 2014 Ralf Corsépius <corsepiu at fedoraproject.org> - 3.11-7
+- Let package honor %%_pkgdocdir (Fix F20FTBFS RHBZ #993206,
+  F21FTBFS RHBZ #1107035).
+- Modernize spec.
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.11-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list