summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8accb8c2f4e11f62d93d392b620507a6c377b615 (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
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: totoloco <totoloco at gmail dot com>

pkgname=pmus-git
pkgver=0.42.r401.g318d75a
pkgrel=2
pkgdesc="Practical Music Search is a highly configurable, ncurses-based client for MPD"
arch=('x86_64')
url="https://ambientsound.github.io/pms"
license=('GPL')
# Optional makedepend: 'pandoc: build man page'
makedepends=('cmake' 'git')
depends=('libmpdclient')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+https://github.com/ambientsound/pms.git#branch=0.42.x")
sha256sums=('SKIP')

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

build() {
  CFLAGS=${CFLAGS/-Werror=format-security/}
  CXXFLAGS=${CXXFLAGS/-Werror=format-security/}

  CFLAGS=${CFLAGS/-Werror=format-truncation/}
  CXXFLAGS=${CXXFLAGS/-Werror=format-truncation/}

  cmake -B build -S $pkgname -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev
  make -C build
}

package() {
  install -dm755 "$pkgdir/usr/share/pms/examples"
  install -m644 $pkgname/examples/* "$pkgdir/usr/share/pms/examples"
  make -C build DESTDIR="$pkgdir/" install
}