[cowsay/f21] fix location of bash completion script

Matthew Miller mattdm at fedoraproject.org
Sat Feb 21 23:08:15 UTC 2015


commit 71d587c48e5bc34842866d4443894b1f315914c0
Author: Rahul Sundaram <sundaram at fedoraproject.org>
Date:   Fri Sep 26 19:17:22 2014 -0400

    fix location of bash completion script
    
    - don't own /etc/bash_completion.d/
    - drop redundant buildroot, defattr and clean

 cowsay.spec | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/cowsay.spec b/cowsay.spec
index 3499d45..c9b9148 100644
--- a/cowsay.spec
+++ b/cowsay.spec
@@ -1,6 +1,7 @@
+%define compdir %(pkg-config --variable=completionsdir bash-completion)
 Name:           cowsay
 Version:        3.03
-Release:        15%{?dist}
+Release:        16%{?dist}
 Summary:        Configurable speaking/thinking cow
 Group:          Amusements/Games
 License:        GPLv2+ or Artistic
@@ -10,8 +11,9 @@ Source1:        cowsay.bashcomp
 Source2:        animalsay
 Patch0:         cowsay-3.03-help.patch
 Patch1:         mech-and-cow.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
+BuildRequires:  bash-completion
+
 
 %description
 cowsay is a configurable talking cow, written in Perl.  It operates
@@ -47,22 +49,23 @@ cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
 chmod +x $RPM_BUILD_ROOT%{_bindir}/animalsay
 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/cowthink
 ln -s %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/cowthink.1
-
-cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+mkdir -p $RPM_BUILD_ROOT%{compdir}/
+cp %{SOURCE1} $RPM_BUILD_ROOT%{compdir}/
 
 %files
-%defattr(-,root,root,-)
 %doc ChangeLog LICENSE README
 %{_bindir}/*
 %{_mandir}/man1/cow*
 %{_datadir}/%{name}
-%{_sysconfdir}/bash_completion.d
+%(dirname %{compdir})
+
 
 %changelog
+* Fri Sep 26 2014 Rahul Sundaram <sundaram at fedoraproject.org> - 3.03-16
+- fix location of bash completion script
+- don't own /etc/bash_completion.d/
+- drop redundant buildroot, defattr and clean
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.03-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list