mirror of
https://github.com/JoshiCodes/knock.git
synced 2026-12-04 15:29:40 +01:00
Add knock-git PKGBUILD that builds the latest main
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Maintainer: Joshua <joshua at joshicodes dot de>
|
||||
pkgname=knock-git
|
||||
pkgver=r0
|
||||
pkgrel=1
|
||||
pkgdesc="Offline desktop API client for REST, GraphQL and WebSocket with plain-file collections (latest main)"
|
||||
arch=('x86_64')
|
||||
url="https://git.joshicodes.de/JoshiCodes/knock"
|
||||
license=('MIT')
|
||||
depends=('webkit2gtk-4.1' 'gtk3' 'libsecret' 'hicolor-icon-theme')
|
||||
makedepends=('rust' 'cargo' 'nodejs' 'npm' 'git')
|
||||
optdepends=('kwallet: store secrets in KWallet' 'gnome-keyring: store secrets in GNOME Keyring')
|
||||
provides=('knock')
|
||||
conflicts=('knock' 'knock-bin')
|
||||
source=("knock::git+$url.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd knock
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd knock
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
npm ci
|
||||
}
|
||||
|
||||
build() {
|
||||
cd knock
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
npm run build
|
||||
cargo build --frozen --release -p knock-app -p knock-cli
|
||||
}
|
||||
|
||||
package() {
|
||||
cd knock
|
||||
install -Dm755 target/release/knock-app "$pkgdir/usr/bin/knock-app"
|
||||
install -Dm755 target/release/knock "$pkgdir/usr/bin/knock"
|
||||
install -Dm644 packaging/linux/knock-app.desktop "$pkgdir/usr/share/applications/knock-app.desktop"
|
||||
install -Dm644 logo/knock-app-icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/knock-app.svg"
|
||||
for s in 32 128; do
|
||||
install -Dm644 "src-tauri/icons/${s}x${s}.png" "$pkgdir/usr/share/icons/hicolor/${s}x${s}/apps/knock-app.png"
|
||||
done
|
||||
install -Dm644 src-tauri/icons/[email protected] "$pkgdir/usr/share/icons/hicolor/256x256/apps/knock-app.png"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user