summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea8419c096b8687443ad9d8f36166a8398c57ec8 (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
# Maintainer: taep96 <mail@taep96.moe>

pkgname=libbassmix
pkgver=2.4.12
pkgrel=2
pkgdesc="An extension providing the ability to mix together multiple BASS channels, with resampling and matrix mixing features. Also provides the ability to split a BASS channel into multiple channels."
arch=(x86_64)
url="http://www.un4seen.com/"
license=(custom)
depends=(alsa-lib libbass)

source=("$pkgname-$pkgver.zip::https://www.un4seen.com/files/bassmix24-linux.zip")

sha256sums=('ced2c015b0e96873f6495d8aa18a61b6d1e17961fd2d00f162b6f8af6489eb25')

prepare() {
    awk '
        /^Licence[[:space:]]*$/ {
            in_license_section = 1
            skip_next_line = 1
            next
        }

        /^History[[:space:]]*$/ {
            in_license_section = 0
        }

        in_license_section {
            if (skip_next_line) {
                skip_next_line = 0
                next
            }

            license[++n] = $0
        }

        END {
            while (n > 0 && license[n] ~ /^[[:space:]]*$/) {
                n--
            }

            for (i = 1; i <= n; i++) {
                print license[i] > "LICENSE"
            }
        }
    ' "$srcdir"/bassmix.txt
}

package() {
    install -D -m755 libs/x86_64/libbassmix.so "$pkgdir/usr/lib/libbassmix.so"

    install -D -m644 bassmix.h "$pkgdir/usr/include/bassmix.h"
    install -D -m644 bassmix.chm "$pkgdir/usr/share/doc/libbass/bassmix.chm"
    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}