summaryrefslogtreecommitdiff
path: root/community/cdemu-daemon/PKGBUILD
blob: 4163ffbc148b16927c5567a66c4a9bf05f4ccaa4 (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
# $Id: PKGBUILD 68530 2012-03-26 10:24:56Z schiv $
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Charles Lindsay <charles@chaoslizard.org>

pkgname=cdemu-daemon
pkgver=1.5.0
pkgrel=5
pkgdesc="CD/DVD-ROM device emulator daemon"
arch=('i686' 'x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL')
depends=('dbus' 'vhba-module>=20110915-5' 'libao' "libmirage=$pkgver")
optdepends=('alsa-lib: to enable the ALSA audio driver'
            'pulseaudio: to enable the PA audio driver')
backup=('etc/conf.d/cdemud'
        'etc/dbus-1/system.d/cdemud-dbus.conf')
install=$pkgname.install
source=("http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2"
        'cdemud.conf'
        'cdemud.rc'
        'system.patch')
md5sums=('5ba780caa26d855942512b5b3c22405a'
         '5d9e08255e45ca3c0987329b7920e206'
         '4bbf42b69133e4e91c1be2c6825fa392'
         '90a2516639c05737fa10a110a1cba467')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # make things Arch-friendly
  patch -Np1 -i "$srcdir/system.patch"

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --libexecdir=/usr/lib/$pkgname
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  # the init stuff
  install -Dm644 "$srcdir/cdemud.conf" "$pkgdir/etc/conf.d/cdemud"
  install -Dm755 "$srcdir/cdemud.rc" "$pkgdir/etc/rc.d/cdemud"

  # for systemd
  install -d "$pkgdir/usr/lib/modules-load.d"
  echo "vhba" > "$pkgdir/usr/lib/modules-load.d/cdemu.conf"
}

# vim:set ts=2 sw=2 et: