summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 69b2dfcdb870d6bd25d93ba83c708c0f2d15dade (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
# Author: futpib <futpib@gmail.com>

pkgname=papeaks-git
pkgver=1.0.0.r3.g9f35743
pkgrel=1
pkgdesc="PulseAudio volume peaks on standard output"
arch=('x86_64')
url='https://github.com/futpib/papeaks'
license=('GPL')
depends=('libpulse')
makedepends=('git' 'rust')
provides=('papeaks')
conflicts=('papeaks')
source=("git://github.com/futpib/papeaks.git")
sha256sums=('SKIP')

_pkgname=${pkgname%%-git}

pkgver() {
    cd $_pkgname

    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

build() {
    cd $_pkgname

    cargo build --release
}

package() {
    cd $_pkgname

    install -dm755 "$pkgdir/usr/bin"
    install -Dm755 "target/release/papeaks" "$pkgdir/usr/bin"
}