diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 44 insertions, 27 deletions
@@ -5,31 +5,58 @@ _pkgname="spectacle" pkgname="$_pkgname-git" -pkgver=23.08.3.r49.gfecb81ef +pkgver=24.02.1.r23.gb4c8502 pkgrel=1 pkgdesc='KDE screenshot capture utility' url='https://invent.kde.org/graphics/spectacle' -license=(GPL) -arch=(x86_64) +license=('GPL-2.0-or-later') +arch=('x86_64') depends=( - 'knewstuff' 'kpipewire' + 'layer-shell-qt' 'purpose' - 'qt6-tools' + 'qt6-multimedia' 'xcb-util-cursor' + 'zxing-cpp' + + ## implicit + #hicolor-icon-theme + #kconfig + #kconfigwidgets + #kcoreaddons + #kdbusaddons + #kglobalaccel + #kguiaddons + #ki18n + #kio + #kirigami + #kjobwidgets + #knotifications + #kservice + #kwidgetsaddons + #kwindowsystem + #kxmlgui + #libxcb + #qt6-base + #qt6-declarative + #qt6-wayland + #wayland + #xcb-util + #xcb-util-image ) makedepends=( 'extra-cmake-modules' 'git' 'kdoctools' + 'ninja' 'plasma-wayland-protocols' ) -_pkgsrc="$_pkgname" provides=("$_pkgname=${pkgver%%.r*}") conflicts=("$_pkgname") +_pkgsrc="$_pkgname" source=("git+https://invent.kde.org/graphics/spectacle.git") sha256sums=('SKIP') @@ -39,33 +66,23 @@ pkgver() { local _regex='^\s+<release version="([0-9]+\.[0-9]+(\.[0-9]+)?)".*>$' local _file='desktop/org.kde.spectacle.appdata.xml' - local _line=$( - grep -E "$_regex" "$_file" | head -1 - ) - local _version=$( - printf '%s' "$_line" | sed -E "s@$_regex@\1@" - ) - local _commit=$( - git log -G "$_line" -1 --pretty=oneline --no-color -- "$_file" \ - | sed 's@\ .*$@@' - ) - local _revision=$( - git rev-list --count $_commit..HEAD - ) - local _hash=$( - git rev-parse --short HEAD - ) + local _line=$(grep -E "$_regex" "$_file" | head -1) + local _line_num=$(grep -Ensm1 "$_regex" "$_file" | cut -d':' -f1) + + local _version=$(sed -E "s@$_regex@\1@" <<< "$_line") + local _commit=$(git blame -L $_line_num,+1 -- "$_file" | awk '{print $1;}') + local _revision=$(git rev-list --count --cherry-pick "$_commit"...HEAD) + local _hash=$(git rev-parse --short=7 HEAD) - printf '%s.r%s.g%s' \ - "$_version" \ - "$_revision" \ - "$_hash" + printf '%s.r%s.g%s' "${_version:?}" "${_revision:?}" "${_hash:?}" } build() { local _cmake_options=( -B "build" -S "$_pkgsrc" + -G Ninja + -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF -Wno-dev @@ -76,6 +93,6 @@ build() { } package() { - DESTDIR="${pkgdir:?}" cmake --install "build" + DESTDIR="$pkgdir" cmake --install "build" } |