source: trunk/dports/sysutils/lirc/Portfile

Last change on this file was 154190, checked in by ctreleaven@…, 13 months ago

lirc: whitespace only

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Portfile 154190 2016-10-23 19:18:35Z ryandesign@macports.org $
2
3PortSystem          1.0
4PortGroup           cxx11 1.0
5
6name                lirc
7version             0.9.4c
8
9categories          sysutils net
10license             {GPL-2+ OpenSSLException}
11maintainers         ctreleaven openmaintainer
12platforms           darwin
13description         Linux Infrared Remote Control
14long_description \
15    LIRC enables receiving and/or sending infra-red remote controls signals.\
16    The only hardware is known to work (on the Mac operating system) includes the\
17    IR receiver in older HDHomerun tuner boxes and the Sony Vaio PCVA-IR5U receiver.\
18    Other hardware _could_ work but is untested.  Lirc does not currently work with\
19    the IR receiver built into various Mac models.\
20    Lirc on OSX can also receive signals relayed from another Lirc server.
21
22homepage            http://www.lirc.org
23master_sites        sourceforge
24use_bzip2           yes
25checksums           rmd160  d83dfec714d4e50c97b8f63b76df0bc472df0123 \
26                    sha256  8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a
27
28livecheck.distname  LIRC
29
30set lircuser        _lirc
31set pythonbranch    3.4
32set pythonver       python${pythonbranch}
33set pythonbin       ${prefix}/bin/${pythonver}
34set pymodver        py34
35
36use_autoreconf      yes
37autoreconf.cmd      ./autogen.sh
38# setting autoreconf.cmd means that autotools build dependencies are not added
39
40depends_build-append \
41                    port:autoconf \
42                    port:automake \
43                    port:gsed \
44                    port:libtool \
45                    port:pkgconfig \
46                    port:doxygen \
47                    port:man2html
48
49depends_lib         port:libftdi1 \
50                    port:gtk3 \
51                    port:portaudio \
52                    port:${pymodver}-gobject3 \
53                    port:${pymodver}-yaml \
54                    port:vte
55
56patchfiles          patch-lirc_options.diff \
57                    patch-ftdi_support.diff
58
59post-patch {
60    reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/lirc_options.conf
61    reinplace -locale C "s|#!/usr/bin/env python3\$|#!${pythonbin}|" \
62        ${worksrcpath}/doc/data2hwdb \
63        ${worksrcpath}/doc/data2table \
64        ${worksrcpath}/doc/make_rel_symlink.py \
65        ${worksrcpath}/tools/check_configs.py \
66        ${worksrcpath}/tools/irdb-get \
67        ${worksrcpath}/tools/lirc-setup/lirc-setup \
68        ${worksrcpath}/tools/lircd-setup \
69        ${worksrcpath}/tools/make_rel_symlink.py \
70        ${worksrcpath}/tools/pronto2lirc
71}
72
73configure.env-append \
74                    PYTHON=${pythonbin}
75configure.args      --disable-silent-rules
76
77post-destroot {
78    xinstall -m 755 -d ${destroot}${prefix}/var/log
79    xinstall -m 755 -d ${destroot}${prefix}/var/run/lirc
80    destroot.keepdirs ${destroot}${prefix}/var/log \
81        ${destroot}${prefix}/var/run/lirc
82    move ${destroot}${prefix}/etc/lirc/lirc_options.conf \
83        ${destroot}${prefix}/etc/lirc/lirc_options.conf.template
84}
85
86post-activate {
87    if ![file exists ${prefix}/etc/lirc/lirc_options.conf] {
88        copy ${prefix}/etc/lirc/lirc_options.conf.template \
89            ${prefix}/etc/lirc/lirc_options.conf
90    }
91}
92
93add_users ${lircuser} group=${lircuser} realname=LIRC\ user
94
95startupitem.create        yes
96startupitem.executable    ${prefix}/sbin/lircd \
97                          --nodaemon --effective-user=${lircuser}
98
99notes "
100Before starting the lircd background process, two configuration steps need to be\
101completed.  First, edit ${prefix}/etc/lirc/lirc_options.conf to specify the driver\
102and device being used.  Second, add at least one remote configuration file to\
103${prefix}/etc/lirc/lircd.conf.d so lirc can interpret the infrared pulses that your remote\
104sends.  The script irdb-get can help find existing remote configuration files or the\
105program irrecord can help create a configuration file for a particular remote.
106
107Any clients of lirc must be able to read and write the pipe at\
108${prefix}/var/run/lircd
109"
Note: See TracBrowser for help on using the repository browser.