summaryrefslogtreecommitdiff
path: root/community/cdemu-daemon/PKGBUILD
blob: a353a5fcd85424937804f7752479d6f987ee990e (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 102785 2013-12-20 01:23:58Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Charles Lindsay <charles@chaoslizard.org>

pkgname=cdemu-daemon
pkgver=2.1.1
pkgrel=1
pkgdesc="CD/DVD-ROM device emulator daemon"
arch=(i686 x86_64)
url="http://cdemu.sourceforge.net/"
license=(GPL)
depends=(dbus "vhba-module>=20130607" libao "libmirage>=2.1.0")
makedepends=(cmake)
optdepends=('alsa-lib: to enable the ALSA audio driver'
            'pulseaudio: to enable the PA audio driver')
backup=(etc/conf.d/cdemu-daemon
        etc/dbus-1/system.d/cdemu-daemon-dbus.conf)
install=cdemu-daemon.install
source=("http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2"
        system-arch.patch)
sha256sums=('d26782071184d555b06ad5def7d1c22916cbeb73377328879499b91e1196f36f'
            '29507da7367983bdc5f541e9f9252f189412041076842b8d08a5c4dac29f23cd')

prepare() {
  mkdir build
  cd $pkgname-$pkgver

  # Patch system daemon for Arch-friendlyness
  # It's disabled by default. Should we even ship it?
  patch -Np1 -i ../system-arch.patch
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DCMAKE_INSTALL_LIBEXECDIR=lib/$pkgname
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install

  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: