[beakerlib: 4/4] Fix two packaging issues

Petr Muller afri at fedoraproject.org
Wed Jul 25 16:14:51 UTC 2012


commit 1a74ffd734f178acba3e346fca8a1eadaf0924aa
Author: Petr Muller <muller at redhat.com>
Date:   Wed Jul 25 18:14:00 2012 +0200

    Fix two packaging issues

 0001-install-dir.patch       |   40 ++++++++++++++++++++++++++++++++++++++++
 0002-install-more-docs.patch |   25 +++++++++++++++++++++++++
 beakerlib.spec               |    9 ++++++++-
 3 files changed, 73 insertions(+), 1 deletions(-)
---
diff --git a/0001-install-dir.patch b/0001-install-dir.patch
new file mode 100644
index 0000000..1c8871d
--- /dev/null
+++ b/0001-install-dir.patch
@@ -0,0 +1,40 @@
+From 9faaca049ddf4724aa5a02b4917717f478cc348a Mon Sep 17 00:00:00 2001
+From: Petr Muller <muller at redhat.com>
+Date: Wed, 25 Jul 2012 17:30:57 +0200
+Subject: [PATCH] Revert the configurable default BL installation dir
+
+(it broke RPMs building)
+---
+ src/Makefile     | 2 --
+ src/beakerlib.sh | 2 +-
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 70f51eb..7a309dd 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -60,8 +60,6 @@ install: $(FILES) docsman gendict
+ 	install -p -m 644 examples/apache/* $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/examples/apache
+ 
+ 	install -p -m 644 $(FILES) $(DESTDIR)/usr/share/beakerlib
+-	sed -i -e 's|INSTALLPATH|$(DESTDIR)|' $(DESTDIR)/usr/share/beakerlib/beakerlib.sh
+-
+ 	install -p -m 644 dictionary.vim $(DESTDIR)/usr/share/beakerlib
+ 
+ 	install -p python/rlMemAvg.py $(DESTDIR)/usr/bin/beakerlib-rlMemAvg
+diff --git a/src/beakerlib.sh b/src/beakerlib.sh
+index 67e4ae0..4cf7441 100644
+--- a/src/beakerlib.sh
++++ b/src/beakerlib.sh
+@@ -273,7 +273,7 @@ fi
+ test -f /etc/profile.d/cobbler.sh && . /etc/profile.d/cobbler.sh
+ 
+ set -e
+-export BEAKERLIB=${BEAKERLIB:-"INSTALLPATH"}
++export BEAKERLIB=${BEAKERLIB:-"/usr/share/beakerlib"}
+ . $BEAKERLIB/infrastructure.sh
+ . $BEAKERLIB/journal.sh
+ . $BEAKERLIB/logging.sh
+-- 
+1.7.11.2
+
diff --git a/0002-install-more-docs.patch b/0002-install-more-docs.patch
new file mode 100644
index 0000000..10952a3
--- /dev/null
+++ b/0002-install-more-docs.patch
@@ -0,0 +1,25 @@
+From 9cb0ceb625061cc4704ca765dfbf80809bed4ef8 Mon Sep 17 00:00:00 2001
+From: Petr Muller <muller at redhat.com>
+Date: Wed, 25 Jul 2012 17:50:02 +0200
+Subject: [PATCH] Install also few more files (README & friends) to docs
+
+---
+ Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 6b91a43..edfd47b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,6 +18,8 @@ build:
+ 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 VERSION $(DESTDIR)/usr/share/doc/$(PKGNAME)-$(PKGVERSION)/
+ 
+ 	for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
+ 
+-- 
+1.7.11.2
+
diff --git a/beakerlib.spec b/beakerlib.spec
index c0e50dd..4954b89 100644
--- a/beakerlib.spec
+++ b/beakerlib.spec
@@ -12,6 +12,10 @@ Requires:   nfs-utils
 Requires:   python2
 
 
+Patch0: 0001-install-dir.patch
+Patch1: 0002-install-more-docs.patch
+
+
 %description
 The BeakerLib project means to provide a library of various helpers, which
 could be used when writing operating system level integration tests.
@@ -19,7 +23,8 @@ could be used when writing operating system level integration tests.
 
 %prep
 %setup -q
-
+%patch0 -p1 -b .install-dir
+%patch1 -p1 -b .install-more-docs
 
 %build
 # This section is empty because this package ccontains shell scripts
@@ -45,6 +50,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_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}/examples/*/*
 
 %changelog


More information about the scm-commits mailing list