1 |
pacho 14/01/03 11:13:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: lirc-0.9.0-r5.ebuild |
5 |
Log: |
6 |
Add unit files (#496852 by Lucian Muresan) |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.246 app-misc/lirc/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.246&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.246&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/ChangeLog?r1=1.245&r2=1.246 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v |
20 |
retrieving revision 1.245 |
21 |
retrieving revision 1.246 |
22 |
diff -u -r1.245 -r1.246 |
23 |
--- ChangeLog 6 Oct 2013 14:43:06 -0000 1.245 |
24 |
+++ ChangeLog 3 Jan 2014 11:13:40 -0000 1.246 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for app-misc/lirc |
27 |
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.245 2013/10/06 14:43:06 zzam Exp $ |
29 |
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.246 2014/01/03 11:13:40 pacho Exp $ |
31 |
+ |
32 |
+*lirc-0.9.0-r5 (03 Jan 2014) |
33 |
+ |
34 |
+ 03 Jan 2014; Pacho Ramos <pacho@g.o> +files/irexec.service, |
35 |
+ +files/lirc.service, +files/lircm.service, +lirc-0.9.0-r5.ebuild: |
36 |
+ Add unit files (#496852 by Lucian Muresan) |
37 |
|
38 |
*lirc-0.9.0-r4 (06 Oct 2013) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 app-misc/lirc/lirc-0.9.0-r5.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r5.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/lirc/lirc-0.9.0-r5.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: lirc-0.9.0-r5.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2014 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.9.0-r5.ebuild,v 1.1 2014/01/03 11:13:40 pacho Exp $ |
53 |
|
54 |
EAPI=4 |
55 |
|
56 |
inherit eutils linux-mod linux-info systemd toolchain-funcs flag-o-matic autotools |
57 |
|
58 |
DESCRIPTION="decode and send infra-red signals of many commonly used remote controls" |
59 |
HOMEPAGE="http://www.lirc.org/" |
60 |
|
61 |
MY_P=${PN}-${PV/_/} |
62 |
|
63 |
if [[ "${PV/_pre/}" = "${PV}" ]]; then |
64 |
SRC_URI="mirror://sourceforge/lirc/${MY_P}.tar.bz2" |
65 |
else |
66 |
SRC_URI="http://www.lirc.org/software/snapshots/${MY_P}.tar.bz2" |
67 |
fi |
68 |
|
69 |
LICENSE="GPL-2" |
70 |
SLOT="0" |
71 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
72 |
IUSE="debug doc hardware-carrier transmitter static-libs X" |
73 |
|
74 |
S="${WORKDIR}/${MY_P}" |
75 |
|
76 |
RDEPEND=" |
77 |
X? ( |
78 |
x11-libs/libX11 |
79 |
x11-libs/libSM |
80 |
x11-libs/libICE |
81 |
) |
82 |
lirc_devices_alsa_usb? ( media-libs/alsa-lib ) |
83 |
lirc_devices_audio? ( >media-libs/portaudio-18 ) |
84 |
lirc_devices_irman? ( media-libs/libirman )" |
85 |
|
86 |
# 2012-07-17, Ian Stakenvicius |
87 |
# A helper script that scrapes out values for nearly all of the variables below |
88 |
# from lirc's configure.ac is available at |
89 |
# http://dev.gentoo.org/~axs/helper-for-lirc-iuse.sh |
90 |
|
91 |
# This are drivers with names matching the |
92 |
# parameter --with-driver=NAME |
93 |
IUSE_LIRC_DEVICES_DIRECT=" |
94 |
all userspace accent act200l act220l |
95 |
adaptec alsa_usb animax asusdh atilibusb |
96 |
atiusb audio audio_alsa avermedia avermedia_vdomate |
97 |
avermedia98 awlibusb bestbuy bestbuy2 breakoutbox |
98 |
bte bw6130 caraca chronos commandir |
99 |
cph06x creative creative_infracd |
100 |
devinput digimatrix dsp dvico ea65 ene0100 |
101 |
exaudio flyvideo ftdi gvbctv5pci hauppauge |
102 |
hauppauge_dvb hercules_smarttv_stereo i2cuser |
103 |
igorplugusb iguanaIR imon imon_24g imon_knob |
104 |
imon_lcd imon_pad imon_rsc irdeo irdeo_remote |
105 |
irlink irman irreal it87 ite8709 |
106 |
knc_one kworld leadtek_0007 leadtek_0010 |
107 |
leadtek_pvr2000 livedrive_midi |
108 |
livedrive_seq logitech macmini |
109 |
mediafocusI mouseremote |
110 |
mouseremote_ps2 mp3anywhere mplay nslu2 |
111 |
packard_bell parallel pcmak pcmak_usb |
112 |
pctv pixelview_bt878 pixelview_pak |
113 |
pixelview_pro provideo realmagic |
114 |
remotemaster sa1100 samsung sasem sb0540 serial |
115 |
silitek sir slinke streamzap tekram |
116 |
tekram_bt829 tira ttusbir tuxbox tvbox udp uirt2 |
117 |
uirt2_raw usb_uirt_raw usbx wpc8769l zotac" |
118 |
|
119 |
# drivers that need special handling and |
120 |
# must have another name specified for |
121 |
# parameter --with-driver=NAME |
122 |
IUSE_LIRC_DEVICES_SPECIAL=" |
123 |
serial_igor_cesko |
124 |
remote_wonder_plus xboxusb usbirboy inputlirc" |
125 |
|
126 |
IUSE_LIRC_DEVICES="${IUSE_LIRC_DEVICES_DIRECT} ${IUSE_LIRC_DEVICES_SPECIAL}" |
127 |
|
128 |
# The following are lists which are used to provide ewarns on incompatibilities |
129 |
# with the kernel: |
130 |
|
131 |
#drivers that do not build kernel modules |
132 |
NO_KMOD_BUILT_FOR_DEV=" |
133 |
accent bte creative creative_infracd devinput dsp ea65 exaudio |
134 |
ftdi i2cuser irlink irreal livedrive_midi livedrive_seq logitech |
135 |
mediafocusI mouseremote mouseremote_ps2 mp3anywhere mplay mplay2 |
136 |
pcmak pcmak_usb pctv realmagic remotemaster silitek tira tira_raw |
137 |
tuxbox udp uirt2 uirt2_raw usb_uirt_raw usbx" |
138 |
|
139 |
#drivers that build lirc_dev and so will conflict with kernel lirc_dev |
140 |
LIRCDEV_BUILT_FOR_DEV="all |
141 |
act200l act220l adaptec animax atiusb breakoutbox hauppauge |
142 |
hauppauge_dvb hercules_smarttv_stereo igorplugusb imon imon_24g |
143 |
imon_knob imon_lcd imon_pad imon_rsc irdeo irdeo_remote knc_one |
144 |
leadtek_pvr2000 nslu2 packard_bell parallel pixelview_bt878 |
145 |
provideo sa1100 sasem serial sir tekram tekram_bt829 ttusbir |
146 |
tvbox wpc8769l zotac" |
147 |
|
148 |
#lirc_gpio drivers, which cannot be supported on kernel >= 2.6.22 |
149 |
LIRC_GPIO_DEV=" |
150 |
avermedia avermedia98 avermedia_vdomate bestbuy bestbuy2 chronos |
151 |
cph03x cph06x flyvideo gvbctv5pci kworld leadtek_0007 leadtek_0010 |
152 |
pixelview_pak pixelview_pro" |
153 |
|
154 |
#device-driver which use libusb |
155 |
LIBUSB_USED_BY_DEV=" |
156 |
all atilibusb awlibusb sasem igorplugusb imon imon_lcd imon_pad |
157 |
imon_rsc streamzap xboxusb irlink commandir" |
158 |
|
159 |
for dev in ${LIBUSB_USED_BY_DEV}; do |
160 |
DEPEND="${DEPEND} lirc_devices_${dev}? ( virtual/libusb:0 )" |
161 |
done |
162 |
|
163 |
# adding only compile-time depends |
164 |
DEPEND="${RDEPEND} ${DEPEND} |
165 |
virtual/linux-sources |
166 |
lirc_devices_ftdi? ( dev-embedded/libftdi ) |
167 |
lirc_devices_all? ( dev-embedded/libftdi )" |
168 |
|
169 |
# adding only run-time depends |
170 |
RDEPEND="${RDEPEND} |
171 |
lirc_devices_usbirboy? ( app-misc/usbirboy ) |
172 |
lirc_devices_inputlirc? ( app-misc/inputlircd ) |
173 |
lirc_devices_iguanaIR? ( app-misc/iguanaIR )" |
174 |
|
175 |
# add all devices to IUSE |
176 |
# and ensure lirc_devices_all is not set alongside lirc_devices_* |
177 |
REQUIRED_USE="lirc_devices_all? (" |
178 |
for dev in ${IUSE_LIRC_DEVICES}; do |
179 |
IUSE="${IUSE} lirc_devices_${dev}" |
180 |
if [[ "${dev}" != "all" ]]; then |
181 |
REQUIRED_USE="${REQUIRED_USE} !lirc_devices_${dev}" |
182 |
fi |
183 |
done |
184 |
REQUIRED_USE="${REQUIRED_USE} )" |
185 |
|
186 |
add_device() { |
187 |
local dev="${1}" |
188 |
local desc="device ${dev}" |
189 |
if [[ -n "${2}" ]]; then |
190 |
desc="${2}" |
191 |
fi |
192 |
|
193 |
# Bug #187418 |
194 |
if kernel_is ge 2 6 22 && [[ " ${LIRC_GPIO_DEV} " == *" ${dev} "* ]]; then |
195 |
eerror "${desc} uses lirc_gpio which fails with kernel 2.6.22 or above. Not building." |
196 |
eerror "Use 'devinput' instead, or use 'userspace' along with in-kernel drivers" |
197 |
return 0 |
198 |
fi |
199 |
: ${lirc_device_count:=0} |
200 |
((lirc_device_count++)) |
201 |
|
202 |
elog "Compiling support for ${desc}" |
203 |
|
204 |
if [[ " ${LIRCDEV_BUILT_FOR_DEV} " == *" ${dev} "* ]] ; then |
205 |
if linux_chkconfig_present LIRC ; then |
206 |
ewarn "${desc} builds lirc_dev and CONFIG_LIRC is set in the kernel -- this may conflict." |
207 |
fi |
208 |
if ! linux_chkconfig_present MODULE_UNLOAD ; then |
209 |
ewarn "${desc} builds modules and CONFIG_MODULE_UNLOAD is unset in kernel." |
210 |
ewarn "You will need MODULE_UNLOAD support in your kernel." |
211 |
fi |
212 |
fi |
213 |
if [[ " ${NO_KMOD_BUILT_FOR_DEV} " == *" ${dev} "* ]] && ! linux_chkconfig_present IR_LIRC_CODEC ; then |
214 |
ewarn "${desc} builds no kernel module and CONFIG_IR_LIRC_CODEC is unset in kernel." |
215 |
fi |
216 |
|
217 |
if [[ ${lirc_device_count} -eq 2 ]] ; then |
218 |
ewarn |
219 |
ewarn "LIRC_DEVICES has more than one entry." |
220 |
ewarn "When selecting multiple devices for lirc to be supported," |
221 |
ewarn "it can not be guaranteed that the drivers play nice together." |
222 |
ewarn "If this is not intended, then please adjust LIRC_DEVICES" |
223 |
ewarn "and re-emerge." |
224 |
ewarn |
225 |
fi |
226 |
|
227 |
MY_OPTS="${MY_OPTS} --with-driver=${dev}" |
228 |
} |
229 |
|
230 |
pkg_pretend() { |
231 |
if [[ -n "${LIRC_OPTS}" ]] ; then |
232 |
ewarn |
233 |
ewarn "LIRC_OPTS is deprecated from lirc-0.8.0-r1 on." |
234 |
ewarn |
235 |
ewarn "Please use LIRC_DEVICES from now on." |
236 |
ewarn "e.g. LIRC_DEVICES=\"serial sir\"" |
237 |
ewarn |
238 |
ewarn "Flags are now set per use-flags." |
239 |
ewarn "e.g. transmitter, hardware-carrier" |
240 |
|
241 |
local opt |
242 |
local unsupported_opts="" |
243 |
|
244 |
# test for allowed options for LIRC_OPTS |
245 |
for opt in ${LIRC_OPTS}; do |
246 |
case ${opt} in |
247 |
--with-port=*|--with-irq=*|--with-timer=*|--with-tty=*) |
248 |
MY_OPTS="${MY_OPTS} ${opt}" |
249 |
;; |
250 |
*) |
251 |
unsupported_opts="${unsupported_opts} ${opt}" |
252 |
;; |
253 |
esac |
254 |
done |
255 |
if [[ -n ${unsupported_opts} ]]; then |
256 |
eerror "These options are no longer allowed to be set" |
257 |
eerror "with LIRC_OPTS: ${unsupported_opts}" |
258 |
die "LIRC_OPTS is no longer supported, use LIRC_DEVICES." |
259 |
fi |
260 |
fi |
261 |
} |
262 |
|
263 |
pkg_setup() { |
264 |
linux-mod_pkg_setup |
265 |
|
266 |
# set default configure options |
267 |
MY_OPTS="" |
268 |
LIRC_DRIVER_DEVICE="/dev/lirc0" |
269 |
|
270 |
if use lirc_devices_all; then |
271 |
# compile in drivers for a lot of devices |
272 |
add_device all "a lot of devices" |
273 |
else |
274 |
# compile in only requested drivers |
275 |
local dev |
276 |
for dev in ${IUSE_LIRC_DEVICES_DIRECT}; do |
277 |
if use lirc_devices_${dev}; then |
278 |
add_device ${dev} |
279 |
fi |
280 |
done |
281 |
|
282 |
if use lirc_devices_remote_wonder_plus; then |
283 |
add_device atiusb "device Remote Wonder Plus (atiusb-based)" |
284 |
fi |
285 |
|
286 |
if use lirc_devices_serial_igor_cesko; then |
287 |
add_device serial "serial with Igor Cesko design" |
288 |
MY_OPTS="${MY_OPTS} --with-igor" |
289 |
fi |
290 |
|
291 |
if use lirc_devices_imon_pad; then |
292 |
ewarn "The imon_pad driver has incorporated the previous pad2keys patch" |
293 |
ewarn "and removed the pad2keys_active option for the lirc_imon module" |
294 |
ewarn "because it is always active." |
295 |
ewarn "If you have an older imon VFD device, you may need to add the module" |
296 |
ewarn "option display_type=1 to override autodetection and force VFD mode." |
297 |
fi |
298 |
|
299 |
if use lirc_devices_xboxusb; then |
300 |
add_device atiusb "device xboxusb" |
301 |
fi |
302 |
|
303 |
if use lirc_devices_usbirboy; then |
304 |
add_device userspace "device usbirboy" |
305 |
LIRC_DRIVER_DEVICE="/dev/usbirboy" |
306 |
fi |
307 |
|
308 |
if [[ "${MY_OPTS}" == "" ]]; then |
309 |
if [[ "${PROFILE_ARCH}" == "xbox" ]]; then |
310 |
# on xbox: use special driver |
311 |
add_device atiusb "device xboxusb" |
312 |
else |
313 |
# no driver requested |
314 |
elog |
315 |
elog "Compiling only the lirc-applications, but no drivers." |
316 |
elog "Enable drivers with LIRC_DEVICES if you need them." |
317 |
MY_OPTS="--with-driver=none" |
318 |
fi |
319 |
fi |
320 |
fi |
321 |
|
322 |
use hardware-carrier && MY_OPTS="${MY_OPTS} --without-soft-carrier" |
323 |
use transmitter && MY_OPTS="${MY_OPTS} --with-transmitter" |
324 |
|
325 |
einfo |
326 |
einfo "lirc-configure-opts: ${MY_OPTS}" |
327 |
elog "Setting default lirc-device to ${LIRC_DRIVER_DEVICE}" |
328 |
|
329 |
filter-flags -Wl,-O1 |
330 |
} |
331 |
|
332 |
src_prepare() { |
333 |
# Rip out dos CRLF |
334 |
edos2unix contrib/lirc.rules |
335 |
|
336 |
# Apply patches needed for some special device-types |
337 |
use lirc_devices_audio || epatch "${FILESDIR}"/lirc-0.8.4-portaudio_check.patch |
338 |
use lirc_devices_remote_wonder_plus && epatch "${FILESDIR}"/lirc-0.8.3_pre1-remotewonderplus.patch |
339 |
|
340 |
# Apply fixes for kernel-2.6.39 and above |
341 |
epatch "${FILESDIR}"/${P}-kernel-2.6.39-fixes.patch |
342 |
# Slightly massaged upstream patch to fix kfifo issues >=2.6.38 |
343 |
# for bug 377033 |
344 |
epatch "${FILESDIR}"/${P}-atiusb_kfifo.patch |
345 |
# Apply fixes for kernel-3.3 and above (bug 439538) |
346 |
epatch "${FILESDIR}"/${P}-kernel-3.3.0-fixes.patch |
347 |
# Apply fix for missing err() in usb.h for kernel 3.5+ (bug 444736) |
348 |
epatch "${FILESDIR}"/${P}-kernel-3.5-err-fix.patch |
349 |
# Apply fix for missing __devinit __devexit defines in kernel 3.8+ (bug 461532) |
350 |
epatch "${FILESDIR}"/${P}-kernel-3.8-fixes.patch |
351 |
# Add support for zotac remote, bug 342848 |
352 |
epatch "${FILESDIR}"/${P}-add-zotac-support.patch |
353 |
# Use fixed font |
354 |
epatch "${FILESDIR}"/${P}-fixed-font.patch |
355 |
|
356 |
# Do not build drivers from the top-level Makefile |
357 |
sed -i -e 's:\(SUBDIRS =\) drivers\(.*\):\1\2:' Makefile.am |
358 |
|
359 |
# remove parallel driver on SMP systems |
360 |
if linux_chkconfig_present SMP ; then |
361 |
sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am |
362 |
fi |
363 |
|
364 |
# Bug #187418 - only need this part for lirc_devices_all as others die in pkg_setup |
365 |
if use lirc_devices_all && kernel_is ge 2 6 22 ; then |
366 |
ewarn "Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+" |
367 |
sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am |
368 |
fi |
369 |
|
370 |
# respect CFLAGS |
371 |
sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.ac |
372 |
|
373 |
# setting default device-node |
374 |
local f |
375 |
for f in configure.ac acconfig.h; do |
376 |
[[ -f "$f" ]] && sed -i -e '/#define LIRC_DRIVER_DEVICE/d' "$f" |
377 |
done |
378 |
echo "#define LIRC_DRIVER_DEVICE \"${LIRC_DRIVER_DEVICE}\"" >> acconfig.h |
379 |
|
380 |
sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die # automake 1.13 |
381 |
eautoreconf |
382 |
} |
383 |
|
384 |
src_configure() { |
385 |
econf \ |
386 |
--localstatedir=/var \ |
387 |
--with-syslog=LOG_DAEMON \ |
388 |
--enable-sandboxed \ |
389 |
--with-kerneldir="${KV_DIR}" \ |
390 |
--with-moduledir="/lib/modules/${KV_FULL}/misc" \ |
391 |
$(use_enable debug) \ |
392 |
$(use_enable static-libs static) \ |
393 |
$(use_with X x) \ |
394 |
${MY_OPTS} \ |
395 |
ABI="${KERNEL_ABI}" \ |
396 |
ARCH="$(tc-arch-kernel)" |
397 |
} |
398 |
|
399 |
src_compile() { |
400 |
# force non-parallel make, Bug 196134 (confirmed valid for 0.9.0-r2) |
401 |
emake -j1 |
402 |
|
403 |
MODULE_NAMES="lirc(misc:${S}/drivers)" |
404 |
BUILD_TARGETS="all" |
405 |
linux-mod_src_compile |
406 |
} |
407 |
|
408 |
src_install() { |
409 |
emake DESTDIR="${D}" install |
410 |
emake -C drivers DESTDIR="${D}" install |
411 |
|
412 |
newinitd "${FILESDIR}"/lircd-0.8.6-r2 lircd |
413 |
newinitd "${FILESDIR}"/lircmd lircmd |
414 |
newconfd "${FILESDIR}"/lircd.conf.4 lircd |
415 |
|
416 |
insinto /etc/modprobe.d/ |
417 |
newins "${FILESDIR}"/modprobed.lirc lirc.conf |
418 |
|
419 |
newinitd "${FILESDIR}"/irexec-initd-0.8.6-r2 irexec |
420 |
newconfd "${FILESDIR}"/irexec-confd irexec |
421 |
|
422 |
systemd_dounit "${FILESDIR}"/irexec.service |
423 |
systemd_dounit "${FILESDIR}"/lirc.service |
424 |
systemd_dounit "${FILESDIR}"/lircm.service |
425 |
|
426 |
if use doc ; then |
427 |
dohtml doc/html/*.html |
428 |
insinto /usr/share/doc/${PF}/images |
429 |
doins doc/images/* |
430 |
fi |
431 |
|
432 |
insinto /usr/share/lirc/remotes |
433 |
doins -r remotes/* |
434 |
|
435 |
keepdir /etc/lirc |
436 |
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
437 |
newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example |
438 |
fi |
439 |
|
440 |
use static-libs || rm "${D}/usr/$(get_libdir)/liblirc_client.la" |
441 |
} |
442 |
|
443 |
pkg_preinst() { |
444 |
linux-mod_pkg_preinst |
445 |
|
446 |
local dir="${EROOT}/etc/modprobe.d" |
447 |
if [[ -a "${dir}"/lirc && ! -a "${dir}"/lirc.conf ]]; then |
448 |
elog "Renaming ${dir}/lirc to lirc.conf" |
449 |
mv -f "${dir}/lirc" "${dir}/lirc.conf" |
450 |
fi |
451 |
|
452 |
# copy the first file that can be found |
453 |
if [[ -f "${EROOT}"/etc/lirc/lircd.conf ]]; then |
454 |
cp "${EROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf |
455 |
elif [[ -f "${EROOT}"/etc/lircd.conf ]]; then |
456 |
cp "${EROOT}"/etc/lircd.conf "${T}"/lircd.conf |
457 |
MOVE_OLD_LIRCD_CONF=1 |
458 |
elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then |
459 |
cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf |
460 |
fi |
461 |
|
462 |
# stop portage from touching the config file |
463 |
if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then |
464 |
rm -f "${D}"/etc/lirc/lircd.conf |
465 |
fi |
466 |
} |
467 |
|
468 |
pkg_postinst() { |
469 |
linux-mod_pkg_postinst |
470 |
|
471 |
# copy config file to new location |
472 |
# without portage knowing about it |
473 |
# so it will not delete it on unmerge or ever touch it again |
474 |
if [[ -e "${T}"/lircd.conf ]]; then |
475 |
cp "${T}"/lircd.conf "${EROOT}"/etc/lirc/lircd.conf |
476 |
if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then |
477 |
elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf" |
478 |
rm -f "${EROOT}"/etc/lircd.conf |
479 |
fi |
480 |
fi |
481 |
|
482 |
einfo "The new default location for lircd.conf is inside of" |
483 |
einfo "/etc/lirc/ directory" |
484 |
} |