summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2009-05-09 18:21:03 +0000
committerChristian Ruppert <idl0r@gentoo.org>2009-05-09 18:21:03 +0000
commit5394eb5d291471fa31aeb943babd62ea5927d74c (patch)
tree68691a4d1cada02b6457575362ef97a3d94d6c0f /app-misc/heyu/heyu-2.6.0.ebuild
parentDrop message about kanyremote (diff)
downloadsunrise-5394eb5d291471fa31aeb943babd62ea5927d74c.tar.gz
sunrise-5394eb5d291471fa31aeb943babd62ea5927d74c.tar.bz2
sunrise-5394eb5d291471fa31aeb943babd62ea5927d74c.zip
Use EPI 2. Use src_configure instead of src_compile. sed and domanimproved, readability.
(Portage version: 2.2_rc33/svn/Linux x86_64) svn path=/sunrise/; revision=8507
Diffstat (limited to 'app-misc/heyu/heyu-2.6.0.ebuild')
-rw-r--r--app-misc/heyu/heyu-2.6.0.ebuild59
1 files changed, 33 insertions, 26 deletions
diff --git a/app-misc/heyu/heyu-2.6.0.ebuild b/app-misc/heyu/heyu-2.6.0.ebuild
index baf28b499..a6ea970e7 100644
--- a/app-misc/heyu/heyu-2.6.0.ebuild
+++ b/app-misc/heyu/heyu-2.6.0.ebuild
@@ -2,9 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+EAPI="2"
+
inherit eutils toolchain-funcs
-DESCRIPTION="Utility to control and program CM11A, CM17A and CM12U X10 interfaces."
+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"
@@ -18,41 +20,46 @@ pkg_setup() {
enewuser ${PN} -1 -1 /var/lib/${PN} "${PN},uucp"
}
-src_compile() {
+src_configure() {
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") \
+ ./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"
+
+ sed -i -r -e "s/CC\s*=.*/CC = $(tc-getCC)/" \
+ -e "s/CFLAGS\s*=.*/CFLAGS = ${CFLAGS} \$(DFLAGS)/" \
+ -e 's%^(DFLAGS.+)-DSYSBASEDIR=\\"[^\]+\\"%\1%' \
+ -e 's%^(DFLAGS\s*=\s*)%\1-DSYSBASEDIR=\\"/var/lib/heyu\\" %' \
+ -e 's%^(DFLAGS.+)-DSPOOLDIR=\\"[^\]+\\"%\1%' \
+ -e 's%^(DFLAGS\s*=\s*)%\1-DSPOOLDIR=\\"/var/lib/heyu\\" %' \
+ -e 's%^(DFLAGS.+)-DLOCKDIR=\\"[^\]+\\"%\1%' \
+ -e 's%^(DFLAGS\s*=\s*)%\1-DLOCKDIR=\\"/var/lock\\" %' Makefile \
+ || die "adjusting Makefile failed"
+
+ sed -i -r 's%(LOG_DIR.*?)NONE%\1/var/log/heyu%' x10.conf.sample || die "changing LOG_DIR failed"
}
src_install() {
dobin heyu || die "installing binary failed"
- doman heyu.1 x10config.5 x10scripts.5 x10sched.5 || die "installing man pages failed"
- newinitd "${FILESDIR}"/heyu.init heyu
+ doman heyu.1 x10{config,scripts,sched}.5 || die "installing man pages failed"
+ newinitd "${FILESDIR}"/heyu.init heyu || die "newinitd failed"
+
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
+
+ dosym /etc/heyu/x10.conf /var/lib/heyu/x10.conf || die "dosym failed"
+ dosym /etc/heyu/x10.sched /var/lib/heyu/x10.sched || die "dosym failed"
}
pkg_postinst() {