summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Hovorka2017-01-30 15:27:03 +0100
committerMarkus Hovorka2017-01-30 15:27:03 +0100
commit84f339deafa459d7a6e150d3738acec7f1009260 (patch)
treed5c00cbc0d2d023b72e97d93a38344c8f6d8316a
downloadaur-84f339deafa459d7a6e150d3738acec7f1009260.tar.gz
Add PKGBUILD and .SRCINFO
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD99
-rw-r--r--sphinx-build2.patch18
3 files changed, 156 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b5df7538205
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = shiboken2-git
+ pkgver = 2.0.0.r2447.f7fb80a
+ pkgrel = 1
+ url = http://www.pyside.org
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = git
+ makedepends = cmake
+ makedepends = qt5.6
+ makedepends = python2
+ makedepends = python
+ makedepends = libxslt
+ source = shiboken2-git::git+https://code.qt.io/pyside/shiboken.git
+ source = sphinx-build2.patch
+ md5sums = SKIP
+ md5sums = 915d0fc351ff2e7c5deaa1066aeeae67
+
+pkgname = python2-shiboken2-git
+ pkgdesc = Support library for Python2 bindings
+ depends = qt5.6
+ depends = libxslt
+ depends = python2
+ depends = shiboken2-git
+
+pkgname = python-shiboken2-git
+ pkgdesc = Support library for Python bindings
+ depends = libxslt
+ depends = python
+ depends = shiboken2-git
+
+pkgname = shiboken2-git
+ pkgdesc = CPython bindings generator for C++ libraries
+ depends = qt5.6
+ depends = python
+ depends = libxslt
+ optdepends = python2-shiboken2-git: for compilation against python2
+ optdepends = python-shiboken2-git: for compilation against python
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..29aa593a6d5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Markus Hovorka <m.hovorka@live.de>
+# Contributor: Florian Pritz <bluewind@xinu.at>
+# Contributor: Jelle van der Waa <jelle@vdwaa.nl>
+# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
+# Contributor: Matthias Maennich <arch@maennich.net>
+
+pkgbase=shiboken2-git
+pkgname=(python{2,}-shiboken2-git shiboken2-git)
+pkgver=2.0.0.r2447.f7fb80a
+_upver=2.0.0
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://www.pyside.org"
+makedepends=('git' 'cmake' 'qt5.6' 'python2' 'python' 'libxslt')
+source=("$pkgbase::git+https://code.qt.io/pyside/shiboken.git"
+ "sphinx-build2.patch")
+md5sums=('SKIP'
+ '915d0fc351ff2e7c5deaa1066aeeae67')
+
+pkgver() {
+ cd "$srcdir/$pkgbase"
+ printf "%s.r%s.%s" "$_upver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$pkgbase"
+ patch -Np1 -i "$srcdir/sphinx-build2.patch"
+}
+
+build(){
+ local qt5_src="/opt/qt5.6"
+ local qt5_rpath="/opt/qt5.6/lib"
+
+ # Build for python2.
+ cd "$srcdir/$pkgbase"
+ mkdir -p build-py2 && cd build-py2
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ "-DCMAKE_PREFIX_PATH=$qt5_src" \
+ "-DCMAKE_INSTALL_RPATH=$qt5_rpath" \
+ -DBUILD_TESTS=OFF
+ make
+
+ # Build for python3.
+ cd "$srcdir/$pkgbase"
+ mkdir -p build-py3 && cd build-py3
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ "-DCMAKE_PREFIX_PATH=$qt5_src" \
+ "-DCMAKE_INSTALL_RPATH=$qt5_rpath" \
+ -DBUILD_TESTS=OFF \
+ -DUSE_PYTHON_VERSION=3
+ make
+}
+
+package_shiboken2-git() {
+ pkgdesc="CPython bindings generator for C++ libraries"
+ depends=('qt5.6' 'python' 'libxslt')
+ optdepends=("python2-shiboken2-git: for compilation against python2"
+ "python-shiboken2-git: for compilation against python")
+
+ cd "$srcdir/$pkgbase/build-py3"
+ make DESTDIR="$pkgdir" install
+
+ rm -rf "$pkgdir/usr/lib/python"*
+ rm -rf "$pkgdir/usr/lib/libshiboken2"*
+ rm -rf "$pkgdir/usr/lib/pkgconfig/"
+ rm "$pkgdir"/usr/lib/cmake/Shiboken2-$_upver/Shiboken2Config*python*.cmake
+}
+
+package_python2-shiboken2-git() {
+ pkgdesc="Support library for Python2 bindings"
+ depends=('qt5.6' "libxslt" "python2" "shiboken2-git")
+
+ cd "$srcdir/$pkgbase/build-py2"
+ make DESTDIR="$pkgdir" install
+
+ cd "$srcdir/$pkgbase/build-py2"
+ cd data
+ install -Dm 644 Shiboken2Config-python2.7.cmake "$pkgdir/usr/lib/cmake/Shiboken2-$_upver/"
+ mv "$pkgdir"/usr/lib/pkgconfig/shiboken2{,-py2}.pc
+
+ rm -rf "$pkgdir"/usr/{include,bin,share}
+ rm "$pkgdir/usr/lib/cmake/Shiboken2-$_upver/Shiboken2ConfigVersion.cmake"
+ rm "$pkgdir/usr/lib/cmake/Shiboken2-$_upver/Shiboken2Config.cmake"
+}
+
+package_python-shiboken2-git() {
+ pkgdesc="Support library for Python bindings"
+ depends=("libxslt" "python" "shiboken2-git")
+
+ cd "$srcdir/$pkgbase/build-py3"
+ make DESTDIR="$pkgdir" install
+
+ rm -rf "$pkgdir"/usr/{include,bin,share}
+ rm "$pkgdir/usr/lib/cmake/Shiboken2-$_upver/Shiboken2ConfigVersion.cmake"
+ rm "$pkgdir/usr/lib/cmake/Shiboken2-$_upver/Shiboken2Config.cmake"
+}
diff --git a/sphinx-build2.patch b/sphinx-build2.patch
new file mode 100644
index 00000000000..7e73a4e0bc1
--- /dev/null
+++ b/sphinx-build2.patch
@@ -0,0 +1,18 @@
+diff --git a/ApiExtractor/doc/CMakeLists.txt b/ApiExtractor/doc/CMakeLists.txt
+index d78844d..e9245e1 100644
+--- a/ApiExtractor/doc/CMakeLists.txt
++++ b/ApiExtractor/doc/CMakeLists.txt
+@@ -1,5 +1,5 @@
+
+-find_program(SPHINX sphinx-build DOC "Path to sphinx-build binary.")
++find_program(SPHINX sphinx-build2 DOC "Path to sphinx-build binary.")
+
+ if (SPHINX)
+ message("-- sphinx-build - found")
+@@ -7,4 +7,4 @@ if (SPHINX)
+ add_custom_target(doc ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html )
+ else()
+ message("-- sphinx-build - not found! doc target disabled")
+-endif()
+\ No newline at end of file
++endif()