wok-current annotate mpd/receipt @ rev 24906
updated minidlna (1.2.1 -> 1.3.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Apr 09 14:37:52 2022 +0100 (2022-04-09) |
parents | a3c45ab9082e |
children |
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@24614 | 24 # What is the latest version available today? |
pascal@24083 | 25 current_version() |
pascal@24083 | 26 { |
pascal@24083 | 27 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24614 | 28 sed '/released/!d;/MPD [0-9]/!d;s|.*MPD ||;s| .*||;q' |
pascal@24083 | 29 } |
pascal@24083 | 30 |
pankso@16016 | 31 # Handle SliTaz arch |
pankso@16016 | 32 case "$SLITAZ_ARCH" in |
al@18741 | 33 arm) |
pankso@16105 | 34 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \ |
Hans-G?nter@21482 | 35 libogg libvorbis" ;; |
pankso@16016 | 36 esac |
pankso@16016 | 37 |
pankso@16016 | 38 # Handle cross comilation |
pankso@16016 | 39 case "$ARCH" in |
pankso@16016 | 40 arm) |
pankso@16034 | 41 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev libgio-dev lame-dev \ |
Hans-G?nter@21482 | 42 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;; |
pankso@16016 | 43 esac |
paul@1375 | 44 |
paul@1375 | 45 # Rules to configure and make the package. |
paul@1375 | 46 compile_rules() |
paul@1375 | 47 { |
Hans-G?nter@21482 | 48 # sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h |
Hans-G?nter@21482 | 49 export CC=gcc-83 |
Hans-G?nter@21482 | 50 export CXX=g++-83 |
Hans-G?nter@21482 | 51 meson . output \ |
Hans-G?nter@21482 | 52 -Djack=disabled \ |
Hans-G?nter@21482 | 53 -Dao=disabled \ |
Hans-G?nter@21482 | 54 -Dmodplug=disabled \ |
Hans-G?nter@21482 | 55 -Dmms=disabled \ |
Hans-G?nter@21482 | 56 -Dffmpeg=disabled \ |
Hans-G?nter@21482 | 57 -Dwavpack=disabled \ |
Hans-G?nter@21482 | 58 -Dsystemd=disabled \ |
Hans-G?nter@21482 | 59 -Dzeroconf=disabled && |
Hans-G?nter@21482 | 60 ninja -C output && |
Hans-G?nter@21482 | 61 ninja -C output install |
paul@1375 | 62 } |
paul@1375 | 63 |
paul@1375 | 64 # Rules to gen a SliTaz package suitable for Tazpkg. |
paul@1375 | 65 genpkg_rules() |
paul@1375 | 66 { |
Hans-G?nter@21482 | 67 mkdir -p $fs/usr/sbin |
Hans-G?nter@21482 | 68 mkdir -p $fs/etc |
Hans-G?nter@21482 | 69 cp -a $install/usr/bin/mpd $fs/usr/sbin |
Hans-G?nter@21482 | 70 cp $install/usr/share/doc/mpd/mpdconf.example \ |
Hans-G?nter@21482 | 71 $fs/etc/mpd.conf |
Hans-G?nter@21482 | 72 cp -a $stuff/* $fs |
paul@1375 | 73 } |
paul@1375 | 74 |
paul@1375 | 75 post_install() |
paul@1375 | 76 { |
al@18741 | 77 newline |
paul@1375 | 78 # Drop root priviledges and enable pid file |
al@18741 | 79 action 'Enabling mpd.conf...' |
pankso@16016 | 80 cd $root/etc |
paul@4808 | 81 sed -i 's/#music_directory/music_directory/; \ |
paul@4808 | 82 s/#playlist_directory/playlist_directory/; \ |
paul@4808 | 83 s/#db_file/db_file/; \ |
paul@4808 | 84 s/#pid_file/pid_file/; \ |
paul@4808 | 85 s/#user "nobody"/user "tux"/; \ |
paul@4808 | 86 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf |
paul@1375 | 87 status |
al@18741 | 88 |
paul@1375 | 89 # Make mpd directories and files |
al@18741 | 90 action 'Enabling mpd files and directories...' |
pankso@16016 | 91 mkdir $root/etc/skel/music |
pankso@16016 | 92 mkdir -p $root/etc/skel/.mpd/playlists |
pankso@16016 | 93 touch $root/etc/skel/.mpd/mpd.log |
pankso@16016 | 94 #touch $root/etc/skel/.mpd/mpd.error |
pankso@16016 | 95 cp -f $root/etc/mpd.conf /etc/skel/.mpd |
paul@1375 | 96 status |
paul@1375 | 97 } |