Update for Unversioned Docdirs
This commit is contained in:
parent
1f4f50f9df
commit
27995b3847
@ -1,7 +1,7 @@
|
||||
Name: beakerlib
|
||||
Summary: A shell-level integration testing library
|
||||
Version: 1.8
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
@ -13,7 +13,7 @@ Requires: python2
|
||||
Requires: grep
|
||||
Requires: sed
|
||||
BuildRequires: /usr/bin/pod2man
|
||||
|
||||
Patch0: configurable-docdir.patch
|
||||
|
||||
%description
|
||||
The BeakerLib project means to provide a library of various helpers, which
|
||||
@ -22,14 +22,16 @@ could be used when writing operating system level integration tests.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .configurable-docdir
|
||||
|
||||
%build
|
||||
make build
|
||||
|
||||
|
||||
%install
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
make PKGDOCDIR=%{_pkgdocdir} DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
|
||||
%clean
|
||||
@ -39,20 +41,23 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_docdir}/%{name}-%{version}
|
||||
%dir %{_docdir}/%{name}-%{version}/examples
|
||||
%dir %{_docdir}/%{name}-%{version}/examples/*
|
||||
%dir %{_pkgdocdir}
|
||||
%dir %{_pkgdocdir}/examples
|
||||
%dir %{_pkgdocdir}/examples/*
|
||||
%{_datadir}/%{name}/dictionary.vim
|
||||
%{_datadir}/%{name}/*.sh
|
||||
%{_bindir}/%{name}-*
|
||||
%{_mandir}/man1/%{name}*1*
|
||||
%doc %{_docdir}/%{name}-%{version}/LICENSE
|
||||
%doc %{_docdir}/%{name}-%{version}/README
|
||||
%doc %{_docdir}/%{name}-%{version}/VERSION
|
||||
%doc %{_docdir}/%{name}-%{version}/MAINTENANCE
|
||||
%doc %{_docdir}/%{name}-%{version}/examples/*/*
|
||||
%doc %{_pkgdocdir}/LICENSE
|
||||
%doc %{_pkgdocdir}/README
|
||||
%doc %{_pkgdocdir}/VERSION
|
||||
%doc %{_pkgdocdir}/MAINTENANCE
|
||||
%doc %{_pkgdocdir}/examples/*/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2013 Petr Muller <muller@redhat.com> - 1.8-4
|
||||
- Fix docdir usage to comply with Unversioned Docdirs
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
|
||||
82
configurable-docdir.patch
Normal file
82
configurable-docdir.patch
Normal file
@ -0,0 +1,82 @@
|
||||
From 06cbdb009b82fcc362e3df1754c2cbb28f3e88c2 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Muller <muller@redhat.com>
|
||||
Date: Tue, 20 Aug 2013 17:24:02 +0200
|
||||
Subject: [PATCH] Squashed commit of the following:
|
||||
|
||||
commit dd7d8a859df2b66e96d332d07cd9fb94186756b3
|
||||
Author: Petr Muller <muller@redhat.com>
|
||||
Date: Tue Aug 20 17:12:03 2013 +0200
|
||||
|
||||
Fix new DOCDIR variable clash
|
||||
|
||||
commit 9faa4cd93e3bcd621edcf48646b590fc68dbdc74
|
||||
Author: Petr Muller <muller@redhat.com>
|
||||
Date: Tue Aug 20 16:25:22 2013 +0200
|
||||
|
||||
Make doc directory unversioned and configurable
|
||||
---
|
||||
Makefile | 14 +++++++++-----
|
||||
src/Makefile | 14 +++++++-------
|
||||
2 files changed, 16 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c6c9f7f..1f13e86 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -8,6 +8,10 @@ ifndef DD
|
||||
DD:=/
|
||||
endif
|
||||
|
||||
+ifndef PKGDOCDIR
|
||||
+ export PKGDOCDIR := /usr/share/doc/$(PKGNAME)/
|
||||
+endif
|
||||
+
|
||||
export DESTDIR := $(shell readlink -f -n $(DD))
|
||||
|
||||
SUBDIRS := src
|
||||
@@ -16,11 +20,11 @@ build:
|
||||
for i in $(SUBDIRS); do $(MAKE) -C $$i; done
|
||||
|
||||
install:
|
||||
- mkdir -p $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
|
||||
- install -m 644 -p LICENSE $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
|
||||
- install -m 644 -p README $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
|
||||
- install -m 644 -p MAINTENANCE $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
|
||||
- install -m 644 -p VERSION $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
|
||||
+ mkdir -p $(DESTDIR)$(PKGDOCDIR)
|
||||
+ install -m 644 -p LICENSE $(DESTDIR)$(PKGDOCDIR)
|
||||
+ install -m 644 -p README $(DESTDIR)$(PKGDOCDIR)
|
||||
+ install -m 644 -p MAINTENANCE $(DESTDIR)$(PKGDOCDIR)
|
||||
+ install -m 644 -p VERSION $(DESTDIR)$(PKGDOCDIR)
|
||||
|
||||
for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 2a98a7e..74748a2 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -46,14 +46,14 @@ install:
|
||||
mkdir -p $(DESTDIR)/usr/share/beakerlib
|
||||
mkdir -p $(DESTDIR)/usr/share/man/man1
|
||||
mkdir -p $(DESTDIR)/usr/bin
|
||||
- mkdir -p $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/
|
||||
- mkdir -p $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/simple
|
||||
- mkdir -p $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/phases
|
||||
- mkdir -p $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/apache
|
||||
+ mkdir -p $(DESTDIR)/$(PKGDOCDIR)/examples/
|
||||
+ mkdir -p $(DESTDIR)/$(PKGDOCDIR)/examples/simple
|
||||
+ mkdir -p $(DESTDIR)/$(PKGDOCDIR)/examples/phases
|
||||
+ mkdir -p $(DESTDIR)/$(PKGDOCDIR)/examples/apache
|
||||
|
||||
- install -p -m 644 examples/simple/* $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/simple
|
||||
- install -p -m 644 examples/phases/* $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/phases
|
||||
- install -p -m 644 examples/apache/* $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/apache
|
||||
+ install -p -m 644 examples/simple/* $(DESTDIR)/$(PKGDOCDIR)/examples/simple
|
||||
+ install -p -m 644 examples/phases/* $(DESTDIR)/$(PKGDOCDIR)/examples/phases
|
||||
+ install -p -m 644 examples/apache/* $(DESTDIR)/$(PKGDOCDIR)/examples/apache
|
||||
|
||||
install -p -m 644 $(FILES) $(DESTDIR)/usr/share/beakerlib
|
||||
install -p -m 644 dictionary.vim $(DESTDIR)/usr/share/beakerlib
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user