From c07e0fe86fddb3b235876e93952d8d808bbaa530 Mon Sep 17 00:00:00 2001 From: Koustubh Sinkar Date: Sat, 30 Jul 2016 15:30:45 +0530 Subject: [PATCH] Making the SPEC file more standards compliant 1. Adding comments after %build as building is not required in this case 2. Putting the %post and %postun sections after %clean 3. Adding to the %changelog --- bash-git-prompt.spec | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/bash-git-prompt.spec b/bash-git-prompt.spec index 63a7208..6931ffe 100644 --- a/bash-git-prompt.spec +++ b/bash-git-prompt.spec @@ -8,7 +8,7 @@ Summary: Informative git prompt for bash and fish Group: Development/Tools License: FreeBSD -URL: https://github.com/magicmonty/bash-git-prompt.git +URL: https://github.com/magicmonty/bash-git-prompt Source0: https://github.com/magicmonty/%{name}/archive/%{version}.tar.gz Requires: git BuildArch: noarch @@ -22,13 +22,11 @@ install. It will disable the prompt accordingly after uninstall. %prep %setup -q - %build - +# No command are required here +# These comments are here to avoid rpm lint issue %install -rm -rf %{buildroot} - install -d 755 %{buildroot}%{_datadir}/%{name} install -pm 755 *.sh %{buildroot}%{_datadir}/%{name} #install -pm 755 *.py %{buildroot}%{_datadir}/%{name} @@ -38,20 +36,6 @@ install -d 755 %{buildroot}%{_datadir}/%{name}/themes install -pm 644 themes/*.bgptheme %{buildroot}%{_datadir}/%{name}/themes install -pm 644 themes/*.bgptemplate %{buildroot}%{_datadir}/%{name}/themes -# never include compiled Python program -#rm -fr %{buildroot}%{_datadir}/%{name}/*.pyo -#rm -fr %{buildroot}%{_datadir}/%{name}/*.pyc - - -%clean -rm -rf %{buildroot} - - -%files -%defattr(-,root,root,-) -%{_datadir}/%{name} - - %post # enable bash-git-prompt cat << EOF >> /etc/bashrc @@ -70,6 +54,10 @@ EOF # remove bash-git-prompt setup sed -i -e '/^%{START_TOKEN}/, /^%{END_TOKEN}/{d}' /etc/bashrc +%files +%defattr(-,root,root,-) +%{_datadir}/%{name} + %doc README.md %license License.txt @@ -77,3 +65,6 @@ sed -i -e '/^%{START_TOKEN}/, /^%{END_TOKEN}/{d}' /etc/bashrc %changelog * Fri Aug 08 2014 Justin Zhang +- Updating the spec file to reflect more recent changes