[createrepo] pkg-config bash-completion: add defaults
Zdeněk Pavlas
zpavlas at fedoraproject.org
Wed Mar 20 12:58:40 UTC 2013
commit a645ca3e991585b83f0c07b3e892aae220b810aa
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Wed Mar 20 13:58:07 2013 +0100
pkg-config bash-completion: add defaults
createrepo-head.patch | 22 +++++++++++++---------
createrepo.spec | 3 +++
2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/createrepo-head.patch b/createrepo-head.patch
index 01fa454..fcc58c4 100644
--- a/createrepo-head.patch
+++ b/createrepo-head.patch
@@ -1,5 +1,5 @@
diff --git a/Makefile b/Makefile
-index 60bb9db..356bb50 100644
+index 60bb9db..f8277fd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
@@ -8,15 +8,16 @@ index 60bb9db..356bb50 100644
VERSION=$(shell awk '/Version:/ { print $$2 }' ${PKGNAME}.spec)
RELEASE=$(shell awk '/Release:/ { print $$2 }' ${PKGNAME}.spec)
CVSTAG=createrepo-$(subst .,_,$(VERSION)-$(RELEASE))
-@@ -26,6 +27,7 @@ docdir =
+@@ -26,6 +27,8 @@ docdir =
includedir = ${prefix}/include
oldincludedir = /usr/include
mandir = ${prefix}/share/man
+compdir = $(shell pkg-config --variable=completionsdir bash-completion)
++compdir := $(or $(compdir), "/usr/share/bash-completion/completions")
pkgdatadir = $(datadir)/$(PKGNAME)
pkglibdir = $(libdir)/$(PKGNAME)
-@@ -33,7 +35,7 @@ pkgincludedir = $(includedir)/$(PKGNAME)
+@@ -33,7 +36,7 @@ pkgincludedir = $(includedir)/$(PKGNAME)
top_builddir =
# all dirs
@@ -25,7 +26,7 @@ index 60bb9db..356bb50 100644
$(DESTDIR)$(pkgdatadir) $(DESTDIR)$(mandir)
-@@ -65,7 +67,8 @@ check:
+@@ -65,7 +68,8 @@ check:
install: all installdirs
$(INSTALL_MODULES) $(srcdir)/$(MODULES) $(DESTDIR)$(pkgdatadir)
@@ -138,18 +139,21 @@ index 54ac8b2..f5a8bb7 100644
fi
done
diff --git a/createrepo.spec b/createrepo.spec
-index 1e491cd..46992c0 100644
+index 1e491cd..cfa7f61 100644
--- a/createrepo.spec
+++ b/createrepo.spec
-@@ -1,4 +1,7 @@
+@@ -1,4 +1,10 @@
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+# disable broken /usr/lib/rpm/brp-python-bytecompile
+%define __os_install_post %{nil}
+%define compdir %(pkg-config --variable=completionsdir bash-completion)
++%if "%{compdir}" == ""
++%define compdir "/usr/share/bash-completion/completions"
++%endif
Summary: Creates a common metadata repository
Name: createrepo
-@@ -11,7 +14,7 @@ URL: http://createrepo.baseurl.org/
+@@ -11,7 +17,7 @@ URL: http://createrepo.baseurl.org/
BuildRoot: %{_tmppath}/%{name}-%{version}root
BuildArchitectures: noarch
Requires: python >= 2.1, rpm-python, rpm >= 0:4.1.1, libxml2-python
@@ -158,7 +162,7 @@ index 1e491cd..46992c0 100644
%description
This utility will generate a common metadata repository from a directory of
-@@ -32,7 +35,7 @@ make DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
+@@ -32,7 +38,7 @@ make DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
%defattr(-, root, root)
%dir %{_datadir}/%{name}
%doc ChangeLog README COPYING COPYING.lib
@@ -167,7 +171,7 @@ index 1e491cd..46992c0 100644
%{_datadir}/%{name}/*
%{_bindir}/%{name}
%{_bindir}/modifyrepo
-@@ -43,6 +46,9 @@ make DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
+@@ -43,6 +49,9 @@ make DESTDIR=$RPM_BUILD_ROOT sysconfdir=%{_sysconfdir} install
%{python_sitelib}/createrepo
%changelog
diff --git a/createrepo.spec b/createrepo.spec
index af2338b..aff24f4 100644
--- a/createrepo.spec
+++ b/createrepo.spec
@@ -2,6 +2,9 @@
# disable broken /usr/lib/rpm/brp-python-bytecompile
%define __os_install_post %{nil}
%define compdir %(pkg-config --variable=completionsdir bash-completion)
+%if "%{compdir}" == ""
+%define compdir "/usr/share/bash-completion/completions"
+%endif
Summary: Creates a common metadata repository
Name: createrepo
More information about the scm-commits
mailing list