wok-6.x view mpd/receipt @ rev 1457

atl2: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Oct 03 16:39:33 2008 +0000 (2008-10-03)
parents 88984e566042
children 61bc01878920
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"
9 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
10 libmad-dev libogg-dev libvorbis-dev flac-dev"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WEB_SITE="http://www.musicpd.org/"
13 WGET_URL="http://www.musicpd.org/uploads/files/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 ./configure --prefix=/usr --infodir=/usr/share/info \
20 --mandir=/usr/share/man $CONFIGURE_ARGS
21 make
22 make DESTDIR=$PWD/_pkg install
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/sbin
29 mkdir -p $fs/etc
30 cp -a $_pkg/usr/bin/mpd $fs/usr/sbin
31 cp $_pkg/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
32 }
34 post_install()
35 {
36 echo "Processing post-install commands..."
38 # Drop root priviledges and enable pid file
39 echo -n "Enabling mpd.conf..."
40 cd $1/etc
41 sed -i 's/#pid_file/pid_file/; \
42 s/#user/user/; s/#bind_to_address/bind_to_address/; \
43 s/"nobody"/"tux"/; s/"any"/"localhost"/' mpd.conf
44 status
46 # Make mpd directories and files
47 echo -n "Enabling mpd files and directories"
48 mkdir /home/tux/music
49 mkdir -p /home/tux/.mpd/playlists
50 touch /home/tux/.mpd/mpd.log
51 touch /home/tux/.mpd/mpd.error
53 # And change permissions
54 chown tux:tux /home/tux/music
55 chown -R tux:tux /home/tux/.mpd
56 status
57 }