diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-03-28 10:54:32 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-03-28 10:54:32 -0300 |
commit | 6aa1c22fe01ff4df6c5f75fd04d551b53f7df389 (patch) | |
tree | 3aa1745b2e6a8a2ee8f6e8a44ca6330d9bc62065 /community/cdemu-daemon | |
parent | d41442b9f2dccbf8c7a283391e2bc3fe8b29bf07 (diff) | |
parent | a26ce336126d18cde915c2331250b8dfbffc24f8 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community-testing/vhba-module/PKGBUILD
community/cdemu-daemon/PKGBUILD
community/luakit/PKGBUILD
gnome-unstable/glib2/PKGBUILD
gnome-unstable/gthumb/PKGBUILD
gnome-unstable/libgnomekbd/PKGBUILD
multilib/lib32-e2fsprogs/PKGBUILD
multilib/lib32-freetype2/PKGBUILD
multilib/lib32-gnutls/PKGBUILD
multilib/lib32-krb5/PKGBUILD
multilib/lib32-libsm/PKGBUILD
multilib/lib32-libxcursor/PKGBUILD
multilib/lib32-libxmu/PKGBUILD
multilib/lib32-libxrender/PKGBUILD
multilib/lib32-libxt/PKGBUILD
multilib/lib32-libxv/PKGBUILD
multilib/lib32-libxvmc/PKGBUILD
multilib/lib32-mpg123/PKGBUILD
Diffstat (limited to 'community/cdemu-daemon')
-rw-r--r-- | community/cdemu-daemon/PKGBUILD | 54 | ||||
-rw-r--r-- | community/cdemu-daemon/cdemu-daemon.install | 20 | ||||
-rw-r--r-- | community/cdemu-daemon/cdemud.conf | 13 | ||||
-rw-r--r-- | community/cdemu-daemon/cdemud.rc | 8 | ||||
-rw-r--r-- | community/cdemu-daemon/system.patch | 45 |
5 files changed, 109 insertions, 31 deletions
diff --git a/community/cdemu-daemon/PKGBUILD b/community/cdemu-daemon/PKGBUILD index 1b25bd314..96197e23f 100644 --- a/community/cdemu-daemon/PKGBUILD +++ b/community/cdemu-daemon/PKGBUILD @@ -1,40 +1,54 @@ -# $Id: PKGBUILD 66730 2012-02-27 20:43:21Z heftig $ -# Maintainer: Mateusz Herych <heniekk@gmail.com> +# $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=1 +pkgrel=5 pkgdesc="CD/DVD-ROM device emulator daemon" arch=('i686' 'x86_64' 'mips64el') -backup=('etc/conf.d/cdemud' - 'etc/dbus-1/system.d/cdemud-dbus.conf') url="http://cdemu.sourceforge.net/" license=('GPL') -depends=('glib2' 'dbus' 'dbus-glib' 'libdaemon' 'vhba-module' "libmirage=$pkgver" 'libao') -install=cdemud.install -source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2 - cdemud.conf cdemud.rc 60-vhba.rules) +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' - '2b94bd399873e585e40b2bfd8634f322' - '340a30ab2c42162b3bd042c74a399219' - 'f551504552d7693ac79e8e0d302f62b9') + '5d9e08255e45ca3c0987329b7920e206' + '4bbf42b69133e4e91c1be2c6825fa392' + '90a2516639c05737fa10a110a1cba467') build() { - cd $srcdir/$pkgname-$pkgver - ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/$pkgname + 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 - install -m 644 -D ../cdemud.conf $pkgdir/etc/conf.d/cdemud - install -m 755 -D ../cdemud.rc $pkgdir/etc/rc.d/cdemud + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install - # Install udev rule for non-root mounting of iso's - install -D -m 644 "${srcdir}/60-vhba.rules" "$pkgdir/lib/udev/rules.d/60-vhba.rules" + # 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: diff --git a/community/cdemu-daemon/cdemu-daemon.install b/community/cdemu-daemon/cdemu-daemon.install new file mode 100644 index 000000000..7a3e8a9f5 --- /dev/null +++ b/community/cdemu-daemon/cdemu-daemon.install @@ -0,0 +1,20 @@ +post_upgrade() { + echo " > The 'cdemu' group is now created by vhba-module" + echo " >> you may have to re-add yourself to the group and relogin" + echo + echo " > Daemon can be used in session mode as user, simply run 'cdemud'" + echo " >> you do not need to use the init script in this case" + echo " >> put your configuration in ~/.cdemud instead" +} + +post_install () { + echo " > Add yourself to the 'cdemu' group for non-root access" + echo " > Start the daemon as root with /etc/rc.d/cdemud" + echo " > See /etc/conf.d/cdemud for further configuration" + echo + echo " > Daemon can be used in session mode as user, simply run 'cdemud'" + echo " >> you do not need to use the init script in this case" + echo " >> put your configuration in ~/.cdemud instead" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/cdemu-daemon/cdemud.conf b/community/cdemu-daemon/cdemud.conf index 8e49cdfd5..6f14947a6 100644 --- a/community/cdemu-daemon/cdemud.conf +++ b/community/cdemu-daemon/cdemud.conf @@ -1,12 +1,11 @@ # how many optical drives to emulate -NUM_DRIVES=1 +NUM_DEVICES=2 -# control device -CTL_DEVICE=/dev/vhba_ctl +# audio backend (null, alsa or pulse) +AUDIO_DRIVER=null -# audio backend (null or alsa) -AUDIO_BACKEND=null +# log file +LOG_FILE=/var/log/cdemud.log -DAEMON="/usr/bin/cdemud" +# bus to use (system or session) BUS="system" -LOG_FILE="/var/log/cdemu.log" diff --git a/community/cdemu-daemon/cdemud.rc b/community/cdemu-daemon/cdemud.rc index 6e1b0b091..e8dab1f08 100644 --- a/community/cdemu-daemon/cdemud.rc +++ b/community/cdemu-daemon/cdemud.rc @@ -14,20 +14,20 @@ case "$1" in stat_done fi - stat_busy "Waiting for $CTL_DEVICE" + stat_busy "Waiting for /dev/vhba_ctl" i=0 - until [ -c $CTL_DEVICE -o $i -ge 10 ]; do + until [ -c /dev/vhba_ctl -o $i -ge 10 ]; do i=`expr $i + 1` sleep 1 done - if [ -c $CTL_DEVICE ]; then + if [ -c /dev/vhba_ctl ]; then stat_done else stat_fail fi stat_busy "Starting cdemud" - cdemud --ctl-device=$CTL_DEVICE --bus=$SYSTEM --num-devices=$NUM_DEVICES --audio-driver=$AUDIO_DRIVER --logfile=$LOG_FILE & + cdemud --ctl-device=/dev/vhba_ctl --bus=$BUS --num-devices=$NUM_DEVICES --audio-driver=$AUDIO_DRIVER --logfile=$LOG_FILE & if [ $? -ne 0 ]; then stat_fail else diff --git a/community/cdemu-daemon/system.patch b/community/cdemu-daemon/system.patch new file mode 100644 index 000000000..3c3d4b221 --- /dev/null +++ b/community/cdemu-daemon/system.patch @@ -0,0 +1,45 @@ +diff -aur cdemu-daemon-1.5.0.orig/session/cdemu-daemon-session.sh cdemu-daemon-1.5.0/session/cdemu-daemon-session.sh +--- cdemu-daemon-1.5.0.orig/session/cdemu-daemon-session.sh 2012-03-25 16:35:40.577837996 +0800 ++++ cdemu-daemon-1.5.0/session/cdemu-daemon-session.sh 2012-03-25 16:39:12.180024983 +0800 +@@ -1,15 +1,15 @@ + #!/bin/sh + # Starts the CDEmu daemon instance on D-Bus *session* bus. Optional + # configuration (number of devices, audio driver, log file) are read +-# from ~/.cdemu-daemon ++# from ~/.cdemud + + # Default settings + NUM_DEVICES=2 +-AUDIO_DRIVER=pulse +-LOG_FILE=~/.cdemu-daemon.log ++AUDIO_DRIVER=null ++LOG_FILE=~/.cdemud.log + + # Read the settings +-CONFIG_FILE=~/.cdemu-daemon ++CONFIG_FILE=~/.cdemud + + if [ -f ${CONFIG_FILE} ]; then + . ${CONFIG_FILE}; +diff -aur cdemu-daemon-1.5.0.orig/system/cdemu-daemon-system.sh cdemu-daemon-1.5.0/system/cdemu-daemon-system.sh +--- cdemu-daemon-1.5.0.orig/system/cdemu-daemon-system.sh 2012-03-25 16:35:40.581171312 +0800 ++++ cdemu-daemon-1.5.0/system/cdemu-daemon-system.sh 2012-03-25 16:36:48.810801678 +0800 +@@ -1,15 +1,15 @@ + #!/bin/sh + # Starts the CDEmu daemon instance on D-Bus *system* bus. Optional + # configuration (number of devices, audio driver, log file) are read +-# from /etc/sysconfig/cdemu-daemon ++# from /etc/conf.d/cdemud + + # Default settings + NUM_DEVICES=2 + AUDIO_DRIVER=null +-LOG_FILE=/tmp/cdemu-daemon.log ++LOG_FILE=/var/log/cdemud.log + + # Read the settings +-CONFIG_FILE=/etc/sysconfig/cdemu-daemon ++CONFIG_FILE=/etc/conf.d/cdemud + + if [ -f ${CONFIG_FILE} ]; then + . ${CONFIG_FILE}; |