summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a3119c203a6d1d237d0591d6330d158584bf502 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Morgenstern <charles [at] charlesbwise [dot] com>
# Contributor: Henri Derycke <nheir.kim@gmail.com>

pkgname=bluez-alsa-git
pkgver=4.3.1.r106.g0685e5d
pkgrel=1
pkgdesc="Bluetooth audio ALSA backend"
arch=('x86_64'
      'aarch64'
      'armv6h'
      'armv7h')
url="https://github.com/Arkq/${pkgname%-git}"
license=('MIT')
depends=('alsa-lib' 
         'bluez-libs'
         'glib2-devel'
         'libfdk-aac' 
         'sbc'
         'systemd')
makedepends=('git'
             'python-docutils')
optdepends=('lame: build with mp3 support'
            'libbsd: build with hcitop tool'
            'libfreeaptx: build with libfreeaptx for apt-X'
            'liblc3: build with Low Complexity Communication Codec library support'
            'libldac: build with LDAC Bluetooth encoder library support'
            'mpg123: build with mpg123 decoding support'
            'ncurses: build with hcitop tool'
            'opus: build with opus support'
            'readline: build with bluealsa-rfcomm tool'
            'spandsp: build mSBC codec support')
source=("${pkgname}::git+https://github.com/Arkq/${pkgname%-git}.git")
sha512sums=('SKIP')
install=bluealsa.install

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

build() {
  local flags
  
  cd "${pkgname}"
  autoreconf --install --force
  # Options details:
  # https://github.com/Arkq/bluez-alsa/wiki/Installation-from-source#3-configure-the-build-directory
  # Table of additional dependencies:
  # https://github.com/Arkq/bluez-alsa/wiki/Installation-from-source#additional-dependencies
  flags=(#--with-libfreeaptx
         #--enable-aptx
         #--enable-aptx-hd
         #--enable-ldac
         #--enable-mp3lame
         #--enable-mpg123
         #--enable-msbc
         #--enable-opus
         #--enable-ofono
         #--enable-a2dpconf
         #--enable-cli
         #--enable-rfcomm
         #--enable-faststream
         #--enable-hcitop
         #--enable-lc3plus
         #--enable-lc3-swb
         #--enable-midi
         #--enable-upower
         #--enable-debug
         --enable-aac
         --enable-manpages
         --enable-systemd)
  ./configure --prefix=/usr \
      --sysconfdir=/etc \
      "${flags[@]}"
  make
}

package() {
  cd "${pkgname}"
  make DESTDIR="${pkgdir}" install
  install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}