diff options
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 22 |
3 files changed, 8 insertions, 20 deletions
@@ -6,8 +6,8 @@ pkgbase = python-magic-git arch = any license = MIT makedepends = git - makedepends = sed makedepends = python + makedepends = python-setuptools depends = python conflicts = python-magic source = python-magic-git::git+https://github.com/ahupp/python-magic diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..bbbff9a04fd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src +pkg +python-magic-git +*.pkg.tar.xz @@ -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 {} \; } |