summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Neumann2015-09-29 17:57:54 +0200
committerRichard Neumann2015-09-29 17:57:54 +0200
commit873ed93072b58bdf5ce9968aaa49505cf938528a (patch)
treeac6cfcc2e5a66eea643b69043ab78aeb6a431eec
downloadaur-873ed93072b58bdf5ce9968aaa49505cf938528a.tar.gz
init
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD47
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f1a660096bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = python-magic-git
+ pkgdesc = Python 3 packages for alternative (github) implementation of python-magic
+ pkgver = 0.4.6
+ pkgrel = 3
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = sed
+ depends = python
+ conflicts = python-magic
+ source = python-magic-git::git+https://github.com/ahupp/python-magic
+ md5sums = SKIP
+
+pkgname = python-magic-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..46b09ed0051
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+#
+# Python 3 packages for alternative (github) implementation of python-magic
+#
+
+pkgname='python-magic-git'
+pkgver='0.4.6'
+pkgrel=3
+pkgdesc="Python 3 packages for alternative (github) implementation of python-magic"
+arch=('any')
+license=('MIT')
+depends=('python')
+makedepends=('git' 'sed')
+conflicts=('python-magic')
+
+source=("${pkgname}::git+https://github.com/ahupp/python-magic")
+md5sums=('SKIP')
+
+pkgdir='pkg'
+srcdir='src'
+
+
+package() {
+ local PYTHON="/usr/bin/env python3"
+ local USR_PATH="${pkgdir}/usr"
+
+ # Set up /usr directory
+ install -d -m 755 ${USR_PATH}
+
+ # Clean up build dir
+ rm -Rf build
+
+ cd "${srcdir}/${pkgname}"
+
+ # Fix setup.py for distutils.core
+ sed -i 's/\(from setuptools.*\)/#\1/' setup.py
+ sed -i 's/#\(from distutils.*\)/\1/' setup.py
+
+ # Install python packages to $pkgdir
+ ${PYTHON} setup.py install --prefix ${USR_PATH}
+
+ # Make directories accessible for anyone
+ find "${USR_PATH}" -type d -exec chmod 755 {} \;
+
+ # Make library files readable for anyone but not executable
+ find "${USR_PATH}" -type f -exec chmod 644 {} \;
+}
+