[git-extras] Initial import (#970130)
besser82
besser82 at fedoraproject.org
Mon Jun 10 12:07:37 UTC 2013
commit ecf4eab68b37cc969c989696abcaeea7fbf85c7c
Author: Björn Esser <bjoern.esser at gmail.com>
Date: Mon Jun 10 14:06:05 2013 +0200
Initial import (#970130)
.gitignore | 1 +
git-extras.spec | 85 +++++++++++++++++++++++++++++++++++++++
git-extras_fix_grep_error.patch | 20 +++++++++
git-extras_fix_hashbang.patch | 9 ++++
sources | 1 +
5 files changed, 116 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6d541eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/git-extras-1.8.0.tar.gz
diff --git a/git-extras.spec b/git-extras.spec
new file mode 100644
index 0000000..54435a0
--- /dev/null
+++ b/git-extras.spec
@@ -0,0 +1,85 @@
+Name: git-extras
+Version: 1.8.0
+Release: 2%{?dist}
+Summary: Little git extras
+Group: Development/Tools
+
+License: MIT
+URL: https://github.com/visionmedia/%{name}
+Source0: https://github.com/visionmedia/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+# FIXED: `grep: invalid max count`
+Patch0: git-extras_fix_grep_error.patch
+# FIXED: missing hashbang in bin/git-obliterate
+Patch1: git-extras_fix_hashbang.patch
+# all patches committed to upstream, see:
+# https://github.com/visionmedia/git-extras/pull/175
+
+BuildArch: noarch
+BuildRequires: groff-base rubygem-ronn
+Requires: bash-completion git
+
+%description
+%{name} adds the following extra-commands to git:
+
+alias, archive-file, bug, changelog, commits-since, contrib, count,
+create-branch, delete-branch, delete-submodule, delete-tag, effort,
+extras, feature, fresh-branch, gh-pages, graft, ignore, info,
+local-commits, obliterate, promote, refactor, release, repl, setup,
+squash, summary, touch, undo
+
+For more information about the extra-commands, see the included
+README.md, HTML, mark-down or man-pages.
+
+
+%prep
+%setup -q
+%patch0
+%patch1
+# remove `/usr/bin/env` from hashbang
+# some scripts contain bashisms
+# prefer bash over sh
+sed -i -e "s/\/env[ \t]*/\//g" \
+ -e "s/\/usr\/bin\/.*sh/\/bin\/bash/g" \
+ -e "s/\/bin\/sh/\/bin\/bash/g" \
+ bin/*
+
+%build
+# stop ruby split-method compaining about
+# `invalid byte sequence in US-ASCII (ArgumentError)`
+# by exporting UTF-8 encoding to C-locale.
+export LC_CTYPE="en_US.UTF-8"
+pushd man
+# build manpages and HTML-doc
+./manning-up.sh
+# replace all (escaped-dots) (\.) with the proper
+# escape-sequence for <dot> in manpages (\[char46])
+# (rubygem-)ronn doesn't handle this correctly.
+sed -ie "s/\\\\\./\\\\\[char46\]/g" *.1
+popd
+
+
+%install
+%make_install PREFIX=%{_prefix}
+mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d \
+ html md
+install -pm 0644 etc/bash_completion.sh \
+ %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
+install -pm 0644 man/*.html html
+install -pm 0644 man/*.md md
+
+
+%files
+%config(noreplace) %{_sysconfdir}/bash_completion.d/*
+%doc AUTHORS History.md LICENSE Readme.md html/ md/
+%{_bindir}/*
+%{_mandir}/man*/*
+
+
+%changelog
+* Fri Jun 07 2013 Björn Esser <bjoern.esser at gmail.com> - 1.8.0-2
+- added missing %%{version} in Source0
+- added missing %%{name} in `install etc/bash_completion.sh`-line
+
+* Mon Jun 03 2013 Björn Esser <bjoern.esser at gmail.com> - 1.8.0-1
+- Initial rpm release
diff --git a/git-extras_fix_grep_error.patch b/git-extras_fix_grep_error.patch
new file mode 100644
index 0000000..932eb2c
--- /dev/null
+++ b/git-extras_fix_grep_error.patch
@@ -0,0 +1,20 @@
+Index: git-extras-1.8.0/man/manning-up.sh
+===================================================================
+--- man/manning-up.sh
++++ man/manning-up.sh
+@@ -9,13 +9,14 @@
+ extra=${file/.md/}
+ spaced=" "
+ echo "$extra(1)${spaced:${#extra}}$extra" >> index.txt.tmp;
+- title=$(grep -m=1 $extra"(1) -- " $file)
++ title=$(grep -m1 $extra"(1) -- " $file)
+ test "$extra" != "git-extras" && echo " - **"${title/" --"/"**"} >> git-extras.md.tmp
+ done
+ ln=$(awk '/## AUTHOR/{print NR};' ./git-extras.md)
+ awk "NR >= $ln-1" git-extras.md >> git-extras.md.tmp && mv -f index.txt.tmp index.txt && mv -f git-extras.md.tmp git-extras.md
+
+ for file in $(ls git*.md); do
++ echo -e "\nprocessing: $file"
+ extra=${file/.md/}
+ ronn $file && mv -f $extra.1.html $extra.html
+ done
diff --git a/git-extras_fix_hashbang.patch b/git-extras_fix_hashbang.patch
new file mode 100644
index 0000000..7225c9d
--- /dev/null
+++ b/git-extras_fix_hashbang.patch
@@ -0,0 +1,9 @@
+Index: git-extras-1.8.0/bin/git-obliterate
+===================================================================
+--- bin/git-obliterate
++++ bin/git-obliterate
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ file=$1
+ test -z $file && echo "file required." 1>&2 && exit 1
+ git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all
diff --git a/sources b/sources
index e69de29..f19cd8c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3f05a8ea87afa6780eece3d34a690ee5 git-extras-1.8.0.tar.gz
More information about the scm-commits
mailing list