1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ray Rashif <schiv@archlinux.org>
3 # Contributor: Mateusz Herych <heniekk@gmail.com>
4 # Contributor: Charles Lindsay <charles@chaoslizard.org>
9 pkgdesc="CD/DVD-ROM device emulator daemon"
11 url="https://cdemu.sourceforge.io/"
13 depends=(dbus VHBA-MODULE libao 'libmirage>=3.2.0')
14 makedepends=(cmake intltool)
15 optdepends=('alsa-lib: to enable the ALSA audio driver'
16 'pulseaudio: to enable the PA audio driver')
17 install=cdemu-daemon.install
18 source=("https://downloads.sourceforge.net/cdemu/$pkgname/$pkgname-$pkgver.tar.xz")
19 sha256sums=('a6e404e3ef75c6146e36354f65880dfd63b4b8ef1f54039dc5058e190f857d8f')
26 cmake -S $pkgname-$pkgver -B build \
27 -DCMAKE_BUILD_TYPE=Release \
28 -DCMAKE_INSTALL_PREFIX=/usr
33 DESTDIR="$pkgdir" cmake --install build
35 install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 $pkgname-$pkgver/README
36 install -Dt "$pkgdir/usr/lib/systemd/user" -m644 \
37 $pkgname-$pkgver/service-example/cdemu-daemon.service
38 install -Dt "$pkgdir/usr/share/dbus-1/services" -m644 \
39 $pkgname-$pkgver/service-example/net.sf.cdemu.CDEmuDaemon.service
41 echo vhba | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/cdemu.conf"
42 echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
43 install -Dm644 /dev/stdin "$pkgdir/usr/lib/udev/rules.d/60-cdemu.rules" <<END
44 ACTION=="add", KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu", TAG+="uaccess"