wok rev 18472
ghostscript, libv4l, slitaz-base-files: fix installation (thanks llev)
ghostscript: fix package upgrades;
libv4l: check multiple preloads in case of upgrade, not add preload if installation not finished/fails;
slitaz-base-files: not to overwrite real sudo.
ghostscript: fix package upgrades;
libv4l: check multiple preloads in case of upgrade, not add preload if installation not finished/fails;
slitaz-base-files: not to overwrite real sudo.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Oct 05 01:10:26 2015 +0300 (2015-10-05) |
parents | 325d6b98268c |
children | 57f41f847bba |
files | ghostscript/receipt libv4l/receipt slitaz-base-files/receipt |
line diff
1.1 --- a/ghostscript/receipt Sat Oct 03 16:36:26 2015 +0300 1.2 +++ b/ghostscript/receipt Mon Oct 05 01:10:26 2015 +0300 1.3 @@ -15,12 +15,13 @@ 1.4 libpng tiff zlib cups xorg-libICE xorg-libSM xorg-libX11 xorg-libXau \ 1.5 xorg-libXdmcp xorg-libXext xorg-libXt gcc-lib-base jasper jbig2dec" 1.6 # build depends are optional ; ghostscripts still build but does not compile in cups support 1.7 -BUILD_DEPENDS="cairo-dev gtk+-dev expat-dev fontconfig-dev freetype-dev gnutls-dev jpeg-dev libgcrypt-dev libgpg-error-dev libpng-dev tiff-dev zlib-dev cups-dev jbig2dec jasper-dev" 1.8 +BUILD_DEPENDS="cairo-dev gtk+-dev expat-dev fontconfig-dev freetype-dev \ 1.9 +gnutls-dev jpeg-dev libgcrypt-dev libgpg-error-dev libpng-dev tiff-dev \ 1.10 +zlib-dev cups-dev jbig2dec jasper-dev" 1.11 1.12 # Rules to configure and make the package. 1.13 compile_rules() 1.14 { 1.15 - cd $src 1.16 # force it to use system-libs 1.17 rm -rf jpeg libpng zlib jasper expat tiff 1.18 1.19 @@ -40,7 +41,6 @@ 1.20 $CONFIGURE_ARGS && 1.21 make $MAKEFLAGS && 1.22 make DESTDIR=$DESTDIR install soinstall 1.23 - 1.24 } 1.25 1.26 # Rules to gen a SliTaz package suitable for Tazpkg. 1.27 @@ -66,5 +66,5 @@ 1.28 1.29 post_install() 1.30 { 1.31 - ln -s /usr/bin/gsc $1/usr/bin/gs 1.32 + ln -sf /usr/bin/gsc "$1/usr/bin/gs" 1.33 }
2.1 --- a/libv4l/receipt Sat Oct 03 16:36:26 2015 +0300 2.2 +++ b/libv4l/receipt Mon Oct 05 01:10:26 2015 +0300 2.3 @@ -8,7 +8,7 @@ 2.4 SHORT_DESC="Userspace library for Video 4 Linux (1 and 2)" 2.5 WEB_SITE="http://freshmeat.net/projects/libv4l" 2.6 SOURCE="v4l-utils" 2.7 -TARBALL="${SOURCE}-${VERSION}.tar.bz2" 2.8 +TARBALL="$SOURCE-$VERSION.tar.bz2" 2.9 WGET_URL="http://linuxtv.org/downloads/v4l-utils/$TARBALL" 2.10 TAGS="webcam video" 2.11 2.12 @@ -18,11 +18,10 @@ 2.13 # Rules to configure and make the package. 2.14 compile_rules() 2.15 { 2.16 - cd $src 2.17 make && 2.18 - make install PREFIX="/usr" DESTDIR="$DESTDIR" 2.19 + make install PREFIX="/usr" DESTDIR="$DESTDIR" 2.20 } 2.21 - 2.22 + 2.23 # Rules to gen a SliTaz package suitable for Tazpkg. 2.24 genpkg_rules() 2.25 { 2.26 @@ -33,10 +32,14 @@ 2.27 2.28 post_install() 2.29 { 2.30 - echo "export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so" >> $1/etc/profile 2.31 + lib='/usr/lib/libv4l/v4l1compat.so' 2.32 + if [ -e "$1$lib" ]; then 2.33 + grep -q "^export LD_PRELOAD=$lib$" "$1/etc/profile" || 2.34 + echo "export LD_PRELOAD=$lib" >> "$1/etc/profile" 2.35 + fi 2.36 } 2.37 2.38 post_remove() 2.39 { 2.40 - sed -i 's/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/ /' $1/etc/profile 2.41 + sed -i '/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/d' "$1/etc/profile" 2.42 }
3.1 --- a/slitaz-base-files/receipt Sat Oct 03 16:36:26 2015 +0300 3.2 +++ b/slitaz-base-files/receipt Mon Oct 05 01:10:26 2015 +0300 3.3 @@ -102,24 +102,25 @@ 3.4 # 3.5 pre_install() 3.6 { 3.7 - local root="$1" 3.8 - cp -a $root/etc $root/tmp/etc.bak 2>/dev/null 3.9 + cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null 3.10 + [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig" 3.11 # Remove old /var/run symlink 3.12 - rm -f $root/var/run 3.13 + rm -f "$1/var/run" 3.14 } 3.15 3.16 post_install() 3.17 { 3.18 - local root="$1" 3.19 - cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null 3.20 - rm -rf $root/tmp/etc.bak 3.21 + cp -a "$1/tmp/etc.bak"/* "$1/etc" 2>/dev/null 3.22 + rm -r "$1/tmp/etc.bak" 3.23 + 3.24 + [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo" 3.25 3.26 # Reset permission. 3.27 - chmod 640 $root/etc/shadow 3.28 - chmod 640 $root/etc/gshadow 3.29 + chmod 640 "$1/etc/shadow" 3.30 + chmod 640 "$1/etc/gshadow" 3.31 3.32 - if ! grep -q audio $root/etc/group; then 3.33 - chroot $root/ /bin/addgroup -g 20 audio 3.34 + if ! grep -q audio "$1/etc/group"; then 3.35 + chroot "$1/" /bin/addgroup -g 20 audio 3.36 fi 3.37 } 3.38