author | Antonio Rojas
<arojas@archlinux.org> 2016-02-29 18:04:17 UTC |
committer | Antonio Rojas
<arojas@archlinux.org> 2016-02-29 18:04:17 UTC |
parent | 7ccd096c4609619da302cbfa8ece38b081fd8a42 |
PKGBUILD | +27 | -12 |
diff --git a/PKGBUILD b/PKGBUILD index 8cf2b9d..093ad0d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,33 +6,48 @@ pkgname=qt5-doc _qtver=5.6.0-rc pkgver=${_qtver/-/} pkgrel=1 -arch=('i686' 'x86_64') +arch=('any') url='http://qt-project.org/' license=('GPL3' 'LGPL' 'FDL' 'custom') pkgdesc='A cross-platform application and UI framework' depends=('qt5-base') -makedepends=('qt5-declarative') -optdepends=('qt5-declarative: QML bindings') +makedepends=('qt5-tools' 'python2') conflicts=('qt') groups=('qt' 'qt5') -_pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}" -source=("http://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz") -md5sums=('2188e0907fa8f9d6343c8ac998e4fc9b') +_pkgfqn="qt-everywhere-opensource-src-${_qtver}" +source=("http://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/single/${_pkgfqn}.tar.xz") +md5sums=('7320f21e0aff25aa40d85a9376e15bc9') prepare() { - mkdir -p build + cd ${_pkgfqn} + + # Use python2 for Python 2.x + find . -name '*.py' -exec sed -i \ + 's|#![ ]*/usr/bin/python$|&2|;s|#![ ]*/usr/bin/env python$|&2|' {} + + find -name '*.pro' -o -name '*.pri' | xargs sed -i -e 's|python -c|python2 -c|g' -e 's|python \$|python2 \$|g' + + ln -s /usr/lib/qt/bin qttools/ + ln -s /usr/lib/qt/bin/{rcc,uic,moc} qtbase/bin/ } build() { - cd build + cd ${_pkgfqn} - qmake ../${_pkgfqn} - make + PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource \ + -prefix /usr \ + -bindir /usr/lib/qt/bin \ + -docdir /usr/share/doc/qt \ + -headerdir /usr/include/qt \ + -archdatadir /usr/lib/qt \ + -datadir /usr/share/qt \ + -sysconfdir /etc/xdg \ + -examplesdir /usr/share/doc/qt/examples + make docs } package() { - cd build - make INSTALL_ROOT="$pkgdir" install + cd ${_pkgfqn} + make INSTALL_ROOT="$pkgdir" install_docs install -d "$pkgdir"/usr/share/licenses ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}