summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD38
-rw-r--r--autoenv.install13
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..04e7f1aa29b5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = autoenv-git
+ pkgdesc = Directory based enviroments
+ pkgver = 1.0.0.r102.c4bc3f5
+ pkgrel = 2
+ url = https://github.com/kennethreitz/autoenv
+ install = autoenv.install
+ arch = any
+ license = custom
+ makedepends = git
+ depends = bash
+ optdepends = zsh: if you prefer zsh over bash
+ conflicts = autoenv
+ source = git+https://github.com/kennethreitz/autoenv.git
+ sha256sums = SKIP
+
+pkgname = autoenv-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4555610ce34b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+pkgname=autoenv-git
+pkgver=1.0.0.r102.c4bc3f5
+pkgrel=2
+pkgdesc='Directory based enviroments'
+arch=('any')
+url='https://github.com/kennethreitz/autoenv'
+license=('custom')
+source=('git+https://github.com/kennethreitz/autoenv.git')
+sha256sums=('SKIP')
+depends=('bash')
+optdepends=('zsh: if you prefer zsh over bash')
+install='autoenv.install'
+makedepends=('git')
+conflicts=('autoenv')
+
+pkgver() {
+ cd autoenv
+ set -o pipefail
+ git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+
+ # If there is a setup.py then pull the version tag from the file
+ if [ -f "setup.py" ]; then
+ printf "%s." "$(grep -R "version=" setup.py | awk -F\' '{print $2}')"
+ fi
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd autoenv
+
+ install -D -m755 activate.sh "${pkgdir}/usr/share/${pkgname}/activate.sh"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/autoenv.install b/autoenv.install
new file mode 100644
index 000000000000..e4363ea490d0
--- /dev/null
+++ b/autoenv.install
@@ -0,0 +1,13 @@
+post_install() {
+ echo "Before using this you need to add it to your .bashrc or .zshrc"
+ echo
+ echo "For Bash:"
+ echo "echo 'source /usr/share/autoenv-git/activate.sh' >> ~/.bashrc && source ~/.bashrc"
+ echo
+ echo "For ZSH:"
+ echo "echo 'source /usr/share/autoenv-git/activate.sh' >> ~/.zshrc && source ~/.zshrc"
+ echo
+ echo "Note: Autoenv overrides cd. If you already do this, invoke autoenv_init within your custom cd after sourcing activate.sh."
+}
+
+