76 lines
2.1 KiB
Bash
76 lines
2.1 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgbase=qt-doc
|
|
pkgname=('qt-doc' 'qt-examples')
|
|
_qtver=5.15.2
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
arch=('any')
|
|
url='https://www.qt.io'
|
|
license=('LGPL-3')
|
|
makedepends=('qt-tools' 'python' 'pciutils' 'libxtst' 'libxcursor' 'libxrandr'
|
|
'libxss' 'libxcomposite' 'gperf' 'nss' 'clang')
|
|
groups=('qt')
|
|
_pkgfqn="qt-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/single/${_pkgfqn}.tar.xz")
|
|
sha512sums=('e7d22cf22e9baa5622f5075ec1b60536ef05c474370a410b6b0a33a4645389b46471e0a38da679e42e9b6ee750bc784f19eb166975f5e4958bc5123a571ea2f0')
|
|
|
|
prepare() {
|
|
cd ${_pkgfqn}
|
|
|
|
ln -s /usr/bin qttools/
|
|
ln -s /usr/bin/{rcc,uic,moc} qtbase/bin/
|
|
}
|
|
|
|
build() {
|
|
cd ${_pkgfqn}
|
|
|
|
./configure -confirm-license -opensource \
|
|
-prefix /usr \
|
|
-docdir /usr/share/doc/qt \
|
|
-headerdir /usr/include/qt \
|
|
-archdatadir /usr/lib/qt \
|
|
-datadir /usr/share/qt \
|
|
-sysconfdir /etc/xdg \
|
|
-nomake examples
|
|
make docs
|
|
}
|
|
|
|
package_qt-doc() {
|
|
pkgdesc='A cross-platform application and UI framework (Documentation)'
|
|
depends=('qt-base')
|
|
|
|
cd ${_pkgfqn}
|
|
make INSTALL_ROOT="$pkgdir" install_docs
|
|
|
|
# Install license
|
|
install -D -m644 "${srcdir}"/${_pkgfqn}/LICENSE.LGPLv3 "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.LGPL3
|
|
}
|
|
|
|
package_qt-examples() {
|
|
pkgdesc='Examples and demos from qt documentation'
|
|
depends=('qt-doc')
|
|
|
|
_base="$pkgdir"/usr/share/doc/qt/examples
|
|
|
|
# The various example dirs have conflicting .pro files, but
|
|
# QtCreator requires them to be in the same top-level directory.
|
|
# Matching the Qt5 installer, only the qtbase project is kept.
|
|
mkdir -p $_base
|
|
cp ${_pkgfqn}/qtbase/examples/examples.pro $_base
|
|
|
|
_fdirs=$(find "${_pkgfqn}" -maxdepth 2 -type d -name examples)
|
|
for _dir in $_fdirs; do
|
|
_mod=$(basename ${_dir%/examples})
|
|
|
|
if [ -e "$_dir/README" ]; then
|
|
cp $_dir/README $_dir/README.$_mod
|
|
fi
|
|
|
|
cp -rn $_dir/* $_base
|
|
done
|
|
|
|
# Install license
|
|
install -D -m644 "${srcdir}"/${_pkgfqn}/LICENSE.LGPLv3 "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.LGPL3
|
|
}
|