From 1d9cc2fcbe17f7fb5b0b1ec8e289a72316e309c3 Mon Sep 17 00:00:00 2001 From: Bernhard Graf Date: Sat, 11 Oct 2014 19:03:56 +0200 Subject: [PATCH 1/2] Fixed RPM build. - use only $VER (no more $VER1) to avoid confusion - added themes directory --- README.md | 7 ++++--- bash-git-prompt.spec | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7f8dcf..3735b5b 100644 --- a/README.md +++ b/README.md @@ -260,10 +260,10 @@ from scratch by following this procedure: * Run the following command to create a tarball: ````sh - VER1=$(git describe) + VER=$(git describe) # replace dash with underscore to work around # rpmbuild does not allow dash in version string - VER=${VER1//\-/_} + VER=${VER//\-/_} git archive \ --format tar \ --prefix=bash-git-prompt-${VER}/ \ @@ -272,6 +272,7 @@ from scratch by following this procedure: *.py \ *.fish \ README.md \ + themes \ > bash-git-prompt-${VER}.tar mkdir -p /tmp/bash-git-prompt-${VER} sed "s/Version:.*/Version: ${VER}/" \ @@ -317,4 +318,4 @@ I accept tips through [Gittip][tip] and [Flattr][flattr]. [license]:https://github.com/magicmonty/bash-git-prompt/tree/master/LICENSE.txt [flattr]: https://flattr.com/submit/auto?user_id=magicmonty&url=https%3A%2F%2Fgithub.com%2Fmagicmonty%2Fbash-git-prompt [homebrew]: http://brew.sh/ -[upforgrabs]: https://github.com/magicmonty/bash-git-prompt/labels/up-for-grabs \ No newline at end of file +[upforgrabs]: https://github.com/magicmonty/bash-git-prompt/labels/up-for-grabs diff --git a/bash-git-prompt.spec b/bash-git-prompt.spec index a381b78..f2309c6 100644 --- a/bash-git-prompt.spec +++ b/bash-git-prompt.spec @@ -34,6 +34,8 @@ install -pm 755 *.sh %{buildroot}%{_datadir}/%{name} install -pm 755 *.py %{buildroot}%{_datadir}/%{name} install -pm 755 *.fish %{buildroot}%{_datadir}/%{name} install -pm 644 README.md %{buildroot}%{_datadir}/%{name} +install -d 755 %{buildroot}%{_datadir}/%{name}/themes +install -pm 644 themes/*.bgptheme %{buildroot}%{_datadir}/%{name}/themes # never include compiled Python program rm -fr %{buildroot}%{_datadir}/%{name}/*.pyo From ecb1fd955ed4141f62aba37e5accc6ee348991c5 Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Sat, 11 Oct 2014 21:08:09 +0200 Subject: [PATCH 2/2] Added custom template and theme variable to RPM spec --- bash-git-prompt.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bash-git-prompt.spec b/bash-git-prompt.spec index f2309c6..ab5f0a1 100644 --- a/bash-git-prompt.spec +++ b/bash-git-prompt.spec @@ -36,6 +36,7 @@ install -pm 755 *.fish %{buildroot}%{_datadir}/%{name} install -pm 644 README.md %{buildroot}%{_datadir}/%{name} 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 @@ -59,6 +60,7 @@ if [ -f %{_datadir}/%{name}/gitprompt.sh ]; then # Set config variables first GIT_PROMPT_ONLY_IN_REPO=1 + GIT_PROMPT_THEME=Default source %{_datadir}/%{name}/gitprompt.sh fi %{END_TOKEN}