wok-current view libv4l/receipt @ rev 25728

Merge wok for both arch and few updates
author Stanislas Leduc <shann@slitaz.org>
date Thu Dec 05 08:39:45 2024 +0000 (5 weeks ago)
parents 3ad63c8fc2f9
children
line source
1 # SliTaz package receipt.
3 PACKAGE="libv4l"
4 VERSION="1.22.1"
5 CATEGORY="multimedia"
6 MAINTAINER="jozee@slitaz.org"
7 LICENSE="GPL2"
8 SHORT_DESC="Userspace library for Video 4 Linux (1 and 2)"
9 WEB_SITE="https://web.archive.org/web/20220625040039/http://freshmeat.sourceforge.net/projects/libv4l"
10 SOURCE="v4l-utils"
11 TARBALL="$SOURCE-$VERSION.tar.bz2"
12 WGET_URL="https://linuxtv.org/downloads/v4l-utils/$TARBALL"
13 TAGS="webcam video"
15 DEPENDS="libjpeg"
16 BUILD_DEPENDS="jpeg-dev"
18 HOST_ARCH="i486 x86_64"
20 # What is the latest version available today?
21 current_version()
22 {
23 wget -O - ${WGET_URL%/*} 2>/dev/null | \
24 sed "/latest/d;/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 sed -i 's|jpeg_mem|_&|' lib/libv4lconvert/jpeg_memsrcdest.h
31 ./configure \
32 --prefix=/usr \
33 --sysconfdir=/etc \
34 --libdir=/usr/lib \
35 $CONFIGURE_ARGS &&
36 make &&
37 make install PREFIX="/usr" DESTDIR="$DESTDIR"
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/usr/lib
44 cp -a $install/usr/lib/*so* $fs/usr/lib/
45 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib
47 # Ensure remove .la files
48 find $fs -name "*.la" -delete
49 }
51 post_install()
52 {
53 lib='/usr/lib/libv4l/v4l1compat.so'
54 if [ -e "$1$lib" ]; then
55 grep -q "^export LD_PRELOAD=$lib$" "$1/etc/profile" ||
56 echo "export LD_PRELOAD=$lib" >> "$1/etc/profile"
57 fi
58 }
60 post_remove()
61 {
62 sed -i '/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/d' "$1/etc/profile"
63 }