[nuxwdog] Fix UnversionedDocDir-installation issues (FTBFS RHBZ #1106553, RHBZ #992385).

corsepiu corsepiu at fedoraproject.org
Mon Jun 30 05:30:36 UTC 2014


commit 6eb0a56425b0e86a4bec22deb7e391ad120adc32
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Mon Jun 30 07:30:29 2014 +0200

    Fix UnversionedDocDir-installation issues (FTBFS RHBZ #1106553, RHBZ #992385).
    
    - Let nuxwdog package require perl(:MODULE_COMPAT_..).
    - Fix bogus %changelog date.

 nuxwdog.spec |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)
---
diff --git a/nuxwdog.spec b/nuxwdog.spec
index 866ab2c..535821b 100644
--- a/nuxwdog.spec
+++ b/nuxwdog.spec
@@ -1,6 +1,6 @@
 Name:           nuxwdog
 Version:        1.0.1
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        Watchdog server to start and stop processes, and prompt for passwords
 # The entire source code is LGPLv2 except for the perl module, which is GPL+ or Artistic
 License:        LGPLv2 and (GPL+ or Artistic)
@@ -8,6 +8,9 @@ Group:          System Environment/Libraries
 URL:            http://www.redhat.com/certificate_system
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# For epel5 and fc < 20 compatibility
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
 BuildRequires:  ant
 BuildRequires:  java-devel >= 1:1.6.0
 BuildRequires:  jpackage-utils
@@ -20,6 +23,7 @@ BuildRequires:  keyutils-libs-devel
 
 Requires:       nss
 Requires:       keyutils-libs
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Obsoletes:      nuxwdog-client
 Obsoletes:      nuxwdog-client-perl
 
@@ -66,6 +70,9 @@ server.
 %prep
 %setup -q -n %{name}-%{version}
 
+sed -i \
+  -e 's,^NUXWDOGCLIENT_DOCUMENTATION=${NUXWDOGCLIENT_BUILD_PREFIX}/.*$,NUXWDOGCLIENT_DOCUMENTATION=${NUXWDOGCLIENT_BUILD_PREFIX}%{_pkgdocdir},' setup_package
+
 %build
 ant \
     -Dproduct.ui.flavor.prefix="" \
@@ -76,18 +83,15 @@ ant \
 %ifarch ppc64 s390x sparc64 x86_64
     --enable-64bit \
 %endif
+    --docdir=%{_pkgdocdir} \
     --libdir=%{_libdir}
-make
+make licensedir=%{_pkgdocdir}
 
 %install
-rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} INSTALL="install -p"
+make install DESTDIR=%{buildroot} INSTALL="install -p" licensedir=%{_pkgdocdir}
 
 find %{buildroot} -name '*.la' -exec rm -f {} ';'
 
-mkdir -p  %{buildroot}%{_docdir}
-mv %{buildroot}%{_usr}/doc %{buildroot}%{_docdir}/%{name}-%{version}
-
 find %{buildroot}/%{perl_vendorarch} -name .packlist |xargs rm -f {}
 find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
 find %{buildroot} -name "perllocal.pod" |xargs rm -f {}
@@ -100,7 +104,6 @@ mkdir -p %{buildroot}%{_jnidir}
 cd %{buildroot}/%{_jnidir}
 ln -s %{_libdir}/nuxwdog-jni/nuxwdog-%{version}.jar nuxwdog.jar
 rm -rf %{buildroot}%{_usr}/jars
-rm -rf %{buildroot}%{_usr}/doc
 
 %post -p /sbin/ldconfig 
 
@@ -111,27 +114,30 @@ rm -rf %{buildroot}
 
 %files 
 %defattr(-,root,root,-)
-%doc LICENSE
+%_pkgdocdir
 %{_bindir}/*
 %{_libdir}/libnuxwdog.so.*
 %{_mandir}/man3/Nuxwdogclient.3pm*
 %{_mandir}/man1/nuxwdog.1*
-%{perl_vendorarch}/*
-%exclude %dir %{perl_vendorarch}/auto/
+%{perl_vendorarch}/Nuxwdogclient.pm
+%{perl_vendorarch}/auto/Nuxwdogclient
 
 %files devel
 %defattr(-,root,root,-)
-%doc 
 %{_includedir}/nuxwdog/
 %{_libdir}/libnuxwdog.so
 
 %files client-java
 %defattr(-,root,root,-)
-%doc
 %{_libdir}/nuxwdog-jni/
 %{_jnidir}/*
 
 %changelog
+* Mon Jun 30 2014 Ralf Corsépius <corsepiu at fedoraproject.org> - 1.0.1-12
+- Fix UnversionedDocDir-installation issues (FTBFS RHBZ #1106553, RHBZ #992385).
+- Let nuxwdog package require perl(:MODULE_COMPAT_..).
+- Fix bogus %%changelog date.
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -179,7 +185,7 @@ rm -rf %{buildroot}
 - Remove old encryption scheme
 - Store passwords in kernel keyring
 
-* Wed Dec 16 2010 Ade Lee <alee at redhat.com> 1.0.0-13
+* Thu Dec 16 2010 Ade Lee <alee at redhat.com> 1.0.0-13
 - Resolves: #643546 - [RFE] Add nuxwdog to RHEL.
 
 * Wed Dec 15 2010 Ade Lee <alee at redhat.com> 1.0.0-12


More information about the scm-commits mailing list