upgpkg: ocaml 5.0.0-1
[arch-packages.git] / ossp / trunk / PKGBUILD
blobb82eec6844ce8b9a0c24bc620c59d7b261011a39
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jonathan Liu <net147@gmail.com>
4 pkgname=ossp
5 pkgver=1.3.2+11+g9e94d67
6 pkgrel=3
7 pkgdesc="Emulate OSS device using CUSE"
8 arch=(x86_64)
9 url="https://sourceforge.net/projects/osspd/"
10 license=(GPL2)
11 depends=('fuse2>=2.8.0')
12 makedepends=(libpulse alsa-lib git)
13 optdepends=("libpulse: PulseAudio backend"
14             "alsa-lib: ALSA backend")
15 _commit=9e94d673070623c955646e802d42950906b6e184  # master
16 source=("git+https://github.com/heftig/osspd#commit=$_commit"
17         0001-Log-the-right-slave-program-name.patch
18         0002-Hack-to-work-with-modern-PulseAudio.patch)
19 sha256sums=('SKIP'
20             '102d34362ed782c74792d08741ccc4780137c3e95b0b2e4eb15073ba7f162590'
21             '900cc0d8ac2d37a42a87afec4760a2cd99e95ae022262c4a4d144ee5c1312c10')
23 pkgver() {
24   cd osspd
25   git describe --tags | sed 's/-/+/g'
28 prepare() {
29   cd osspd
30   git apply -3 ../*.patch
31   sed -i 's|/sbin|/bin|g' Makefile
32   sed -i 's|GROUP="audio"|SUBSYSTEM=="cuse", MODE="0666"|' 98-osscuse.rules
35 _make() {
36   make prefix=/usr UDEVDIR=/usr/lib/udev/rules.d "$@"
39 build() {
40   cd osspd
41   _make
44 package() {
45   cd osspd
46   _make DESTDIR="$pkgdir" install
48   install -Dm644 /dev/stdin "$pkgdir/usr/lib/systemd/system/osspd.service" <<END
49 [Unit]
50 Description=OSS Userspace Bridge
52 [Service]
53 ExecStart=/usr/bin/osspd -f
55 [Install]
56 WantedBy=multi-user.target
57 END
59   install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/osspd.conf" <<END
60 cuse
61 snd-seq-oss
62 END
64   install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README
67 # vim:set sw=2 et: