pkgname=songrec-git _pkgname=songrec pkgver=r272.d40f184 pkgrel=1 provides=('songrec') conflicts=('songrec') pkgdesc='An open-source, unofficial Shazam client for Linux, written in Rust.' url='https://github.com/marin-m/SongRec' arch=('x86_64') license=('GPL3') makedepends=('cargo' 'rust' 'pkgconf' 'git') depends=('gtk3' 'alsa-lib' 'libpulse' 'openssl' 'ffmpeg') optdepends=('libpulse') source=("$_pkgname::git+https://github.com/marin-m/songrec.git") sha256sums=('SKIP') pkgver() { cd "$_pkgname" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { cd "$_pkgname" cargo build --release } package() { cd "$_pkgname" install -Dm755 "${CARGO_TARGET_DIR:-target}/release/songrec" "$pkgdir/usr/bin/songrec" install -Dm755 "packaging/rootfs/usr/share/applications/com.github.marinm.songrec.desktop" "$pkgdir/usr/share/applications/com.github.marinm.songrec.desktop" install -Dm755 "packaging/rootfs/usr/share/icons/hicolor/scalable/apps/com.github.marinm.songrec.svg" \ "$pkgdir/usr/share/icons/hicolor/scalable/apps/com.github.marinm.songrec.svg" install -Dm755 "packaging/rootfs/usr/share/metainfo/com.github.marinm.songrec.metainfo.xml" \ "$pkgdir/usr/share/metainfo/com.github.marinm.songrec.metainfo.xml" mkdir -p "$pkgdir/usr/share/songrec" cp -ra "translations" "$pkgdir/usr/share/songrec/translations" install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE" }