summaryrefslogtreecommitdiff
path: root/python/hgsubversion/hgsubversion.SlackBuild
diff options
context:
space:
mode:
authorAudrius Kažukauskas <audrius@neutrino.lt>2011-07-20 10:00:41 -0300
committerRobby Workman <rworkman@slackbuilds.org>2011-07-21 22:52:14 -0500
commit397db8da59dd174a69bda4994658d66dbe15412e (patch)
treee806115e56c139efa232323c265b073137ba1d32 /python/hgsubversion/hgsubversion.SlackBuild
parent6ebd349fd75a33f5999dec973aa3aad9159d8867 (diff)
downloadslackbuilds-397db8da59dd174a69bda4994658d66dbe15412e.tar.gz
python/hgsubversion: Added (Mercurial extension for SVN)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'python/hgsubversion/hgsubversion.SlackBuild')
-rw-r--r--python/hgsubversion/hgsubversion.SlackBuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/python/hgsubversion/hgsubversion.SlackBuild b/python/hgsubversion/hgsubversion.SlackBuild
new file mode 100644
index 0000000000..102910f8e4
--- /dev/null
+++ b/python/hgsubversion/hgsubversion.SlackBuild
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Slackware build script for hgsubversion
+# Written by Audrius Kažukauskas <audrius@neutrino.lt>
+
+PRGNAM=hgsubversion
+VERSION=${VERSION:-1.2.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+python setup.py install --root=$PKG
+
+mkdir -p $PKG/etc/mercurial/hgrc.d
+cat > $PKG/etc/mercurial/hgrc.d/hgsubversion.rc.new << EOF
+# Enable hgsubversion extension.
+[extensions]
+hgsubversion =
+EOF
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/COPYING > $PKG/usr/doc/$PRGNAM-$VERSION/COPYING
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}