wok-6.x rev 1375
Add: mpd (Music Player Daemon)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Thu Sep 11 15:10:48 2008 +0000 (2008-09-11) |
parents | 9691564d9247 |
children | 22827ce7ab0e |
files | mpd/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mpd/receipt Thu Sep 11 15:10:48 2008 +0000 1.3 @@ -0,0 +1,59 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="mpd" 1.7 +VERSION="0.13.2" 1.8 +CATEGORY="multimedia" 1.9 +SHORT_DESC="Music Player Daemon (MPD)." 1.10 +MAINTAINER="paul@slitaz.org" 1.11 +DEPENDS="libid3tag libmad libogg libvorbis flac" 1.12 +BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev \ 1.13 + libmad-dev libogg-dev libvorbis-dev flac-dev" 1.14 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.15 +WEB_SITE="http://www.musicpd.org/" 1.16 +WGET_URL="http://www.musicpd.org/uploads/files/$TARBALL" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + cd $src 1.22 + ./configure --prefix=/usr --infodir=/usr/share/info \ 1.23 + --mandir=/usr/share/man $CONFIGURE_ARGS 1.24 + make 1.25 + make DESTDIR=$PWD/_pkg install 1.26 +} 1.27 + 1.28 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.29 +genpkg_rules() 1.30 +{ 1.31 + mkdir -p $fs/usr/sbin 1.32 + mkdir -p $fs/etc 1.33 + cp -a $_pkg/usr/bin/mpd $fs/usr/sbin 1.34 + cp $_pkg/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf 1.35 +} 1.36 + 1.37 +post_install() 1.38 +{ 1.39 + echo "Processing post-install commands..." 1.40 + 1.41 + # Drop root priviledges and enable pid file 1.42 + echo -n "Enabling mpd.conf..." 1.43 + cd $1/etc 1.44 + sed -i 's/#pid_file/pid_file/; \ 1.45 + s/#user/user/; s/#bind_to_address/bind_to_address/; \ 1.46 + s/"nobody"/"tux"/; s/"any"/"localhost"/' mpd.conf 1.47 + status 1.48 + 1.49 + # Make mpd directories and files 1.50 + echo -n "Enabling mpd files and directories" 1.51 + mkdir /home/tux/music 1.52 + mkdir -p /home/tux/.mpd/playlists 1.53 + touch /home/tux/.mpd/mpd.log 1.54 + touch /home/tux/.mpd/mpd.error 1.55 + 1.56 + # And change permissions 1.57 + chown tux:tux /home/tux/music 1.58 + chown -R tux:tux /home/tux/.mpd 1.59 + status 1.60 +} 1.61 + 1.62 +