summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlfredo Ramos2019-07-10 23:40:54 -0500
committerAlfredo Ramos2019-07-10 23:40:54 -0500
commit4764db5b91b851ca05b1e4af473f9eb623474be7 (patch)
tree4856278fe8989be9e5e96171374101a4c408629d
downloadaur-4764db5b91b851ca05b1e4af473f9eb623474be7.tar.gz
Import
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD70
2 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b126a69c0cb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = pythonqt-git
+ pkgdesc = A dynamic Python binding for Qt applications
+ pkgver = r473.c07f09f
+ pkgrel = 1
+ url = https://github.com/MeVisLab/pythonqt
+ arch = i686
+ arch = x86_64
+ license = LGPL2.1
+ makedepends = git
+ makedepends = qt5-tools
+ depends = python
+ depends = qt5-multimedia
+ depends = qt5-svg
+ depends = qt5-webkit
+ depends = qt5-declarative
+ depends = qt5-xmlpatterns
+ provides = pythonqt=r473.c07f09f
+ conflicts = pythonqt
+ conflicts = pythonqt-svn
+ conflicts = qt5-python27-git
+ source = git+https://github.com/MeVisLab/pythonqt.git
+ sha512sums = SKIP
+
+pkgname = pythonqt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0f2614a85f6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Alfredo Ramos <alfredo dot ramos at yandex dot com>
+
+_pkgname=pythonqt
+pkgname=${_pkgname}-git
+pkgver=r473.c07f09f
+pkgrel=1
+pkgdesc='A dynamic Python binding for Qt applications'
+arch=('i686' 'x86_64')
+url='https://github.com/MeVisLab/pythonqt'
+license=('LGPL2.1')
+
+depends=('python' 'qt5-multimedia' 'qt5-svg' 'qt5-webkit' 'qt5-declarative' 'qt5-xmlpatterns')
+makedepends=('git' 'qt5-tools')
+provides=("${_pkgname}=${pkgver}")
+conflicts=("${_pkgname}" "${_pkgname}-svn" 'qt5-python27-git')
+
+source=("git+https://github.com/MeVisLab/${_pkgname}.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ # Updating package version
+ cd "${srcdir}"/${_pkgname}
+ (
+ set -o pipefail
+ git describe --long --tags 2>/dev/null | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ # Create build directory
+ mkdir -p "${srcdir}"/build
+ cd "${srcdir}"/build
+ cp -R ../${_pkgname}/* ./
+
+ # Fix python version
+ sed -ri 's|(unix:PYTHON_VERSION=)(.+)$|\13|g' build/python.prf
+
+ # Do not build tests nor examples
+ sed -ri 's|(SUBDIRS = generator src extensions)(.+)$|\1|g' PythonQt.pro
+}
+
+build() {
+ # Building package
+ cd "${srcdir}"/build
+ qmake-qt5 \
+ QMAKE_CFLAGS="${CFLAGS}" \
+ QMAKE_CXXFLAGS="${CXXFLAGS}" \
+ CONFIG+=release \
+ CONFIG+=c++14
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+
+ # Includes
+ mkdir -p "${pkgdir}"/usr/include/PythonQt/{gui,extensions/PythonQt_QtAll}
+ cp ../${_pkgname}/src/*.h "${pkgdir}"/usr/include/PythonQt/
+ cp ../${_pkgname}/src/gui/*.h "${pkgdir}"/usr/include/PythonQt/gui/
+ cp ../${_pkgname}/extensions/PythonQt_QtAll/*.h "${pkgdir}"/usr/include/PythonQt/extensions/PythonQt_QtAll/
+
+ # Library
+ mkdir -p "${pkgdir}"/usr/lib
+ cp -a lib/*.so* "${pkgdir}"/usr/lib/
+
+ # pkg-config file
+ mkdir -p "${pkgdir}"/usr/share/pkgconfig
+ cp -R lib/*.pc "${pkgdir}"/usr/share/pkgconfig/
+}