wok-current 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 128f691c5117
children d0e9cc44b37e
files mpd/receipt
line diff
     1.1 --- a/mpd/receipt	Wed Mar 05 03:32:36 2014 +0100
     1.2 +++ b/mpd/receipt	Wed Mar 05 03:33:57 2014 +0100
     1.3 @@ -9,38 +9,48 @@
     1.4  TARBALL="$PACKAGE-$VERSION.tar.bz2"
     1.5  WEB_SITE="http://www.musicpd.org/"
     1.6  WGET_URL="$SF_MIRROR/musicpd/$TARBALL"
     1.7 +HOST_ARCH="i486 arm"
     1.8  
     1.9  DEPENDS="libid3tag libmad libogg libvorbis libsamplerate flac alsa-lib \
    1.10  audiofile faad2 lame sqlite libcurl glib libcrypto"
    1.11  BUILD_DEPENDS="alsa-lib-dev zlib-dev libid3tag-dev libsamplerate-dev \
    1.12 -libmad-dev libogg-dev libvorbis-dev flac-dev libsamplerate \
    1.13 -libid3tag audiofile audiofile-dev faad2 faad2-dev pkg-config glib-dev lame-dev"
    1.14 +libmad-dev libogg-dev libvorbis-dev flac-dev audiofile-dev faad2-dev 
    1.15 +glib-dev lame-dev"
    1.16 +
    1.17 +# Handle SliTaz arch
    1.18 +case "$SLITAZ_ARCH" in
    1.19 +	arm) DEPENDS="alsa-lib zlib glib lame libmad libsamplerate" ;;
    1.20 +esac
    1.21 +
    1.22 +# Handle cross comilation
    1.23 +case "$ARCH" in
    1.24 +	arm) 
    1.25 +		BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev lame-dev libmad-dev \
    1.26 +libsamplerate-dev" ;;
    1.27 +esac
    1.28  
    1.29  # Rules to configure and make the package.
    1.30  compile_rules()
    1.31  {
    1.32  	cd $src
    1.33  	sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
    1.34 -	./configure --prefix=/usr --infodir=/usr/share/info \
    1.35 -	--mandir=/usr/share/man \
    1.36 -	--disable-jack \
    1.37 -	--disable-ao \
    1.38 -	--disable-modplug \
    1.39 -	--disable-mms \
    1.40 -	--disable-ffmpeg \
    1.41 -	--disable-wavpack \
    1.42 -	--disable-systemd-daemon \
    1.43 -	--with-zeroconf=no \
    1.44 -	$CONFIGURE_ARGS &&
    1.45 -	make &&
    1.46 -	make DESTDIR=$DESTDIR install
    1.47 +	./configure \
    1.48 +		--disable-jack \
    1.49 +		--disable-ao \
    1.50 +		--disable-modplug \
    1.51 +		--disable-mms \
    1.52 +		--disable-ffmpeg \
    1.53 +		--disable-wavpack \
    1.54 +		--disable-systemd-daemon \
    1.55 +		--with-zeroconf=no \
    1.56 +		$CONFIGURE_ARGS &&
    1.57 +	make && make install
    1.58  }
    1.59  
    1.60  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.61  genpkg_rules()
    1.62  {
    1.63 -	mkdir -p $fs/usr/sbin
    1.64 -	mkdir -p $fs/etc
    1.65 +	mkdir -p $fs/usr/sbin $fs/etc
    1.66  	cp -a $install/usr/bin/mpd $fs/usr/sbin
    1.67  	cp $install/usr/share/doc/mpd/mpdconf.example $fs/etc/mpd.conf
    1.68  	cp -a $stuff/* $fs
    1.69 @@ -52,7 +62,7 @@
    1.70  
    1.71  	# Drop root priviledges and enable pid file
    1.72  	echo -n "Enabling mpd.conf..."
    1.73 -	cd $1/etc
    1.74 +	cd $root/etc
    1.75  	sed -i 's/#music_directory/music_directory/; \
    1.76  	s/#playlist_directory/playlist_directory/; \
    1.77  	s/#db_file/db_file/; \
    1.78 @@ -63,15 +73,11 @@
    1.79  	
    1.80  	# Make mpd directories and files
    1.81  	echo -n "Enabling mpd files and directories..."
    1.82 -	mkdir /home/tux/music
    1.83 -	mkdir -p /home/tux/.mpd/playlists
    1.84 -	touch /home/tux/.mpd/mpd.log
    1.85 -	#touch /home/tux/.mpd/mpd.error
    1.86 -	cp -a /etc/mpd.conf /home/tux/.mpd
    1.87 -
    1.88 -	# And change permissions
    1.89 -	chown tux:users /home/tux/music
    1.90 -	chown -R tux:users /home/tux/.mpd
    1.91 +	mkdir $root/etc/skel/music
    1.92 +	mkdir -p $root/etc/skel/.mpd/playlists
    1.93 +	touch $root/etc/skel/.mpd/mpd.log
    1.94 +	#touch $root/etc/skel/.mpd/mpd.error
    1.95 +	cp -f $root/etc/mpd.conf /etc/skel/.mpd
    1.96  	status
    1.97  }
    1.98