summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjapm482021-07-31 05:28:17 +0200
committerjapm482021-07-31 05:32:35 +0200
commit646c13f5a5b13e135ea75c4fc604861a8192c22b (patch)
treebdfb3ad7ce7852e18bd62fd458317102265e00a3
downloadaur-646c13f5a5b13e135ea75c4fc604861a8192c22b.tar.gz
first commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD70
2 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b5f5caec6a73
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = pybind11-git
+ pkgdesc = pybind11 (git version)
+ pkgver = v2.7.0.r22.gdcbda8d7
+ pkgrel = 1
+ url = https://pybind11.readthedocs.org/
+ arch = any
+ license = BSD
+ checkdepends = python-numpy
+ checkdepends = python-scipy
+ makedepends = git
+ makedepends = cmake
+ makedepends = boost
+ makedepends = eigen
+ makedepends = python
+ makedepends = python-setuptools
+ makedepends = python-pytest
+ optdepends = python: for python bindings
+ provides = pybind11
+ conflicts = pybind11
+ source = git+https://github.com/pybind/pybind11.git
+ sha256sums = SKIP
+
+pkgname = pybind11-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1b9a609cf88e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: japm48 <japm48gh@gmail.com>
+# Adapted from official PKGBUILD in Community repo
+
+_pkgname=pybind11
+pkgname=${_pkgname}-git
+
+provides=($_pkgname)
+conflicts=($_pkgname)
+
+pkgver=v2.7.0.r22.gdcbda8d7
+pkgrel=1
+
+_repo=pybind/$_pkgname
+
+pkgdesc='pybind11 (git version)'
+arch=('any')
+url='https://pybind11.readthedocs.org/'
+license=('BSD')
+
+optdepends=('python: for python bindings')
+makedepends=('git' 'cmake' 'boost' 'eigen' 'python' 'python-setuptools' 'python-pytest')
+
+checkdepends=('python-numpy' 'python-scipy')
+
+source=("git+https://github.com/${_repo}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build () {
+ cd "${_pkgname}"
+ python setup.py build
+
+ # tests
+ cmake \
+ -B "${srcdir}/build-cmake" \
+ -S "${srcdir}/${_pkgname}" \
+ -DCMAKE_BUILD_TYPE:STRING='None' \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -Wno-dev
+ make -C "${srcdir}/build-cmake" all mock_install
+
+}
+
+check() {
+ make -C build-cmake check
+}
+
+package() {
+ cd "${_pkgname}"
+ python setup.py install --root="$pkgdir" --skip-build --optimize='1'
+
+ # symlinks
+ local _pyver
+ _pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
+ install -d -m755 "${pkgdir}/usr"/{include,lib/cmake}
+ ln -s "../lib/python${_pyver}/site-packages/pybind11/include/pybind11" "${pkgdir}/usr/include/pybind11"
+ ln -s "../../lib/python${_pyver}/site-packages/pybind11/share/cmake/pybind11" "${pkgdir}/usr/lib/cmake/pybind11"
+
+ # man page
+ # install -D -m644 "docs/.build/man/${_pkgname}.1" "${pkgdir}/usr/share/man/man7/${_pkgname}.7"
+ # sed -i '/^\.TH/s/"1"/"7"/' "${pkgdir}/usr/share/man/man7/${_pkgname}.7"
+
+ # license
+ install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}"
+}
+