summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRichard Neumann2015-11-16 18:40:48 +0100
committerRichard Neumann2015-11-16 18:40:48 +0100
commit0872d97eb3e02f2b1b7e2e2f970a90bdba7ddc63 (patch)
tree8a0aa141d737f9cdff88959d2d7d7859a11e89a5 /PKGBUILD
parent1ec4f83671a8fc66cdc6fb4402413b8a0e5d5168 (diff)
downloadaur-python-magic-git.tar.gz
Refactored PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 3 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a4d5562491b..2cb90078a79 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('any')
url='https://github.com/ahupp/python-magic'
license=('MIT')
depends=('python')
-makedepends=('git' 'sed' 'python')
+makedepends=('git' 'python' 'python-setuptools')
conflicts=('python-magic')
source=("${pkgname}::git+https://github.com/ahupp/python-magic")
md5sums=('SKIP')
@@ -17,33 +17,17 @@ srcdir='src'
package() {
- local PYTHON="/usr/bin/env python3"
- local USR_PATH="${pkgdir}/usr"
- local LICENSE_DIR="${USR_PATH}/share/licenses/${pkgname}"
+ local LICENSE_DIR="${pkgdir}/usr/share/licenses/${pkgname}"
# Set up directories
- install -d -m 755 ${USR_PATH}
install -d -m 755 ${LICENSE_DIR}
- # 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}
+ python setup.py install --root ${pkgdir}
# Install license file
install -m 644 LICENSE ${LICENSE_DIR}
-
- # 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 {} \;
}