Skip to content

Commit

Permalink
app-misc/lirc-0.9.4a-r2: cleanup old ebuild, init script improvements…
Browse files Browse the repository at this point in the history
…, remove la files, don't set docdir unnecessarily (EAPI 6 does that automatically)

Gentoo-bug: 454466, 353774
Closes: gentoo#1988

Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
candrews authored and SoapGentoo committed Aug 2, 2016
1 parent 6ccd971 commit c43a8b3
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 135 deletions.
1 change: 0 additions & 1 deletion app-misc/lirc/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
DIST lirc-0.9.0.tar.bz2 857286 SHA256 6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff SHA512 e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431 WHIRLPOOL 0a1c00b07898aa7a5d78865fb73c6d26c6331dd0a4945773a801d29e40298b365eb58cae113a95fcf73be678a24ac082ad0868e8051303d732882fb82a859a7b
DIST lirc-0.9.4.tar.bz2 2291164 SHA256 dd18a6751674fd61e4a96eebc3b9e5c883389d6230811943513443522dfc5dd0 SHA512 0220cfa0e1900691eed3d6b0624c27e0a99825cd60303304eee7c60e3ae1d8e939d05d32680da64cdbf764919708888ce05803e9ab2423f4bf019b4acd8542f1 WHIRLPOOL 83390295e55445f2d10372e1515b0163d5b3b1e9903f132e018d975d66998d98ffee1caaa1fe26577a0ce18fce20ec025fd5cc0aaf5074728269b12e84d55268
DIST lirc-0.9.4a.tar.bz2 2292119 SHA256 386086a74c7d12e7e8f26f7dbc8f40d20b9968c9ad2a42599483a51dd2da03ba SHA512 16be0ac5dd9b07d717ceba63cdc38c0db4a2bdcfc373ca6346d7cd4ab2cd2973aa7585d10b045fcaea952a3aabf7617c564ccb8268db6c62b172683a4b2cc188 WHIRLPOOL 93431c43d2dd31081e97113e2d49134de7feb29be53508900b3360408f7a099becf169fcebd0f6fc196280c594dc83d1299617ee54b65452828492db9bcd09ad
28 changes: 28 additions & 0 deletions app-misc/lirc/files/irexec-initd-0.9.4a-r2
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/sbin/openrc-run
# Copyright 2003 Martin Hierling <[email protected]>
# Distributed under the terms of the GNU General Public License v2
# $Id$

: ${IREXEC_USER:=root}

depend() {
need lircd
}

start() {
if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
ewarn "Warning: Running irexec as root can open security holes"
fi

ebegin "Starting irexec"
start-stop-daemon --start --user ${IREXEC_USER} --chdir / \
--exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
eend $? "Failed to start irexec."
}

stop() {
ebegin "Stopping irexec"
start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
eend $? "Failed to stop irexec."
}

20 changes: 20 additions & 0 deletions app-misc/lirc/files/lircmd-0.9.4a-r2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

depend() {
need lircd
}

start() {
ebegin "Starting lircmd"
start-stop-daemon --start --quiet --exec /usr/sbin/lircmd -- ${LIRCMD_OPTS}
eend $?
}

stop() {
ebegin "Stopping lircmd"
start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
eend $?
}
4 changes: 4 additions & 0 deletions app-misc/lirc/files/lircmd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Options to pass to the lircmd process

LIRCMD_OPTS="--uinput"

125 changes: 0 additions & 125 deletions app-misc/lirc/lirc-0.9.4.ebuild

This file was deleted.

8 changes: 8 additions & 0 deletions app-misc/lirc/lirc-0.9.4a-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ src_configure() {
$(use_with X x)
}

# Defined src_compile as a workaround for a parallel make issue
# See https://bugs.gentoo.org/show_bug.cgi?id=588864
# and https://sourceforge.net/p/lirc/tickets/210/
src_compile() {
emake lib
emake
}

src_install() {
default

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ RDEPEND="
usb? ( virtual/libusb:0 )
"

PATCHES=(
"${FILESDIR}"/lirc-0.9.4-doc-path-fix.patch # https://bugs.gentoo.org/show_bug.cgi?id=589246 https://sourceforge.net/p/lirc/tickets/214/
)

src_configure() {
filter-flags -Wl,-O1
econf \
--localstatedir=/var \
$(use_enable static-libs static) \
$(use_with X x)
}
Expand All @@ -70,27 +75,26 @@ src_install() {
default

newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd
newinitd "${FILESDIR}"/lircmd lircmd
newinitd "${FILESDIR}"/lircmd-0.9.4a-r2 lircmd
newconfd "${FILESDIR}"/lircd.conf.4 lircd
newconfd "${FILESDIR}"/lircmd.conf lircmd

insinto /etc/modprobe.d/
newins "${FILESDIR}"/modprobed.lirc lirc.conf

newinitd "${FILESDIR}"/irexec-initd irexec
newinitd "${FILESDIR}"/irexec-initd-0.9.4a-r2 irexec
newconfd "${FILESDIR}"/irexec-confd irexec

if use doc ; then
dodoc -r doc/html
fi

keepdir /etc/lirc
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
fi

if ! use static-libs; then
rm "${D}/usr/$(get_libdir)/liblirc_client.la" || die
fi
find "${D}" -name '*.la' -delete || die

# Avoid QA notice
rm -d "${D}"/var/run/lirc || die
rm -d "${D}"/var/run || die
}

pkg_preinst() {
Expand Down

0 comments on commit c43a8b3

Please sign in to comment.