wok annotate mpd/receipt @ rev 24428

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