wok-current view mpd/receipt @ rev 23856
codeblocks: use wxWidgets and gcc49
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Tue Jun 16 23:39:15 2020 -0400 (2020-06-16) |
parents | 6e8b1bcb30e2 |
children | a3c45ab9082e |
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 # Handle SliTaz arch
25 case "$SLITAZ_ARCH" in
26 arm)
27 DEPENDS="alsa-lib zlib glib lame libmad libsamplerate libwrap \
28 libogg libvorbis" ;;
29 esac
31 # Handle cross comilation
32 case "$ARCH" in
33 arm)
34 BUILD_DEPENDS="alsa-lib-dev zlib-dev glib-dev libgio-dev lame-dev \
35 libmad-dev libsamplerate-dev libwrap-dev libogg-dev libvorbis-dev" ;;
36 esac
38 # Rules to configure and make the package.
39 compile_rules()
40 {
41 # sed -i 's/<stdbool.h>/&\n#include <stdio.h>/' src/decoder_api.h
42 export CC=gcc-83
43 export CXX=g++-83
44 meson . output \
45 -Djack=disabled \
46 -Dao=disabled \
47 -Dmodplug=disabled \
48 -Dmms=disabled \
49 -Dffmpeg=disabled \
50 -Dwavpack=disabled \
51 -Dsystemd=disabled \
52 -Dzeroconf=disabled &&
53 ninja -C output &&
54 ninja -C output install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 mkdir -p $fs/usr/sbin
61 mkdir -p $fs/etc
62 cp -a $install/usr/bin/mpd $fs/usr/sbin
63 cp $install/usr/share/doc/mpd/mpdconf.example \
64 $fs/etc/mpd.conf
65 cp -a $stuff/* $fs
66 }
68 post_install()
69 {
70 newline
71 # Drop root priviledges and enable pid file
72 action 'Enabling mpd.conf...'
73 cd $root/etc
74 sed -i 's/#music_directory/music_directory/; \
75 s/#playlist_directory/playlist_directory/; \
76 s/#db_file/db_file/; \
77 s/#pid_file/pid_file/; \
78 s/#user "nobody"/user "tux"/; \
79 s/#bind_to_address "any"/bind_to_address "localhost"/' mpd.conf
80 status
82 # Make mpd directories and files
83 action 'Enabling mpd files and directories...'
84 mkdir $root/etc/skel/music
85 mkdir -p $root/etc/skel/.mpd/playlists
86 touch $root/etc/skel/.mpd/mpd.log
87 #touch $root/etc/skel/.mpd/mpd.error
88 cp -f $root/etc/mpd.conf /etc/skel/.mpd
89 status
90 }