matrixion/dist/AUR/PKGBUILD

57 lines
1.6 KiB
Text
Raw Permalink Normal View History

# Maintainer: Konstantinos Sideris <siderisk at auth dot gr>
pkgname=nheko-git
2017-08-10 23:55:08 +03:00
pkgver=0.1.0.r174.c428ef4b
pkgrel=1
pkgdesc="Desktop client for the Matrix protocol"
2017-08-10 23:55:08 +03:00
arch=("i686" "x86_64")
url="https://github.com/mujx/nheko"
2017-08-10 23:55:08 +03:00
license=("GPL3")
2017-08-10 23:55:08 +03:00
depends=("qt5-base" "lmdb")
makedepends=("git" "cmake" "gcc" "fontconfig" "qt5-tools")
2017-08-10 23:55:08 +03:00
source=($pkgname::git://github.com/mujx/nheko.git git://github.com/bendiken/lmdbxx.git)
md5sums=("SKIP" "SKIP")
prepare() {
cd "$pkgname"
git submodule init
git config submodule.lmdbxx.url $srcdir/libs/lmdbxx
git submodule update
}
pkgver() {
cd "$pkgname"
2017-08-10 23:55:08 +03:00
printf "0.1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$pkgname"
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
make -C build -j2
}
package() {
2017-05-09 22:42:32 +03:00
# Creating needed directories
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/usr/share/pixmaps/"
install -dm755 "$pkgdir/usr/share/applications/"
2017-05-09 22:42:32 +03:00
# Program
install -Dm755 "$pkgname/build/nheko" "$pkgdir/usr/bin/nheko"
# Desktop launcher
2017-05-09 22:42:32 +03:00
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
2017-05-09 22:42:32 +03:00
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
}