Ticket #66078: Portfile

File Portfile, 3.2 KB (added by johnrosshunt, 19 months ago)

Made a few cosmetic changes

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
3PortSystem          1.0
4
5name                hdhomerun
6version             20221023
7categories          net multimedia
8platforms           darwin
9license             LGPL-3+
10maintainers         {ctreleaven @ctreleaven} openmaintainer
11description         HDHomeRun device configuration utility
12homepage            https://www.silicondust.com/
13
14master_sites        http://download.silicondust.com/hdhomerun
15
16if {${name} eq ${subport}} {
17    long_description    Provides a library and utility program to access, configure and test \
18                        HDHomeRun network tuner devices from SiliconDust.  May also be used to \
19                        upgrade firmware. Command line-driven and scriptable.
20
21    distname            lib${name}_${version}
22    extract.suffix      .tgz
23    extract.only        ${distname}${extract.suffix}
24    worksrcdir          lib${name}
25    checksums           rmd160  79de29621ade281c60d4d31bcc744bd51623ea68 \
26                        sha256  f07d5d56aef4650198f940a73e44adfd278b2a2ee163274475c1acb5dd52f1ae \
27                        size    62610
28    universal_variant   yes
29
30    patchfiles          patch-01-Makefile-${version}.diff
31    patch.args          -p1
32    post-patch {
33        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
34    }
35
36    use_configure       no
37 
38    build.args-append   CC="${configure.cc}" \
39                        CFLAGS="${configure.cflags}"
40
41    if {![info exists universal_possible]} {
42        set universal_possible [expr {${os.universal_supported} && [llength ${configure.universal_archs}] >= 2}]
43    }
44    if {${universal_possible} && [variant_isset universal]} {
45        build.args-append \
46                        TARGET="[portconfigure::configure_get_universal_archflags]"
47    } else {
48        build.args-append \
49                        TARGET="[get_canonical_archflags cc]"
50    }
51
52    destroot {
53        xinstall -m 0755 ${worksrcpath}/hdhomerun_config \
54            ${destroot}${prefix}/bin/hdhomerun_config
55        xinstall -m 0755 ${worksrcpath}/libhdhomerun.dylib \
56            ${destroot}${prefix}/lib/libhdhomerun.dylib
57        xinstall -d -m 0755 ${destroot}${prefix}/include/libhdhomerun/
58        xinstall -m 0644 -W ${worksrcpath} \
59                hdhomerun.h hdhomerun_channels.h hdhomerun_channelscan.h \
60                hdhomerun_control.h hdhomerun_debug.h hdhomerun_device.h \
61                hdhomerun_device_selector.h hdhomerun_discover.h hdhomerun_os.h \
62                hdhomerun_os_posix.h hdhomerun_pkt.h hdhomerun_sock.h \
63                hdhomerun_types.h hdhomerun_video.h \
64            ${destroot}${prefix}/include/libhdhomerun/
65        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/
66        xinstall -m 0644 ${worksrcpath}/README.md \
67            ${destroot}${prefix}/share/doc/${name}/README.md
68    }
69    livecheck.type      regex
70    livecheck.url       http://www.silicondust.com/support/hdhomerun/downloads/
71    livecheck.regex     Current release: (\[0-9\]+)
72}
73
74notes "Up to date device firmware is available from:\n\
75\thttps://www.silicondust.com/support/linux/"