wok-next view mpd/receipt @ rev 20566

linld, screenfetch: create $install tree (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 10 10:30:46 2018 +0200 (2018-04-10)
parents e6615350078d
children d5aab818505e
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 sqlite3 libcurl glib openssl libwrap"
15 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
16 libmad-dev libogg-dev libvorbis-dev flac-dev audiofile-dev faad2-dev \
17 glib-dev lame-dev libwrap-dev curl-dev"
19 # Handle SliTaz arch
20 case "$SLITAZ_ARCH" in
21 arm)
22 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \
23 libogg libvorbis" ;;
24 esac
26 # Handle cross comilation
27 case "$ARCH" in
28 arm)
29 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev lame-dev \
30 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;;
31 esac
33 # Rules to configure and make the package.
34 compile_rules()
35 {
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 newline
62 # Drop root priviledges and enable pid file
63 action 'Enabling mpd.conf...'
64 cd $root/etc
65 sed -i 's/#music_directory/music_directory/; \
66 s/#playlist_directory/playlist_directory/; \
67 s/#db_file/db_file/; \
68 s/#pid_file/pid_file/; \
69 s/#user "nobody"/user "tux"/; \
70 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
71 status
73 # Make mpd directories and files
74 action 'Enabling mpd files and directories...'
75 mkdir $root/etc/skel/music
76 mkdir -p $root/etc/skel/.mpd/playlists
77 touch $root/etc/skel/.mpd/mpd.log
78 #touch $root/etc/skel/.mpd/mpd.error
79 cp -f $root/etc/mpd.conf /etc/skel/.mpd
80 status
81 }