wok view mpd/receipt @ rev 24742
updated libffcall (2.2 -> 2.4)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Mar 16 10:31:26 2022 +0100 (2022-03-16) |
parents | a3c45ab9082e |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="mpd"
4 VERSION="0.21.8"
5 CATEGORY="multimedia"
6 SHORT_DESC="Music Player Daemon (MPD)."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.musicpd.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="${WEB_SITE}download/$PACKAGE/${VERSION%.*}/$TARBALL"
14 DEPENDS="alsa-lib audiofile faad2 flac glib lame libboost \
15 libcrypto libcurl libid3tag libmad libogg libsamplerate \
16 libvorbis libwrap sqlite"
17 BUILD_DEPENDS="alsa-lib-dev audiofile-dev curl-dev faad2-dev flac-dev \
18 gcc83 glib-dev lame-dev libboost-dev libid3tag-dev \
19 libmad-dev libogg-dev libsamplerate-dev libvorbis-dev \
20 libwrap-dev meson zlib-dev"
22 HOST_ARCH="i486 arm"
24 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - $WEB_SITE 2>/dev/null | \
28 sed '/released/!d;/MPD [0-9]/!d;s|.*MPD ||;s| .*||;q'
29 }
31 # Handle SliTaz arch
32 case "$SLITAZ_ARCH" in
33 arm)
34 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \
35 libogg libvorbis" ;;
36 esac
38 # Handle cross comilation
39 case "$ARCH" in
40 arm)
41 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev libgio-dev lame-dev \
42 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;;
43 esac
45 # Rules to configure and make the package.
46 compile_rules()
47 {
48 # sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
49 export CC=gcc-83
50 export CXX=g++-83
51 meson . output \
52 -Djack=disabled \
53 -Dao=disabled \
54 -Dmodplug=disabled \
55 -Dmms=disabled \
56 -Dffmpeg=disabled \
57 -Dwavpack=disabled \
58 -Dsystemd=disabled \
59 -Dzeroconf=disabled &&
60 ninja -C output &&
61 ninja -C output install
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/sbin
68 mkdir -p $fs/etc
69 cp -a $install/usr/bin/mpd $fs/usr/sbin
70 cp $install/usr/share/doc/mpd/mpdconf.example \
71 $fs/etc/mpd.conf
72 cp -a $stuff/* $fs
73 }
75 post_install()
76 {
77 newline
78 # Drop root priviledges and enable pid file
79 action 'Enabling mpd.conf...'
80 cd $root/etc
81 sed -i 's/#music_directory/music_directory/; \
82 s/#playlist_directory/playlist_directory/; \
83 s/#db_file/db_file/; \
84 s/#pid_file/pid_file/; \
85 s/#user "nobody"/user "tux"/; \
86 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
87 status
89 # Make mpd directories and files
90 action 'Enabling mpd files and directories...'
91 mkdir $root/etc/skel/music
92 mkdir -p $root/etc/skel/.mpd/playlists
93 touch $root/etc/skel/.mpd/mpd.log
94 #touch $root/etc/skel/.mpd/mpd.error
95 cp -f $root/etc/mpd.conf /etc/skel/.mpd
96 status
97 }