wok-4.x annotate mpd/receipt @ rev 3405

mpd+gaupol: Remove dep on libiconv
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jun 12 17:57:46 2009 +0200 (2009-06-12)
parents cde7fa93f1d6
children 57acddb48af0
rev   line source
paul@1375 1 # SliTaz package receipt.
paul@1375 2
paul@1375 3 PACKAGE="mpd"
paul@1375 4 VERSION="0.13.2"
paul@1375 5 CATEGORY="multimedia"
paul@1375 6 SHORT_DESC="Music Player Daemon (MPD)."
paul@1375 7 MAINTAINER="paul@slitaz.org"
pankso@3405 8 DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib"
paul@1387 9 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
pankso@3405 10 libmad-dev libogg-dev libvorbis-dev flac-dev libsamplerate \
pankso@3405 11 libid3tag"
paul@1375 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
paul@1375 13 WEB_SITE="http://www.musicpd.org/"
paul@1375 14 WGET_URL="http://www.musicpd.org/uploads/files/$TARBALL"
paul@1375 15
paul@1375 16 # Rules to configure and make the package.
paul@1375 17 compile_rules()
paul@1375 18 {
paul@1375 19 cd $src
paul@1375 20 ./configure --prefix=/usr --infodir=/usr/share/info \
pascal@1484 21 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1484 22 make &&
paul@1375 23 make DESTDIR=$PWD/_pkg install
paul@1375 24 }
paul@1375 25
paul@1375 26 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@1375 27 genpkg_rules()
paul@1375 28 {
paul@1375 29 mkdir -p $fs/usr/sbin
paul@1375 30 mkdir -p $fs/etc
paul@1375 31 cp -a $_pkg/usr/bin/mpd $fs/usr/sbin
paul@1375 32 cp $_pkg/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
paul@1375 33 }
paul@1375 34
paul@1375 35 post_install()
paul@1375 36 {
paul@1375 37 echo "Processing post-install commands..."
paul@1375 38
paul@1375 39 # Drop root priviledges and enable pid file
paul@1375 40 echo -n "Enabling mpd.conf..."
paul@1375 41 cd $1/etc
paul@1375 42 sed -i 's/#pid_file/pid_file/; \
paul@1375 43 s/#user/user/; s/#bind_to_address/bind_to_address/; \
paul@1375 44 s/"nobody"/"tux"/; s/"any"/"localhost"/' mpd.conf
paul@1375 45 status
paul@1375 46
paul@1375 47 # Make mpd directories and files
paul@1375 48 echo -n "Enabling mpd files and directories"
paul@1375 49 mkdir /home/tux/music
paul@1375 50 mkdir -p /home/tux/.mpd/playlists
paul@1375 51 touch /home/tux/.mpd/mpd.log
paul@1375 52 touch /home/tux/.mpd/mpd.error
paul@1375 53
paul@1375 54 # And change permissions
paul@1375 55 chown tux:tux /home/tux/music
paul@1375 56 chown -R tux:tux /home/tux/.mpd
paul@1375 57 status
paul@1375 58 }
paul@1375 59
paul@1375 60