Install bash completion to where bash-completion.pc says
- Mark COPYING as %license where available
This commit is contained in:
parent
3e5db981c1
commit
3ed6f894ce
28
darcs.spec
28
darcs.spec
|
@ -14,7 +14,7 @@
|
|||
# override pkg_name to allow for darcs-beta
|
||||
Name: darcs
|
||||
Version: 2.8.5
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Distributed Advanced Revision Control System
|
||||
|
||||
License: GPLv2+
|
||||
|
@ -51,6 +51,7 @@ BuildRequires: ghc-vector-devel
|
|||
BuildRequires: ghc-zlib-devel
|
||||
BuildRequires: libcurl-devel%{?_isa}
|
||||
# End cabal-rpm deps
|
||||
BuildRequires: bash-completion
|
||||
%if %{with html}
|
||||
BuildRequires: latex2html
|
||||
%endif
|
||||
|
@ -151,8 +152,15 @@ touch %{buildroot}%{_bindir}/%{name}
|
|||
rm %{buildroot}%{_pkgdocdir}/COPYING
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||
cp -p contrib/darcs_completion %{buildroot}%{_sysconfdir}/bash_completion.d/darcs
|
||||
bashcompdir=$(pkg-config --variable=completionsdir bash-completion || :)
|
||||
if [ "$bashcompdir" ]; then
|
||||
install -Dpm 644 contrib/darcs_completion $RPM_BUILD_ROOT$bashcompdir/darcs
|
||||
echo %{_datadir}/bash-completion > %{name}.files
|
||||
else
|
||||
install -Dpm 644 contrib/darcs_completion \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/darcs
|
||||
echo %{_sysconfdir}/bash_completion.d > %{name}.files
|
||||
fi
|
||||
|
||||
|
||||
%if %{with static}
|
||||
|
@ -203,14 +211,15 @@ fi
|
|||
%ghc_pkg_recache
|
||||
|
||||
|
||||
%files
|
||||
%files -f %{name}.files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%doc contrib/_darcs.zsh
|
||||
%config(noreplace) %{_sysconfdir}/bash_completion.d/darcs
|
||||
%if %{with static}
|
||||
%ghost %{_bindir}/%{name}
|
||||
%{_bindir}/%{name}.dynamic
|
||||
%else
|
||||
%doc COPYING NEWS
|
||||
%license COPYING
|
||||
%doc NEWS
|
||||
%{_bindir}/darcs
|
||||
%endif
|
||||
%attr(0644,-,-) %{_mandir}/man1/darcs.1*
|
||||
|
@ -221,7 +230,8 @@ fi
|
|||
|
||||
%if %{with static}
|
||||
%files common
|
||||
%doc COPYING NEWS
|
||||
%license COPYING
|
||||
%doc NEWS
|
||||
|
||||
|
||||
%files static
|
||||
|
@ -237,6 +247,10 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Jun 15 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.8.5-3
|
||||
- Install bash completion to where bash-completion.pc says
|
||||
- Mark COPYING as %%license where available
|
||||
|
||||
* Mon Apr 6 2015 Jens Petersen <petersen@redhat.com> - 2.8.5-2
|
||||
- do not own bash_completion.d/ (#1192805)
|
||||
|
||||
|
|
Loading…
Reference in New Issue