Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pkgname=psst-git
- pkgver=r288.1e63d5f
- pkgrel=1
- pkgdesc="Fast and multi-platform Spotify client with native GUI"
- arch=("x86_64")
- url="https://github.com/jpochyla/psst"
- license=('MIT')
- depends=('gtk3' 'openssl')
- makedepends=('cargo' 'git')
- provides=("${pkgname%-git}")
- conflicts=("${pkgname%-git}")
- source=('git+https://github.com/jpochyla/psst.git'
- 'git+https://github.com/edubart/minivorbis.git')
- sha256sums=('SKIP'
- 'SKIP')
- pkgver() {
- cd "$srcdir/${pkgname%-git}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- }
- prepare() {
- cd "$srcdir/${pkgname%-git}"
- git submodule init minivorbis-sys/minivorbis
- git config submodule.minivorbis.url $srcdir/minivorbis
- git submodule update
- cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
- # Add missing entries to desktop file
- sed -i "$ a Icon=${pkgname%-git}-gui" ".pkg/${pkgname%-git}.desktop"
- sed -i '$ a StartupWMClass=Psst-gui' ".pkg/${pkgname%-git}.desktop"
- }
- build() {
- cd "$srcdir/${pkgname%-git}"
- export RUSTUP_TOOLCHAIN=stable
- export CARGO_TARGET_DIR=target
- cargo build --frozen --release --all-features
- }
- check() {
- cd "$srcdir/${pkgname%-git}"
- export RUSTUP_TOOLCHAIN=stable
- cargo test --frozen --all-features
- }
- package() {
- cd "$srcdir/${pkgname%-git}"
- install -Dm755 "target/release/${pkgname%-git}"{-cli,-gui} -t "$pkgdir/usr/bin"
- install -Dm644 ".pkg/${pkgname%-git}.desktop" -t"$pkgdir/usr/share/applications"
- install -Dm644 "${pkgname%-git}-gui/assets/logo.svg" \
- "$pkgdir/usr/share/icons/hicolor/scalable/apps/${pkgname%-git}-gui.svg"
- install -Dm644 LICENSE.md -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
- }
Add Comment
Please, Sign In to add comment