-
Notifications
You must be signed in to change notification settings - Fork 9
/
PKGBUILD_poppler
55 lines (50 loc) · 2.28 KB
/
PKGBUILD_poppler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Valentin Bruch <[email protected]>
# This PKGBUILD file is less flexible than the one in the AUR to
# provide reproducible builds and better dependency version checks.
# Select the Qt version
: ${_qt_version_major:=6} # 5 or 6
_qt_version_minor="$(pacman -Q "qt${_qt_version_major}-base" | sed -E 's/^qt[56]-base\s*[56]\.([0-9]+)\..*$/\1/')"
_qt_min_version="${_qt_version_major}.${_qt_version_minor}.0"
_qt_max_version="${_qt_version_major}.$(( ${_qt_version_minor} + 1 )).0"
pkgname="beamerpresenter-poppler-qt${_qt_version_major}"
pkgver='0.2.6'
pkgrel=1
pkgdesc="Modular multi-screen pdf presenter (using Poppler)"
arch=('x86_64')
url="https://github.com/stiglers-eponym/BeamerPresenter"
license=('GPL3')
makedepends=('cmake' 'ninja' "qt${_qt_version_major}-tools")
depends=("qt${_qt_version_major}-multimedia>=${_qt_min_version}" "qt${_qt_version_major}-multimedia<${_qt_max_version}" "qt${_qt_version_major}-svg>=${_qt_min_version}" "qt${_qt_version_major}-svg<${_qt_max_version}" "poppler-qt${_qt_version_major}")
provides=("beamerpresenter=${pkgver}")
conflicts=('beamerpresenter')
backup=('etc/xdg/beamerpresenter/beamerpresenter.conf' 'etc/xdg/beamerpresenter/gui.json')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('ed6b397ea4ec0afdf7a9bf8f3db272ae9999fab1d485a29b9f9b82615472b1fd')
if [ "${_qt_version_major}" -eq "5" ]
then
optdepends=('gst-libav: show videos' 'gst-plugins-good: show videos')
fi
build() {
mkdir -p "${pkgname}-${pkgver}/build"
cmake \
-B "${pkgname}-${pkgver}/build" \
-S "${srcdir}/BeamerPresenter-${pkgver}" \
-G Ninja \
-DCMAKE_BUILD_TYPE='Release' \
-DGIT_VERSION=OFF \
-DUSE_POPPLER=ON \
-DUSE_MUPDF=OFF \
-DUSE_QTPDF=OFF \
-DUSE_EXTERNAL_RENDERER=OFF \
-DUSE_TRANSLATIONS=ON \
-DINSTALL_LICENSE=OFF \
-DQT_VERSION_MAJOR="${_qt_version_major}" \
-DQT_VERSION_MINOR="${_qt_version_minor}" \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_INSTALL_SYSCONFDIR='/etc'
cmake --build "${pkgname}-${pkgver}/build"
}
package() {
DESTDIR="${pkgdir}" cmake --install "${pkgname}-${pkgver}/build"
install -Dm644 "${srcdir}/BeamerPresenter-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}