summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Manouchehri2015-08-26 11:33:10 -0400
committerDavid Manouchehri2015-08-26 11:33:10 -0400
commitbb33fd3353ba9dcbda19cf75be55319545e83897 (patch)
tree98dec254480584a8085136d9480750c07d316a84
downloadaur-bb33fd3353ba9dcbda19cf75be55319545e83897.tar.gz
Initial import from AUR3.
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD46
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..eff3f8f0ec35
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by makepkg 4.2.1
+# Thu Apr 2 08:03:28 UTC 2015
+pkgbase = hg-fast-export-git
+ pkgdesc = A mercurial to git converter using git-fast-import.
+ pkgver = r408.d202200
+ pkgrel = 2
+ url = http://repo.or.cz/w/fast-export.git
+ arch = any
+ license = MIT
+ depends = python2
+ depends = mercurial
+ provides = hg-fast-export
+ conflicts = hg-fast-export
+ source = git+http://repo.or.cz/r/fast-export.git
+ sha512sums = SKIP
+
+pkgname = hg-fast-export-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3b364da801f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: David Manouchehri <david@davidmanouchehri.com>
+# Contributor: Techlive Zheng <techlivezheng@gmail.com>
+# Contributor: Bhanupong Petchlert <bpetlert@gmail.com>
+# Contributor: Michal Rus <m@michalrus.com>
+
+pkgname=hg-fast-export-git
+_pkgname='fast-export'
+pkgver=r408.d202200
+pkgrel=2
+pkgdesc="A mercurial to git converter using git-fast-import."
+arch=('any')
+url="http://repo.or.cz/w/fast-export.git"
+license=('MIT')
+depends=('python2' 'mercurial')
+provides=('hg-fast-export')
+conflicts=('hg-fast-export')
+source=('git+http://repo.or.cz/r/fast-export.git')
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+
+ # Use python2
+ sed -i "s/PYTHON=\${PYTHON:-python}/PYTHON=\${PYTHON:-python2}/" hg-fast-export.sh
+ sed -i "s/env\ python/env\ python2/" hg-fast-export.py
+ sed -i "s/PYTHON=\${PYTHON:-python}/PYTHON=\${PYTHON:-python2}/" hg-reset.sh
+ sed -i "s/env\ python/env\ python2/" hg-reset.py
+ sed -i "s/env\ python/env\ python2/" hg2git.py
+
+ # Fix root dir
+ sed -i "s/^ROOT=.*$/ROOT=\$\(dirname\ \"\$\(readlink\ -f\ \$0\)\"\)/" hg-fast-export.sh
+ sed -i "s/^ROOT=.*$/ROOT=\$\(dirname\ \"\$\(readlink\ -f\ \$0\)\"\)/" hg-reset.sh
+}
+
+package() {
+ mkdir -p "${pkgdir}"/usr/share/hg-fast-export
+ install -D -m 755 "${srcdir}"/"${_pkgname}"/hg* "${pkgdir}"/usr/share/hg-fast-export/
+
+ mkdir -p ${pkgdir}/usr/bin
+ ln -s /usr/share/hg-fast-export/hg-fast-export.sh "${pkgdir}"/usr/bin/hg-fast-export
+}