wok annotate mpd/receipt @ rev 17308
Up: slitaz-tools, slitaz-tools-boxes (5.8.10)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 01 19:07:11 2014 +0200 (2014-11-01) |
parents | 098e3319bd98 |
children | 6fab3264ba87 |
rev | line source |
---|---|
paul@1375 | 1 # SliTaz package receipt. |
paul@1375 | 2 |
paul@1375 | 3 PACKAGE="mpd" |
devl547@13807 | 4 VERSION="0.17.2" |
paul@1375 | 5 CATEGORY="multimedia" |
paul@1375 | 6 SHORT_DESC="Music Player Daemon (MPD)." |
paul@1375 | 7 MAINTAINER="paul@slitaz.org" |
pascal@15001 | 8 LICENSE="GPL2" |
pascal@15001 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@15001 | 10 WEB_SITE="http://www.musicpd.org/" |
pascal@15001 | 11 WGET_URL="$SF_MIRROR/musicpd/$TARBALL" |
pankso@16016 | 12 HOST_ARCH="i486 arm" |
pascal@15001 | 13 |
pascal@5004 | 14 DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib \ |
pankso@16034 | 15 audiofile faad2 lame sqlite libcurl glib libcrypto libwrap" |
paul@1387 | 16 BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \ |
pankso@16016 | 17 libmad-dev libogg-dev libvorbis-dev flac-dev audiofile-dev faad2-dev |
mojo@17079 | 18 glib-dev lame-dev libwrap-dev curl-dev" |
pankso@16016 | 19 |
pankso@16016 | 20 # Handle SliTaz arch |
pankso@16016 | 21 case "$SLITAZ_ARCH" in |
pankso@16034 | 22 arm) |
pankso@16105 | 23 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \ |
pankso@16105 | 24 libogg libvorbis" ;; |
pankso@16016 | 25 esac |
pankso@16016 | 26 |
pankso@16016 | 27 # Handle cross comilation |
pankso@16016 | 28 case "$ARCH" in |
pankso@16016 | 29 arm) |
pankso@16034 | 30 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev libgio-dev lame-dev \ |
pankso@16105 | 31 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;; |
pankso@16016 | 32 esac |
paul@1375 | 33 |
paul@1375 | 34 # Rules to configure and make the package. |
paul@1375 | 35 compile_rules() |
paul@1375 | 36 { |
paul@1375 | 37 cd $src |
pascal@12676 | 38 sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h |
pankso@16016 | 39 ./configure \ |
pankso@16016 | 40 --disable-jack \ |
pankso@16016 | 41 --disable-ao \ |
pankso@16016 | 42 --disable-modplug \ |
pankso@16016 | 43 --disable-mms \ |
pankso@16016 | 44 --disable-ffmpeg \ |
pankso@16016 | 45 --disable-wavpack \ |
pankso@16016 | 46 --disable-systemd-daemon \ |
pankso@16016 | 47 --with-zeroconf=no \ |
pankso@16016 | 48 $CONFIGURE_ARGS && |
pankso@16016 | 49 make && make install |
paul@1375 | 50 } |
paul@1375 | 51 |
paul@1375 | 52 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@1375 | 53 genpkg_rules() |
paul@1375 | 54 { |
pankso@16016 | 55 mkdir -p $fs/usr/sbin $fs/etc |
devl547@13807 | 56 cp -a $install/usr/bin/mpd $fs/usr/sbin |
devl547@13807 | 57 cp $install/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf |
pascal@10908 | 58 cp -a $stuff/* $fs |
paul@1375 | 59 } |
paul@1375 | 60 |
paul@1375 | 61 post_install() |
paul@1375 | 62 { |
paul@1375 | 63 echo "Processing post-install commands..." |
paul@1375 | 64 |
paul@1375 | 65 # Drop root priviledges and enable pid file |
paul@1375 | 66 echo -n "Enabling mpd.conf..." |
pankso@16016 | 67 cd $root/etc |
paul@4808 | 68 sed -i 's/#music_directory/music_directory/; \ |
paul@4808 | 69 s/#playlist_directory/playlist_directory/; \ |
paul@4808 | 70 s/#db_file/db_file/; \ |
paul@4808 | 71 s/#pid_file/pid_file/; \ |
paul@4808 | 72 s/#user "nobody"/user "tux"/; \ |
paul@4808 | 73 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf |
paul@1375 | 74 status |
paul@1375 | 75 |
paul@1375 | 76 # Make mpd directories and files |
paul@4808 | 77 echo -n "Enabling mpd files and directories..." |
pankso@16016 | 78 mkdir $root/etc/skel/music |
pankso@16016 | 79 mkdir -p $root/etc/skel/.mpd/playlists |
pankso@16016 | 80 touch $root/etc/skel/.mpd/mpd.log |
pankso@16016 | 81 #touch $root/etc/skel/.mpd/mpd.error |
pankso@16016 | 82 cp -f $root/etc/mpd.conf /etc/skel/.mpd |
paul@1375 | 83 status |
paul@1375 | 84 } |
paul@1375 | 85 |