PKGBUILD now properly uses cmake
ci/woodpecker/push/woodpecker Pipeline failed Details

main
Jef Roosens 2022-04-19 13:36:44 +02:00
parent 8c3d28cf47
commit 68d9e3a149
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 5 additions and 29 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Joseph Donofry <joe at joedonofry dot com> # Maintainer: Joseph Donofry <joe at joedonofry dot com>
pkgname=jjr-nheko pkgname=jjr-nheko
pkgver=0.9.1.r86.g8d52c17f pkgver=0.9.3.r66.g7138c7a4
pkgrel=1 pkgrel=1
pkgdesc="Desktop client for the Matrix protocol" pkgdesc="Desktop client for the Matrix protocol"
arch=("i686" "x86_64" "aarch64") arch=("i686" "x86_64" "aarch64")
@ -19,27 +19,21 @@ conflicts=("nheko" "nheko-git")
source=($pkgname::git+https://github.com/Nheko-Reborn/nheko.git#branch=master) source=($pkgname::git+https://github.com/Nheko-Reborn/nheko.git#branch=master)
md5sums=("SKIP") md5sums=("SKIP")
prepare() {
cd "$pkgname"
}
pkgver() { pkgver() {
cd "$pkgname" cd "$pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
} }
build() { build() {
cd "$pkgname" rm -f "$pkgname"/cmake/FindOlm.cmake
rm -f cmake/FindOlm.cmake cmake -B build -S "$pkgname" -Wno-dev \
-DCMAKE_INSTALL_PREFIX=/usr \
cmake -H. -Bbuild \
-DHUNTER_ENABLED=OFF \ -DHUNTER_ENABLED=OFF \
-DBUILD_SHARED_LIBS=OFF \ -DBUILD_SHARED_LIBS=OFF \
-DUSE_BUNDLED_MTXCLIENT=ON \ -DUSE_BUNDLED_MTXCLIENT=ON \
-DUSE_BUNDLED_COEURL=ON \ -DUSE_BUNDLED_COEURL=ON \
-DUSE_BUNDLED_LMDBXX=ON \ -DUSE_BUNDLED_LMDBXX=ON \
-DCMAKE_INSTALL_PREFIX=.deps/usr \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
@ -47,23 +41,5 @@ build() {
} }
package() { package() {
# Creating needed directories DESTDIR="$pkgdir" cmake --install build
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/usr/share/pixmaps/"
install -dm755 "$pkgdir/usr/share/applications/"
# Program
install -Dm755 "$pkgname/build/nheko" "$pkgdir/usr/bin/nheko"
# Desktop launcher
install -Dm644 "$srcdir/$pkgname/resources/nheko-256.png" "$pkgdir/usr/share/pixmaps/nheko.png"
install -Dm644 "$srcdir/$pkgname/resources/nheko.desktop" "$pkgdir/usr/share/applications/nheko.desktop"
# Icons
local icon_size icon_dir
for icon_size in 16 32 48 64 128 256 512; do
icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
install -d "$icon_dir"
install -m644 "$srcdir/$pkgname/resources/nheko-${icon_size}.png" "$icon_dir/nheko.png"
done
} }