wok-next view mpd/receipt @ rev 16016
mpd: add to ARM arch (Music Box for the Rpi and Co)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Mar 05 03:33:57 2014 +0100 (2014-03-05) |
parents | 408c87fa22ca |
children | 4abbe39ea1e2 |
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"
12 HOST_ARCH="i486 arm"
14 DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib \
15 audiofile faad2 lame sqlite libcurl glib libcrypto"
16 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
17 libmad-dev libogg-dev libvorbis-dev flac-dev audiofile-dev faad2-dev
18 glib-dev lame-dev"
20 # Handle SliTaz arch
21 case "$SLITAZ_ARCH" in
22 arm) DEPENDS="alsa-lib zlib glib lame libmad libsamplerate" ;;
23 esac
25 # Handle cross comilation
26 case "$ARCH" in
27 arm)
28 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev lame-dev libmad-dev \
29 libsamplerate-dev" ;;
30 esac
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 cd $src
36 sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
37 ./configure \
38 --disable-jack \
39 --disable-ao \
40 --disable-modplug \
41 --disable-mms \
42 --disable-ffmpeg \
43 --disable-wavpack \
44 --disable-systemd-daemon \
45 --with-zeroconf=no \
46 $CONFIGURE_ARGS &&
47 make && make install
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 mkdir -p $fs/usr/sbin $fs/etc
54 cp -a $install/usr/bin/mpd $fs/usr/sbin
55 cp $install/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
56 cp -a $stuff/* $fs
57 }
59 post_install()
60 {
61 echo "Processing post-install commands..."
63 # Drop root priviledges and enable pid file
64 echo -n "Enabling mpd.conf..."
65 cd $root/etc
66 sed -i 's/#music_directory/music_directory/; \
67 s/#playlist_directory/playlist_directory/; \
68 s/#db_file/db_file/; \
69 s/#pid_file/pid_file/; \
70 s/#user "nobody"/user "tux"/; \
71 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
72 status
74 # Make mpd directories and files
75 echo -n "Enabling mpd files and directories..."
76 mkdir $root/etc/skel/music
77 mkdir -p $root/etc/skel/.mpd/playlists
78 touch $root/etc/skel/.mpd/mpd.log
79 #touch $root/etc/skel/.mpd/mpd.error
80 cp -f $root/etc/mpd.conf /etc/skel/.mpd
81 status
82 }