Ticket #51667: Portfile.2

File Portfile.2, 3.0 KB (added by dliessi (Davide Liessi), 8 years ago)

add Perl variants; add note on use outside UK

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$
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6PortGroup           github 1.0
7
8github.setup        get-iplayer get_iplayer 2.94 v
9categories          net multimedia
10platforms           darwin
11maintainers         gmail.com:davide.liessi openmaintainer
12supported_archs     noarch
13license             GPL-3+
14
15description         A utility for downloading TV and radio from BBC iPlayer
16long_description    ${description}. \
17                    \nThis port does not install the Web PVR Manager (get_iplayer.cgi).
18
19checksums           rmd160  5f43f5840ad2eb6c07a8c95effa5bf1d6f100a6b \
20                    sha256  06caa8f96ad6fba53c3a7f97400a5701d013d3edee1658a6e0a3cbed4f94ae57
21
22perl5.require_variant   yes
23perl5.conflict_variants yes
24perl5.branches          5.22 5.24
25perl5.create_variants   ${perl5.branches}
26
27depends_run         port:perl${perl5.major} \
28                    port:p${perl5.major}-libwww-perl \
29                    port:p${perl5.major}-xml-simple \
30                    port:p${perl5.major}-mp3-tag \
31                    port:p${perl5.major}-mp3-info \
32                    port:p${perl5.major}-net-smtp-tls-butmaintained \
33                    port:p${perl5.major}-net-smtp-ssl \
34                    port:p${perl5.major}-authen-sasl \
35                    port:rtmpdump \
36                    port:atomicparsley \
37                    port:id3v2 \
38                    path:bin/ffmpeg:ffmpeg
39
40post-patch {
41    reinplace "s|#!/usr/bin/env perl|#!${perl5.bin}|g" \
42        ${worksrcpath}/get_iplayer
43    reinplace "s|/usr/share|${prefix}/share|g" \
44        ${worksrcpath}/get_iplayer
45    reinplace "s|/etc|${prefix}/etc|g" \
46        ${worksrcpath}/get_iplayer
47}
48
49use_configure       no
50build {}
51
52destroot {
53    xinstall -d ${destroot}${prefix}/bin
54    xinstall -m 755 ${worksrcpath}/get_iplayer ${destroot}${prefix}/bin
55
56    xinstall -d ${destroot}${prefix}/share/man/man1
57    xinstall -m 644 ${worksrcpath}/get_iplayer.1 ${destroot}${prefix}/share/man/man1
58
59    xinstall -d ${destroot}${prefix}/share/doc/${name}
60    xinstall -m 644 -W ${worksrcpath} \
61        CHANGELOG.txt \
62        CONTRIBUTORS \
63        LICENSE.txt \
64        README.md \
65        ${destroot}${prefix}/share/doc/${name}
66
67    xinstall -d ${destroot}${prefix}/share/${name}/plugins
68    xinstall -m 644 {*}[glob ${worksrcpath}/plugins/*.plugin] \
69        ${destroot}${prefix}/share/${name}/plugins
70    xinstall -m 644 ${worksrcpath}/plugins/plugin.template \
71        ${destroot}${prefix}/share/${name}/plugins
72
73    xinstall -d ${destroot}${prefix}/etc/${name}
74    set optionsfile [open ${destroot}${prefix}/etc/${name}/options w]
75    puts ${optionsfile} "packagemanager MacPorts"
76    close ${optionsfile}
77}
78
79notes-append \
80"Use of get_iplayer outside the UK is not supported,\
81with the exception of downloading lower-quality (96k and 48k)\
82radio programmes that are available to international users.
83
84See http://iplayerhelp.external.bbc.co.uk/tv/outsideuk\
85for more details."