wok-next view mpd/receipt @ rev 12845
Up: x264-dev (20120522)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Wed May 23 12:59:23 2012 +0200 (2012-05-23) |
parents | 60ed77963c48 |
children | 0747d5d72804 |
line source
1 # SliTaz package receipt.
3 PACKAGE="mpd"
4 VERSION="0.15.16"
5 CATEGORY="multimedia"
6 SHORT_DESC="Music Player Daemon (MPD)."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib \
9 audiofile faad2 lame sqlite libcurl glib libcrypto"
10 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
11 libmad-dev libogg-dev libvorbis-dev flac-dev libsamplerate \
12 libid3tag audiofile audiofile-dev faad2 faad2-dev pkg-config glib-dev lame-dev"
13 TARBALL="$PACKAGE-$VERSION.tar.bz2"
14 WEB_SITE="http://www.musicpd.org/"
15 WGET_URL="$SF_MIRROR/musicpd/$TARBALL"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
23 ./configure --prefix=/usr --infodir=/usr/share/info \
24 --mandir=/usr/share/man \
25 --disable-jack \
26 --disable-ao \
27 --disable-modplug \
28 --disable-mms \
29 --disable-ffmpeg \
30 --disable-wavpack \
31 --with-zeroconf=no \
32 $CONFIGURE_ARGS &&
33 make &&
34 make DESTDIR=$PWD/_pkg install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/sbin
41 mkdir -p $fs/etc
42 cp -a $_pkg/usr/bin/mpd $fs/usr/sbin
43 cp $_pkg/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
44 cp -a $stuff/* $fs
45 }
47 post_install()
48 {
49 echo "Processing post-install commands..."
51 # Drop root priviledges and enable pid file
52 echo -n "Enabling mpd.conf..."
53 cd $1/etc
54 sed -i 's/#music_directory/music_directory/; \
55 s/#playlist_directory/playlist_directory/; \
56 s/#db_file/db_file/; \
57 s/#pid_file/pid_file/; \
58 s/#user "nobody"/user "tux"/; \
59 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
60 status
62 # Make mpd directories and files
63 echo -n "Enabling mpd files and directories..."
64 mkdir /home/tux/music
65 mkdir -p /home/tux/.mpd/playlists
66 touch /home/tux/.mpd/mpd.log
67 #touch /home/tux/.mpd/mpd.error
69 # And change permissions
70 chown tux:users /home/tux/music
71 chown -R tux:users /home/tux/.mpd
72 status
73 }