Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add in a lirc 0.9.0 ebuild, userspace drivers only

  • Loading branch information...
commit 21525f213bd77f4b6b57f097fb4de169e1f844f8 1 parent 7305d4e
Rob Smith authored
Showing with 173 additions and 0 deletions.
  1. +2 −0  app-misc/lirc/Manifest
  2. +171 −0 app-misc/lirc/lirc-0.9.0.ebuild
2  app-misc/lirc/Manifest
View
@@ -23,5 +23,7 @@ AUX usb_buffer.patch 1156 RMD160 16e1fce51ad4a2238f0b6660cb90766da2f808fe SHA1 e
AUX xbox-lircd.conf 784 RMD160 844b08d504f5afb996f900d3d225cc855fbf4884 SHA1 65c3b9c295bc8ab8f80077dd3a40b599d1a60ce3 SHA256 03979bd658ed4a5705c358a1278b1565dd10463ab6eb14fa8d25b3d98e645008
DIST lirc-0.8.7pre1.tar.bz2 792651 RMD160 67c27459634fc07e5e6a3c31b4e7f412ea9cc512 SHA1 424bcfcc50378bb34876667e71bd2d8513d228d7 SHA256 5fd79d83e1de6d64dea809a5877738609c124ee68a639f3165bdd246b3ffb4be
DIST lirc-0.9.0-pre1.tar.bz2 837920 RMD160 02366e018c76914aae3672d1bfd3723a831a0d73 SHA1 fac03b06a1b3476e24d2bbc70b96059ccda5d7e3 SHA256 6724514d76077cc087bd4e12d880744442223e7e4ecfd0aa515c1610bc13b5f1
+DIST lirc-0.9.0.tar.bz2 857286 RMD160 d8f1cf3a03573be36787e87adc71beba3e678a37 SHA1 8456bf7101d4f2d31d61c5073357a4981b458581 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff
EBUILD lirc-0.8.7_pre1.ebuild 10144 RMD160 45b17e68e0a5e33eec2506b93f61b764355d6379 SHA1 3c99647163821ba20d737663c4a62beffbc7ec37 SHA256 4fa56dd0e32645f6d8137959ce357e3d77d55d141cc1bb5127a9ae965c04a207
+EBUILD lirc-0.9.0.ebuild 4181 RMD160 9ff25f56f5c2b998362a07a809bac7ac5842ebe4 SHA1 a4b3a8e6bb1c506dac0e4c54817378c1da90017f SHA256 9a069ee57c700f66aafde423652815fe4212dfb28df6c9623753d355ce17dca9
EBUILD lirc-0.9.0_pre1.ebuild 10146 RMD160 4089c706664d820285cbec1cc7d0c6d913785b70 SHA1 dbcc8e7c037b15061d5c8f18339c8d4096933b8d SHA256 b97fe0c8b917ffe22d998d60b6053d4e6c773b2860b69aaa64acff2b2c6dcda6
171 app-misc/lirc/lirc-0.9.0.ebuild
View
@@ -0,0 +1,171 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.7_pre1.ebuild,v 1.1 2010/05/21 02:47:00 beandog Exp $
+
+inherit eutils linux-mod flag-o-matic autotools
+
+DESCRIPTION="decode and send infra-red signals of many commonly used remote controls"
+HOMEPAGE="http://www.lirc.org/"
+
+MY_P=${PN}-${PV/_/-}
+
+if [[ "${PV/_pre/}" = "${PV}" ]]; then
+ SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2"
+else
+ SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="debug doc X hardware-carrier transmitter"
+
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libICE
+ )
+ "
+
+# adding only compile-time depends
+DEPEND="${RDEPEND} ${DEPEND}
+ virtual/linux-sources
+ "
+
+# adding only run-time depends
+RDEPEND="${RDEPEND}
+ "
+
+pkg_setup() {
+
+ ewarn "If your LIRC device requires modules, you'll need MODULE_UNLOAD"
+ ewarn "support in your kernel."
+
+ linux-mod_pkg_setup
+
+ # set default configure options
+ MY_OPTS=""
+ LIRC_DRIVER_DEVICE="/dev/lirc0"
+
+ MY_OPTS="--with-driver=userspace"
+
+ use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier"
+ use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter"
+
+ # Setup parameter for linux-mod.eclass
+ MODULE_NAMES="lirc(misc:${S})"
+ BUILD_TARGETS="all"
+
+ ECONF_PARAMS=" --localstatedir=/var
+ --with-syslog=LOG_DAEMON
+ --enable-sandboxed
+ --with-kerneldir=${KV_DIR}
+ --with-moduledir=/lib/modules/${KV_FULL}/misc
+ $(use_enable debug)
+ $(use_with X x)
+ ${MY_OPTS}"
+
+ einfo
+ einfo "lirc-configure-opts: ${MY_OPTS}"
+ elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}"
+
+ filter-flags -Wl,-O1
+
+ # force non-parallel make, Bug 196134
+ #MAKEOPTS="${MAKEOPTS} -j1"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Rip out dos CRLF
+ edos2unix contrib/lirc.rules
+
+ # respect CFLAGS
+ sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac
+
+ # setting default device-node
+ local f
+ for f in configure.ac acconfig.h; do
+ [[ -f "$f" ]] && sed -i -e '/#define LIRC_DRIVER_DEVICE/d' "$f"
+ done
+ echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h
+
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}"/lircd-0.8.6 lircd
+ newinitd "${FILESDIR}"/lircmd lircmd
+ newconfd "${FILESDIR}"/lircd.conf.2 lircd
+
+ insinto /etc/modprobe.d/
+ newins "${FILESDIR}"/modprobed.lirc lirc.conf
+
+ newinitd "${FILESDIR}"/irexec-initd-0.8.6-r2 irexec
+ newconfd "${FILESDIR}"/irexec-confd irexec
+
+ if use doc ; then
+ dohtml doc/html/*.html
+ insinto /usr/share/doc/${PF}/images
+ doins doc/images/*
+ fi
+
+ insinto /usr/share/lirc/remotes
+ doins -r remotes/*
+
+ keepdir /var/run/lirc /etc/lirc
+ if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+ newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
+ fi
+}
+
+pkg_preinst() {
+ linux-mod_pkg_preinst
+
+ local dir="${ROOT}/etc/modprobe.d"
+ if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then
+ elog "Renaming ${dir}/lirc to lirc.conf"
+ mv -f "${dir}/lirc" "${dir}/lirc.conf"
+ fi
+
+ # copy the first file that can be found
+ if [[ -f "${ROOT}"/etc/lirc/lircd.conf ]]; then
+ cp "${ROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+ elif [[ -f "${ROOT}"/etc/lircd.conf ]]; then
+ cp "${ROOT}"/etc/lircd.conf "${T}"/lircd.conf
+ MOVE_OLD_LIRCD_CONF=1
+ elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then
+ cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+ fi
+
+ # stop portage from touching the config file
+ if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+ rm -f "${D}"/etc/lirc/lircd.conf
+ fi
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ # copy config file to new location
+ # without portage knowing about it
+ # so it will not delete it on unmerge or ever touch it again
+ if [[ -e "${T}"/lircd.conf ]]; then
+ cp "${T}"/lircd.conf "${ROOT}"/etc/lirc/lircd.conf
+ if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then
+ elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf"
+ rm -f "${ROOT}"/etc/lircd.conf
+ fi
+ fi
+
+ ewarn "The new default location for lircd.conf is inside of"
+ ewarn "/etc/lirc/ directory"
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.