wok-current view lirc64/receipt @ rev 24411

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 09 17:57:59 2022 +0000 (2022-02-09)
parents f1020832b94b
children
line source
1 # SliTaz package receipt.
3 PACKAGE="lirc64"
4 SOURCE="lirc"
5 VERSION="0.9.0"
6 CATEGORY="utilities"
7 SHORT_DESC="Enables decoding and sending signals of many commonly used remote controls."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="https://www.lirc.org/"
12 WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL"
13 PROVIDE="lirc:linux64"
15 DEPENDS="glibc-base libusb libusb-compat libftdi xorg-libXau libirman \
16 portaudio alsa-lib util-linux-uuid lirc-bin"
17 BUILD_DEPENDS="linux64-module-headers python libusb-dev libirman-dev \
18 portaudio-dev alsa-lib-dev libusb-compat-dev util-linux-uuid-dev \
19 libftdi-dev jack-audio-connection-kit-dev uclibc-cross-compiler-x86_64"
21 # Aufs enable chroot
22 AUFS_NOT_RAMFS="uclibc-cross-compiler-x86_64 is not compatible with aufs+tmpfs 8("
24 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - https://sourceforge.net/projects/lirc/files/LIRC/ 2>/dev/null | \
28 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
29 sed '/scope="row/!d;s|.*/LIRC/||;s|/.*||;q'
30 }
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 sed -i 's|__devexit ||;s|__devinit ||' \
36 drivers/lirc_serial/lirc_serial.c drivers/lirc_sir/lirc_sir.c
37 sed -i 's|#include <asm/system.h>|#define __devexit_p(x) x|' \
38 drivers/lirc_serial/lirc_serial.c drivers/lirc_sir/lirc_sir.c
40 sed -i '/smp_lock.h/d' drivers/lirc_atiusb/lirc_atiusb.c
41 sed -i 's|err(|printk(KERN_ERR|' drivers/*/*.c
43 # Up through at least lirc 0.8.5, lirc_gpio doesn't build with kernel 2.6.22+
44 #echo "Disabling build of drivers/lirc_gpio due to kernel incompatibility"
45 #sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am
46 #sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.in
48 # lirc_parallel is not SMP safe
49 echo "Disabling build of drivers/lirc_parallel due to SMP incompatibility"
50 sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.am
51 sed -i -e "s:lirc_parallel\.o::" drivers/lirc_parallel/Makefile.in
53 echo "Disabling build of drivers/lirc_i2c due to kernel 2.6.38+ incompatibility"
54 sed -i -e "s:lirc_i2c\.o::" drivers/lirc_i2c/Makefile.am
55 sed -i -e "s:lirc_i2c\.o::" drivers/lirc_i2c/Makefile.in
57 echo "Disabling build of drivers/lirc_wpc8769l due to kernel incompatibility"
58 sed -i -e "s:lirc_wpc8769l\.o::" drivers/lirc_wpc8769l/Makefile.am
59 sed -i -e "s:lirc_wpc8769l\.o::" drivers/lirc_wpc8769l/Makefile.in
61 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
62 sed -i "s/uname -r/echo $KERNEL_VERSION-slitaz64/g" configure
64 ./configure \
65 --prefix=/usr \
66 --with-x \
67 --with-driver=all \
68 --with-kerneldir=/usr/src/linux \
69 --with-moduledir=/lib/modules/$KERNEL_VERSION-slitaz/kernel/misc \
70 $CONFIGURE_ARGS &&
71 make 2>&1 | sed 's/ERROR/Error/;/lirc_dev\/Module/d' &&
72 make DESTDIR=$DESTDIR install 2>&1 | sed '/depmod:/d'
73 }
75 # Rules to gen a SliTaz package suitable for Tazpkg.
76 genpkg_rules()
77 {
78 cp -a $install/dev $fs
79 cp -a $install/lib $fs
80 }
82 # Post install/remove commands for Tazpkg.
83 post_install()
84 {
85 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
86 }
88 post_remove()
89 {
90 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz64
91 }