summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Schwyn (svoop) <gentoo@bitcetera.com>2009-02-15 15:16:27 +0000
committerSven Schwyn (svoop) <gentoo@bitcetera.com>2009-02-15 15:16:27 +0000
commit9ddff809333f05403aa96ce9df7d93303758b142 (patch)
treef29d8adfe29f627847f276463f827d05c7b769d0 /app-misc/heyu/heyu-2.5.0.ebuild
parentapp-office/openoffice-infra: Some additional fixes for openoffice-infra-2.4.2 (diff)
downloadsunrise-9ddff809333f05403aa96ce9df7d93303758b142.tar.gz
sunrise-9ddff809333f05403aa96ce9df7d93303758b142.tar.bz2
sunrise-9ddff809333f05403aa96ce9df7d93303758b142.zip
app-misc/heyu: Version bump and various - including security relevant - improvements, thanks to Tommy.
svn path=/sunrise/; revision=7928
Diffstat (limited to 'app-misc/heyu/heyu-2.5.0.ebuild')
-rw-r--r--app-misc/heyu/heyu-2.5.0.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/app-misc/heyu/heyu-2.5.0.ebuild b/app-misc/heyu/heyu-2.5.0.ebuild
new file mode 100644
index 000000000..2b16b78aa
--- /dev/null
+++ b/app-misc/heyu/heyu-2.5.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Utility to control and program CM11A, CM17A and CM12U X10 interfaces."
+HOMEPAGE="http://heyu.tanj.com"
+SRC_URI="http://heyu.tanj.com/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="kernel_Darwin kernel_FreeBSD kernel_linux cm17a dmx210 ext0 ore rfxm rfxs"
+
+DEPEND=""
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} "${PN},uucp"
+}
+
+src_compile() {
+ mv x10config.sample x10.conf.sample
+ "${S}"/Configure \
+ $(use kernel_FreeBSD && echo "freebsd") \
+ $(use kernel_Darwin && echo "darwin") \
+ $(use kernel_linux && echo "linux") \
+ $(use cm17a || echo "-nocm17a") \
+ $(use dmx210 || echo "-nodmx") \
+ $(use ext0 || echo "-noext0") \
+ $(use ore || echo "-noore") \
+ $(use rfxm || echo "-norfxm") \
+ $(use rfxs || echo "-norfxs") \
+ || die "configure failed"
+ sed -i "s/CC\s*=.*/CC = $(tc-getCC)/" "${S}"/Makefile || die "adjustment of CC failed"
+ sed -i "s/CFLAGS\s*=.*/CFLAGS = ${CFLAGS} \$(DFLAGS)/" "${S}"/Makefile || die "adjustment of CFLAGS failed"
+ sed -i -r 's%^(DFLAGS.+)-DSYSBASEDIR=\\"[^\]+\\"%\1%' "${S}"/Makefile || die "removing DSYSBASEDIR from DFLAGS failed"
+ sed -i -r 's%^(DFLAGS\s*=\s*)%\1-DSYSBASEDIR=\\"/var/lib/heyu\\" %' "${S}"/Makefile || die "adding DSYSBASEDIR to DFLAGS failed"
+ sed -i -r 's%^(DFLAGS.+)-DSPOOLDIR=\\"[^\]+\\"%\1%' "${S}"/Makefile || die "removing DSPOOLDIR from DFLAGS failed"
+ sed -i -r 's%^(DFLAGS\s*=\s*)%\1-DSPOOLDIR=\\"/var/lib/heyu\\" %' "${S}"/Makefile || die "adding DSPOOLDIR to DFLAGS failed"
+ sed -i -r 's%^(DFLAGS.+)-DLOCKDIR=\\"[^\]+\\"%\1%' "${S}"/Makefile || die "removing DLOCKDIR from DFLAGS failed"
+ sed -i -r 's%^(DFLAGS\s*=\s*)%\1-DLOCKDIR=\\"/var/lock\\" %' "${S}"/Makefile || die "adding DLOCKDIR to DFLAGS failed"
+ sed -i -r 's%(LOG_DIR.*?)NONE%\1/var/log/heyu%' "${S}"/x10.conf.sample || die "changing LOG_DIR failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ dobin heyu || die "installing binary failed"
+ doman heyu.1 x10config.5 x10scripts.5 x10sched.5
+ newinitd "${FILESDIR}"/${PV}/heyu.init heyu
+ insinto /etc/heyu
+ doins x10.*.sample || die "installing config samples failed"
+ diropts -m 0750 -o heyu
+ dodir /var/log/heyu || die "creating log directory failed"
+ dosym /etc/heyu/x10.conf /var/lib/heyu/x10.conf
+ dosym /etc/heyu/x10.sched /var/lib/heyu/x10.sched
+}
+
+pkg_postinst() {
+ elog "Don't forget to tell heyu where to find your CM11 or CM17. Therefore"
+ elog "the file /etc/heyu/x10.conf must contain a line starting with 'TTY'"
+ elog "followed by the corresponding device such as:"
+ elog
+ elog "TTY /dev/ttyS0 <-- on first serial port"
+ elog "TTY /dev/ttyS1 <-- on second serial port"
+ elog "TTY /dev/ttyUSB0 <-- on USB port"
+ elog
+ elog "To use your device on a USB port, the corresponding USB serial converter"
+ elog "kernel module must be loaded. Older CM11 are usually delivered with a"
+ elog "a Prolific 2303 cable (kernel module: pl2303) while newer come with a"
+ elog "FTDI cable (kernel module: ftdi_sio)."
+ elog
+ elog "Execute the following command if you wish to start the HEYU daemon"
+ elog "at boot time:"
+ elog
+ elog "rc-update add heyu default"
+}