summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fc016ceae3e2753a2bf3b4e38e820de16303ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: steelt <steeltitanium1 at gmail dot com>
_pkgname=Myxer
pkgname=myxer-git
pkgver=1.3.0.r0.gea53586
pkgrel=3
pkgdesc='A modern volume mixer for PulseAudio'
arch=('x86_64')
url='https://github.com/Aurailus/Myxer'
license=('GPL3')
depends=('gtk3' 'pulse-native-provider')
makedepends=('git' 'cargo')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/Aurailus/Myxer.git")
sha512sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  # https://github.com/VixenUtils/Myxer/pull/20
  cd "$_pkgname"
  sed -i '/^version = ""$/c version = "0.9.1"' Cargo.toml
}

build() {
  cd "$_pkgname"
  cargo build --locked --release
}

check() {
  cd "$_pkgname"
  cargo test --locked --release
}

package() {
  cd "$_pkgname"
  install -Dm755 "target/release/${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}"
  install -Dm644 "$_pkgname.desktop" "$pkgdir/usr/share/applications/${pkgname%-git}.desktop"
}