summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD22
3 files changed, 8 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1bb8acc5f68..172d2bc5fc4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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 00000000000..bbbff9a04fd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src
+pkg
+python-magic-git
+*.pkg.tar.xz
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 {} \;
}