summaryrefslogtreecommitdiff
path: root/comms/lirc
diff options
context:
space:
mode:
authorcheusov <cheusov@pkgsrc.org>2012-12-02 01:21:50 +0000
committercheusov <cheusov@pkgsrc.org>2012-12-02 01:21:50 +0000
commitd90a63cc2800e9a02eddf10f42586fe19a2f901f (patch)
treef7531aa76ac4d6e24f81954c89525e17c2812b30 /comms/lirc
parent66e0b67ab687cc72ebe4a1c8090a49e21d1719a5 (diff)
downloadpkgsrc-d90a63cc2800e9a02eddf10f42586fe19a2f901f.tar.gz
Import LIRC, Linux Infrared Remote Control
LIRC is a package that supports receiving and sending IR signals of the most common IR remote controls. It contains a daemon that decodes and sends IR signals, a mouse daemon that translates IR signals to mouse movements and a couple of user programs that allow to control your computer with a remote control. Tested on RHEL.
Diffstat (limited to 'comms/lirc')
-rw-r--r--comms/lirc/DESCR5
-rw-r--r--comms/lirc/Makefile40
-rw-r--r--comms/lirc/PLIST32
-rw-r--r--comms/lirc/available.mk13
-rw-r--r--comms/lirc/buildlink3.mk17
-rw-r--r--comms/lirc/distinfo5
-rw-r--r--comms/lirc/files/lircd.sh18
-rw-r--r--comms/lirc/options.mk17
8 files changed, 147 insertions, 0 deletions
diff --git a/comms/lirc/DESCR b/comms/lirc/DESCR
new file mode 100644
index 00000000000..e10674b39c5
--- /dev/null
+++ b/comms/lirc/DESCR
@@ -0,0 +1,5 @@
+LIRC is a package that supports receiving and sending IR signals of
+the most common IR remote controls. It contains a daemon that decodes
+and sends IR signals, a mouse daemon that translates IR signals to
+mouse movements and a couple of user programs that allow to control
+your computer with a remote control.
diff --git a/comms/lirc/Makefile b/comms/lirc/Makefile
new file mode 100644
index 00000000000..59bd0064fd4
--- /dev/null
+++ b/comms/lirc/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1 2012/12/02 01:21:50 cheusov Exp $
+#
+
+DISTNAME= lirc-0.9.0
+CATEGORIES= comms
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lirc/}
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= cheusov@tut.by
+HOMEPAGE= http://www.lirc.org/
+COMMENT= Linux Infrared Remote Control
+LICENSE= gnu-gpl-v2
+
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --with-syslog --with-driver=userspace
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+
+RCD_SCRIPTS= lircd
+
+EGDIR= ${PREFIX}/share/examples/lirc
+EGFILES= lircd.conf lircmd.conf
+
+INSTALLATION_DIRS= ${EGDIR}
+
+post-install:
+.for i in ${EGFILES}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/${i} ${DESTDIR}${EGDIR}
+.endfor
+
+.include "available.mk"
+.if ${LIRC_AVAILABLE} == no
+PKG_FAIL_REASON= "lirc is not available for this platform"
+.endif
+
+.include "options.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/comms/lirc/PLIST b/comms/lirc/PLIST
new file mode 100644
index 00000000000..b5544e180ff
--- /dev/null
+++ b/comms/lirc/PLIST
@@ -0,0 +1,32 @@
+@comment $NetBSD: PLIST,v 1.1 2012/12/02 01:21:50 cheusov Exp $
+bin/ircat
+bin/irexec
+bin/irpty
+bin/irrecord
+bin/irsend
+bin/irw
+${PLIST.x11}bin/irxevent
+bin/lircrcd
+bin/mode2
+bin/pronto2lirc
+${PLIST.x11}bin/xmode2
+include/lirc/lirc_client.h
+lib/liblirc_client.la
+man/man1/ircat.1
+man/man1/irexec.1
+man/man1/irpty.1
+man/man1/irrecord.1
+man/man1/irsend.1
+man/man1/irw.1
+man/man1/irxevent.1
+man/man1/lircrcd.1
+man/man1/mode2.1
+man/man1/smode2.1
+man/man1/xmode2.1
+man/man8/lircd.8
+man/man8/lircmd.8
+sbin/lircd
+sbin/lircmd
+share/examples/lirc/lircd.conf
+share/examples/lirc/lircmd.conf
+share/examples/rc.d/lircd
diff --git a/comms/lirc/available.mk b/comms/lirc/available.mk
new file mode 100644
index 00000000000..b36d39295c6
--- /dev/null
+++ b/comms/lirc/available.mk
@@ -0,0 +1,13 @@
+# $NetBSD: available.mk,v 1.1 2012/12/02 01:21:50 cheusov Exp $
+
+.include "../../mk/bsd.prefs.mk"
+
+# At the moment LIRC is available only for Linux. The following
+# condition is here to NOT repeat supported platforms in multiple
+# places, i.e. mplayer, xine, xbmc etc.
+# Also, have a look at buildlink3.mk.
+.if ${OPSYS} == "Linux"
+LIRC_AVAILABLE= yes
+.else
+LIRC_AVAILABLE= no
+.endif
diff --git a/comms/lirc/buildlink3.mk b/comms/lirc/buildlink3.mk
new file mode 100644
index 00000000000..81a90b81539
--- /dev/null
+++ b/comms/lirc/buildlink3.mk
@@ -0,0 +1,17 @@
+# $NetBSD: buildlink3.mk,v 1.1 2012/12/02 01:21:51 cheusov Exp $
+
+# Check whether LIRC is available on this platform
+.include "available.mk"
+.if ${LIRC_AVAILABLE} == "yes"
+
+BUILDLINK_TREE+= lirc
+
+. if !defined(LIRC_BUILDLINK3_MK)
+LIRC_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.lirc+= lirc>=0.8.0
+BUILDLINK_PKGSRCDIR.lirc?= ../../comms/lirc
+. endif # LIRC_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -lirc
+.endif # LIRC_AVAILABLE
diff --git a/comms/lirc/distinfo b/comms/lirc/distinfo
new file mode 100644
index 00000000000..9ea2cc41492
--- /dev/null
+++ b/comms/lirc/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2012/12/02 01:21:51 cheusov Exp $
+
+SHA1 (lirc-0.9.0.tar.bz2) = 8456bf7101d4f2d31d61c5073357a4981b458581
+RMD160 (lirc-0.9.0.tar.bz2) = d8f1cf3a03573be36787e87adc71beba3e678a37
+Size (lirc-0.9.0.tar.bz2) = 857286 bytes
diff --git a/comms/lirc/files/lircd.sh b/comms/lirc/files/lircd.sh
new file mode 100644
index 00000000000..08ccb33bae8
--- /dev/null
+++ b/comms/lirc/files/lircd.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: lircd.sh,v 1.1 2012/12/02 01:21:51 cheusov Exp $
+#
+# PROVIDE: lircd
+# REQUIRE: LOGIN
+
+. /etc/rc.subr
+
+name="lircd"
+lircd_flags=${lircd_flags--H default -d /dev/lirc0}
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/lirc/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/lircd.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/comms/lirc/options.mk b/comms/lirc/options.mk
new file mode 100644
index 00000000000..fe41bff2a4c
--- /dev/null
+++ b/comms/lirc/options.mk
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.1 2012/12/02 01:21:51 cheusov Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.lirc
+PKG_SUPPORTED_OPTIONS= x11
+PKG_SUGGESTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= x11
+
+.if !empty(PKG_OPTIONS:Mx11)
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libSM/buildlink3.mk"
+PLIST.x11= yes
+.else
+CONFIGURE_ARGS+= --without-x
+.endif