summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a62cbaa4926ae732de7d8a45aca118ab28befd8b (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
43
44
# Maintainer: Douglas Browne <douglas.browne123@gmail.com>
pkgname=loudness-scanner-git
pkgver=v0.5.1.r18.g3d333bf
pkgrel=1
pkgdesc="EBU R128 loudness normalization tool"
arch=('any')
url="https://github.com/jiixyj/loudness-scanner"
license=('MIT')
depends=('libebur128' 'glib2' 'taglib')
makedepends=('cmake' 'git')
optdepends=('gstreamer: gstreamer input support'
            'libsndfile: libsndfile input support'
            'ffmpeg: ffmpeg input support'
            'libmpcdec: libmpcdec input support'
            'mpg123: libmpg123 input support')
provides=('loudness-scanner')
conflicts=('loudness-scanner')
source=("$pkgname::git+https://github.com/jiixyj/loudness-scanner.git")
md5sums=('SKIP')

prepare() {
  cd "$srcdir/$pkgname"
  git submodule init
  git submodule deinit ebur128
  git submodule update
  sed -i '/add_subdirectory(ebur128\/ebur128)/d' ./CMakeLists.txt
}

build() {
  cd "$srcdir/$pkgname"
  cmake -DDISABLE_GTK2:BOOL=ON -DDISABLE_QT4:BOOL=ON .
  make
}

package() {
  cd "$srcdir/$pkgname"
  install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm 755 loudness "${pkgdir}/usr/bin/loudness"
}

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