wok-6.x diff libv4l/receipt @ rev 20333

linux: read default cmdline from EFI\BOOT\linux.cmdline
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 02 13:53:27 2018 +0200 (2018-06-02)
parents 6eff489aa802
children 1010cf040970
line diff
     1.1 --- a/libv4l/receipt	Tue Jun 11 11:57:36 2013 +0200
     1.2 +++ b/libv4l/receipt	Sat Jun 02 13:53:27 2018 +0200
     1.3 @@ -8,7 +8,7 @@
     1.4  SHORT_DESC="Userspace library for Video 4 Linux (1 and 2)"
     1.5  WEB_SITE="http://freshmeat.net/projects/libv4l"
     1.6  SOURCE="v4l-utils"
     1.7 -TARBALL="${SOURCE}-${VERSION}.tar.bz2"
     1.8 +TARBALL="$SOURCE-$VERSION.tar.bz2"
     1.9  WGET_URL="http://linuxtv.org/downloads/v4l-utils/$TARBALL"
    1.10  TAGS="webcam video"
    1.11  
    1.12 @@ -18,11 +18,10 @@
    1.13  # Rules to configure and make the package.
    1.14  compile_rules()
    1.15  {
    1.16 -	cd $src
    1.17  	make &&
    1.18 -	make install PREFIX="/usr" DESTDIR="$DESTDIR" 
    1.19 +	make install PREFIX="/usr" DESTDIR="$DESTDIR"
    1.20  }
    1.21 -	
    1.22 +
    1.23  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.24  genpkg_rules()
    1.25  {
    1.26 @@ -33,10 +32,14 @@
    1.27  
    1.28  post_install()
    1.29  {
    1.30 -  echo "export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so" >> $1/etc/profile
    1.31 +	lib='/usr/lib/libv4l/v4l1compat.so'
    1.32 +	if [ -e "$1$lib" ]; then
    1.33 +		grep -q "^export LD_PRELOAD=$lib$"   "$1/etc/profile" ||
    1.34 +		echo     "export LD_PRELOAD=$lib" >> "$1/etc/profile"
    1.35 +	fi
    1.36  }
    1.37  
    1.38  post_remove()
    1.39  {
    1.40 -  sed -i 's/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/ /' $1/etc/profile	
    1.41 +	sed -i '/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/d' "$1/etc/profile"
    1.42  }