wok-4.x view mpd/receipt @ rev 3167

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