source: trunk/dports/audio/mpd/Portfile @ 99335

Last change on this file since 99335 was 99335, checked in by rmstonecipher@…, 8 years ago

audio/mpd grouped mp3 decoder choices into mutually-exclusive variants, force-disabled jack (an undesired dependency enabled by default if detected)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 99335 2012-11-02 02:57:13Z rmstonecipher@macports.org $
3
4PortSystem          1.0
5
6name                mpd
7version             0.17.2
8revision            1
9categories          audio
10maintainers         rmstonecipher openmaintainer
11description         Music Player Daemon
12long_description    Music Player Daemon (MPD) allows remote access for playing music \
13    (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing \
14    playlists. MPD is designed for integrating a computer into a stereo \
15    system that provides control for music playback over a local network. \
16    It also makes a great desktop music player, especially if you are a \
17    console junkie, like frontend options, or restart X often.
18homepage            http://www.musicpd.org/
19platforms           darwin
20master_sites        sourceforge:musicpd
21license             GPL-2+ LGPL-2.1
22use_bzip2           yes
23checksums           rmd160  11340e49d26b4d1377106e0d3facfa136f524bf7 \
24                    sha256  48ff361a35df2751610e9716930e29235c1bd77224e57eb9ada1f04950668eb7
25depends_build       port:pkgconfig
26depends_lib \
27    port:audiofile \
28    port:cdparanoia \
29    port:curl \
30    port:faad2 \
31    port:flac \
32    path:lib/pkgconfig/glib-2.0.pc:glib2 \
33    port:libcue \
34    port:libiconv \
35    port:libid3tag \
36    port:libmpcdec \
37    port:libogg \
38    port:libvorbis \
39    port:zlib \
40    port:libao
41
42configure.args \
43    --mandir=${prefix}/share/man \
44    --disable-ffmpeg \
45    --disable-jack \
46    --enable-ao \
47    --enable-lastfm
48configure.cflags-append -I${prefix}/include
49variant ffmpeg description {Support for myriad formats via ffmpeg} {
50    depends_lib-append  path:lib/libavcodec.dylib:ffmpeg
51    configure.args-delete --disable-ffmpeg
52}
53variant mod description {Support for several formats of tracker/sequencer files via libmikmod} {
54    depends_lib-append    port:libmikmod
55    configure.args-append --enable-mod
56}
57variant modplug description {Support for several formats of tracker/sequencer files via libmodplug} {
58    depends_lib-append    port:libmodplug
59    configure.args-append --enable-modplug
60}
61variant mpg123 conflicts mad description {Use mpg123 rather than mad as mp3 deconding library} {
62    depends_lib-append    port:mpg123
63    configure.args-append --enable-mpg123 --disable-mad
64}
65variant mad conflicts mpg123 description (Use mad rather than mpg123 as mp3 decoding library} {
66    depends_lib-append      port:libmad
67    configure.args-append   --enable-mad --disable-mpg123
68}
69default_variants    mad
70platform macosx {
71    configure.args-delete --enable-ao
72    depends_lib-delete    port:libao
73}
74
75if {"darwin" == ${os.platform} && ${os.major} > 8} {
76    set mpduser       _mpd
77} else {
78    set mpduser       mpd
79}
80# Create new user for mpd:
81add_users ${mpduser} group=${mpduser} realname=Music\ Player\ Daemon
82
83startupitem.create  yes
84startupitem.start   "${prefix}/bin/mpd --no-daemon ${prefix}/etc/mpd.conf"
85startupitem.stop    "${prefix}/bin/mpd --kill"
86destroot.keepdirs   ${destroot}${prefix}/var/lib/mpd/music \
87    ${destroot}${prefix}/var/lib/mpd/playlists \
88    ${destroot}${prefix}/var/log/mpd
89post-destroot {
90    # ensure ${prefix}/var/[lib/mpd/[music,playlists],log/mpd] exist
91    xinstall -m 755 -o ${mpduser} -g ${mpduser} -d \
92    ${destroot}${prefix}/var/lib/mpd/music \
93    ${destroot}${prefix}/var/lib/mpd/playlists \
94    ${destroot}${prefix}/var/log/mpd
95
96    xinstall -m 644 ${filespath}/mpd.conf ${destroot}${prefix}/etc/mpd.conf.default
97    reinplace "s|%%PREFIX%%|${prefix}|g" \
98        ${destroot}${prefix}/etc/mpd.conf.default
99    reinplace "s|%%MPDUSER%%|${mpduser}|g" \
100        ${destroot}${prefix}/etc/mpd.conf.default
101}
102post-activate {
103    if {![file exists ${prefix}/etc/mpd.conf]} {
104        copy ${prefix}/etc/mpd.conf.default ${prefix}/etc/mpd.conf
105    }
106}
107
108notes "A basic configuration file has been created for you.
109To add music to mpd's database, create symbolic links in
110${prefix}/var/lib/mpd/music using 'ln -s'.  For advanced
111configuration, run \"man mpd.conf\" or refer to
112${prefix}/share/doc/mpd/mpdconf.example for an example configuration file.
113
114You may get \"Problems shmget'ing\" message when launching mpd.
115In this case, you can increase the values of kern.sysv.shmmax and
116kern.sysv.shmall in /etc/rc."
117
118
119livecheck.url   http://sourceforge.net/projects/musicpd/files/${name}/
120livecheck.regex "${name}\/(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.