wok-6.x view mpd/receipt @ rev 24525

Up libav (0.6.6 -> 12.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 22 16:15:28 2022 +0000 (2022-02-22)
parents 1ccc78d4d3b3
children bc2b9d9bed6f
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 current_version()
25 {
26 wget -O - $WEB_SITE 2>/dev/null | \
27 sed '/released/!d;s|.*MPD ||;s| .*||;q'
28 }
30 # Handle SliTaz arch
31 case "$SLITAZ_ARCH" in
32 arm)
33 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \
34 libogg libvorbis" ;;
35 esac
37 # Handle cross comilation
38 case "$ARCH" in
39 arm)
40 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev libgio-dev lame-dev \
41 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;;
42 esac
44 # Rules to configure and make the package.
45 compile_rules()
46 {
47 # sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
48 export CC=gcc-83
49 export CXX=g++-83
50 meson . output \
51 -Djack=disabled \
52 -Dao=disabled \
53 -Dmodplug=disabled \
54 -Dmms=disabled \
55 -Dffmpeg=disabled \
56 -Dwavpack=disabled \
57 -Dsystemd=disabled \
58 -Dzeroconf=disabled &&
59 ninja -C output &&
60 ninja -C output install
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 mkdir -p $fs/usr/sbin
67 mkdir -p $fs/etc
68 cp -a $install/usr/bin/mpd $fs/usr/sbin
69 cp $install/usr/share/doc/mpd/mpdconf.example \
70 $fs/etc/mpd.conf
71 cp -a $stuff/* $fs
72 }
74 post_install()
75 {
76 newline
77 # Drop root priviledges and enable pid file
78 action 'Enabling mpd.conf...'
79 cd $root/etc
80 sed -i 's/#music_directory/music_directory/; \
81 s/#playlist_directory/playlist_directory/; \
82 s/#db_file/db_file/; \
83 s/#pid_file/pid_file/; \
84 s/#user "nobody"/user "tux"/; \
85 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
86 status
88 # Make mpd directories and files
89 action 'Enabling mpd files and directories...'
90 mkdir $root/etc/skel/music
91 mkdir -p $root/etc/skel/.mpd/playlists
92 touch $root/etc/skel/.mpd/mpd.log
93 #touch $root/etc/skel/.mpd/mpd.error
94 cp -f $root/etc/mpd.conf /etc/skel/.mpd
95 status
96 }