summaryrefslogtreecommitdiff
path: root/community/cdemu-daemon/PKGBUILD
blob: c0374dbafcc0d1573e73c3d69caf6d8008f8699a (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 92546 2013-06-08 00:40:57Z 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.0
pkgrel=1
pkgdesc="CD/DVD-ROM device emulator daemon"
arch=('i686' 'x86_64' 'mips64el')
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=('8224a5d8d16cbd9a2294e9c7ab544d61059d9870023e48705699af7366846580'
            '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: