diff options
author | Maximilian Stahlberg | 2021-02-06 01:43:25 +0100 |
---|---|---|
committer | Maximilian Stahlberg | 2021-02-06 01:43:25 +0100 |
commit | fbfb746e1ed9ba77277930308ee54b9434151bb8 (patch) | |
tree | db126e4a76f11769a6f81864c2fd42b3f6764e3f | |
download | aur-fbfb746e1ed9ba77277930308ee54b9434151bb8.tar.gz |
Initial package.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 43 |
3 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..589fbd5dd0ca --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = python-swiglpk-git + pkgdesc = A Python interface to the GLPK optimization solver. Git version. + pkgver = 4.65.1.r1.gec985c1 + pkgrel = 1 + url = https://github.com/biosustain/swiglpk + arch = any + license = GPL3 + makedepends = swig + makedepends = python-setuptools + depends = python + depends = glpk + provides = python-swiglpk + conflicts = python-swiglpk + source = swiglpk::git+https://github.com/biosustain/swiglpk.git + md5sums = SKIP + +pkgname = python-swiglpk-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a62e334e7d62 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/swiglpk/ +/pkg/ +/src/ +/*.pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ddbf91e9e34b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Maximilian Stahlberg <maximilian.stahlberg tu-berlin de> + +pkgname=python-swiglpk-git +pkgver=4.65.1.r1.gec985c1 +pkgrel=1 +pkgdesc='A Python interface to the GLPK optimization solver. Git version.' +arch=('any') +url='https://github.com/biosustain/swiglpk' +license=('GPL3') +depends=('python' 'glpk') +makedepends=('swig' 'python-setuptools') +provides=('python-swiglpk') +conflicts=('python-swiglpk') +source=("swiglpk::git+https://github.com/biosustain/swiglpk.git") +md5sums=('SKIP') + +pkgver() { + cd "${srcdir}/swiglpk" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/swiglpk" + + # Work around https://github.com/biosustain/swiglpk/issues/40. + cp /usr/include/glpk.h . +} + +build() { + cd "${srcdir}/swiglpk" + python setup.py build +} + +check() { + cd "${srcdir}/swiglpk/build/lib."* + python -BIc "import swiglpk" +} + +package() { + cd "${srcdir}/swiglpk" + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build +} + |