xcursor-viewer/PKGBUILD

62 lines
2 KiB
Bash

# Maintainer: Christian Schendel <doppelhelix@gmail.com>
# Contributor: Tom Hu <tom@bluespice.org>
pkgname=xcursor-viewer
pkgver=20230203
pkgrel=1
pkgdesc="Preview Xcursor files"
arch=(
x86_64
)
url="https://github.com/drizt/xcursor-viewer"
license=(
GPL-3.0-or-later
)
depends=(
glibc
gcc-libs
qt6-base)
makedepends=(
git
cmake
)
conflicts=("${pkgname}-git")
_commit="6b8a95a6071d860ee6f9b8e82695cd09d9e6ff31"
source=(
"${pkgname}::git+${url}.git#commit=${_commit}"
"qt6.patch"
"io.github.drizt.xcursor_viewer.desktop"
"io.github.drizt.xcursor_viewer.metainfo.xml"
"xcursor-viewer.svg"
)
b2sums=('e345d890280d833c503182bbe92e9c4a94cc07e18ffcd1736b280cddefe538a8d5844b600618de0ba6d5b53f462784537cc93549481e8b7116f74dcd6ae2bf7d'
'0dce851fdccf117b2ae4a185ad3d5c86653f7de29b234f65c3b6eeafb20d36d6789c3ac4ce5baa50fd0d701cb8ed12c2ebd2cbf3638069686fe19331760d61f0'
'ba3d4aabbdd713a8df1615ccf2026445b39d2b5ad7e1781bbe23e7014ea9d94304ea22017eef8b313a706c86f01b4717ebc0108e67aae9822965ad3346c34c5b'
'905522667221ece4a52159d50aca8fb45c1fd47f17bd544b9eb7af41bb891f4e79ca5c3dd6e3e54e820e95e8c19a85f5d083dfa38d41e6fea9a770e5bb125da4'
'7bb57d0c85f1300ae216404d7eb7978bf42f9353e8105eda20c4f278bbfa509c724b075500d3bdb23a6848051fa33edd84122ba2ae57aab3861bef9f8c076b1e')
prepare() {
patch -d ${pkgname} -Np1 -i ../qt6.patch
}
build() {
local cmake_options=(
-S "${pkgname}"
-B build
-D CMAKE_INSTALL_PREFIX=/usr
)
cmake "${cmake_options[@]}"
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
cd ${pkgname}
install -Dm0644 ../io.github.drizt.xcursor_viewer.desktop \
"$pkgdir/usr/share/applications/io.github.drizt.xcursor_viewer.desktop"
install -Dm0644 ../xcursor-viewer.svg \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/xcursor-viewer.svg"
install -Dm644 ../io.github.drizt.xcursor_viewer.metainfo.xml \
"${pkgdir}/usr/share/metainfo/io.github.drizt.xcursor_viewer.metainfo.xml"
}