wok-next view mpd/receipt @ rev 15363

Add some licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 03 09:52:57 2013 +0000 (2013-10-03)
parents 6299ef313f35
children 89e7debe3a7e
line source
1 # SliTaz package receipt.
3 PACKAGE="mpd"
4 VERSION="0.17.2"
5 CATEGORY="multimedia"
6 SHORT_DESC="Music Player Daemon (MPD)."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.musicpd.org/"
11 WGET_URL="$SF_MIRROR/musicpd/$TARBALL"
13 DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib \
14 audiofile faad2 lame sqlite libcurl glib libcrypto"
15 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
16 libmad-dev libogg-dev libvorbis-dev flac-dev libsamplerate \
17 libid3tag audiofile audiofile-dev faad2 faad2-dev pkg-config glib-dev lame-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 cd $src
23 sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
24 ./configure --prefix=/usr --infodir=/usr/share/info \
25 --mandir=/usr/share/man \
26 --disable-jack \
27 --disable-ao \
28 --disable-modplug \
29 --disable-mms \
30 --disable-ffmpeg \
31 --disable-wavpack \
32 --disable-systemd-daemon \
33 --with-zeroconf=no \
34 $CONFIGURE_ARGS &&
35 make &&
36 make DESTDIR=$DESTDIR install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr/sbin
43 mkdir -p $fs/etc
44 cp -a $install/usr/bin/mpd $fs/usr/sbin
45 cp $install/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
46 cp -a $stuff/* $fs
47 }
49 post_install()
50 {
51 echo "Processing post-install commands..."
53 # Drop root priviledges and enable pid file
54 echo -n "Enabling mpd.conf..."
55 cd $1/etc
56 sed -i 's/#music_directory/music_directory/; \
57 s/#playlist_directory/playlist_directory/; \
58 s/#db_file/db_file/; \
59 s/#pid_file/pid_file/; \
60 s/#user "nobody"/user "tux"/; \
61 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
62 status
64 # Make mpd directories and files
65 echo -n "Enabling mpd files and directories..."
66 mkdir /home/tux/music
67 mkdir -p /home/tux/.mpd/playlists
68 touch /home/tux/.mpd/mpd.log
69 #touch /home/tux/.mpd/mpd.error
70 cp -a /etc/mpd.conf /home/tux/.mpd
72 # And change permissions
73 chown tux:users /home/tux/music
74 chown -R tux:users /home/tux/.mpd
75 status
76 }