wok-current annotate libv4l/receipt @ rev 25418
duat: use archive.org for web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Aug 05 16:48:05 2022 +0000 (2022-08-05) |
parents | bd7510903310 |
children | 3ad63c8fc2f9 |
rev | line source |
---|---|
jozee@4488 | 1 # SliTaz package receipt. |
jozee@4488 | 2 |
jozee@4488 | 3 PACKAGE="libv4l" |
slaxemulator@12329 | 4 VERSION="0.8.5" |
jozee@4488 | 5 CATEGORY="multimedia" |
jozee@4488 | 6 MAINTAINER="jozee@slitaz.org" |
pascal@14718 | 7 LICENSE="GPL2" |
jozee@4488 | 8 SHORT_DESC="Userspace library for Video 4 Linux (1 and 2)" |
pascal@25362 | 9 WEB_SITE="https://web.archive.org/web/20220625040039/http://freshmeat.sourceforge.net/projects/libv4l" |
slaxemulator@6498 | 10 SOURCE="v4l-utils" |
al@18472 | 11 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@24972 | 12 WGET_URL="https://linuxtv.org/downloads/v4l-utils/$TARBALL" |
jozee@4488 | 13 TAGS="webcam video" |
jozee@4488 | 14 |
slaxemulator@12340 | 15 DEPENDS="libjpeg" |
slaxemulator@12340 | 16 BUILD_DEPENDS="jpeg-dev" |
slaxemulator@12340 | 17 |
pascal@24447 | 18 # What is the latest version available today? |
pascal@24447 | 19 current_version() |
pascal@24447 | 20 { |
pascal@24447 | 21 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24447 | 22 sed "/latest/d;/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24447 | 23 } |
pascal@24447 | 24 |
jozee@4488 | 25 # Rules to configure and make the package. |
slaxemulator@12329 | 26 compile_rules() |
slaxemulator@12329 | 27 { |
pascal@21119 | 28 sed -i 's|jpeg_mem|_&|' lib/libv4lconvert/jpeg_memsrcdest.h |
slaxemulator@12329 | 29 make && |
al@18472 | 30 make install PREFIX="/usr" DESTDIR="$DESTDIR" |
jozee@4488 | 31 } |
al@18472 | 32 |
jozee@4488 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@4488 | 34 genpkg_rules() |
jozee@4488 | 35 { |
jozee@4488 | 36 mkdir -p $fs/usr/lib |
pascal@14718 | 37 cp -a $install/usr/lib/*so* $fs/usr/lib/ |
pascal@14718 | 38 cp -a $install/usr/lib/$PACKAGE $fs/usr/lib |
jozee@4488 | 39 } |
jozee@4609 | 40 |
jozee@4609 | 41 post_install() |
jozee@4609 | 42 { |
al@18472 | 43 lib='/usr/lib/libv4l/v4l1compat.so' |
al@18472 | 44 if [ -e "$1$lib" ]; then |
al@18472 | 45 grep -q "^export LD_PRELOAD=$lib$" "$1/etc/profile" || |
al@18472 | 46 echo "export LD_PRELOAD=$lib" >> "$1/etc/profile" |
al@18472 | 47 fi |
jozee@4609 | 48 } |
jozee@4612 | 49 |
jozee@4612 | 50 post_remove() |
jozee@4612 | 51 { |
al@18472 | 52 sed -i '/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/d' "$1/etc/profile" |
jozee@4612 | 53 } |