# HG changeset patch # User Aleksej Bobylev # Date 1443996626 -10800 # Node ID b62f93de1a4ea460f857c44504b9d9c07fafc684 # Parent 325d6b98268cdef0bfb00deb3230b2a2518c7c8b 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. diff -r 325d6b98268c -r b62f93de1a4e ghostscript/receipt --- a/ghostscript/receipt Sat Oct 03 16:36:26 2015 +0300 +++ b/ghostscript/receipt Mon Oct 05 01:10:26 2015 +0300 @@ -15,12 +15,13 @@ libpng tiff zlib cups xorg-libICE xorg-libSM xorg-libX11 xorg-libXau \ xorg-libXdmcp xorg-libXext xorg-libXt gcc-lib-base jasper jbig2dec" # build depends are optional ; ghostscripts still build but does not compile in cups support -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" +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" # Rules to configure and make the package. compile_rules() { - cd $src # force it to use system-libs rm -rf jpeg libpng zlib jasper expat tiff @@ -40,7 +41,6 @@ $CONFIGURE_ARGS && make $MAKEFLAGS && make DESTDIR=$DESTDIR install soinstall - } # Rules to gen a SliTaz package suitable for Tazpkg. @@ -66,5 +66,5 @@ post_install() { - ln -s /usr/bin/gsc $1/usr/bin/gs + ln -sf /usr/bin/gsc "$1/usr/bin/gs" } diff -r 325d6b98268c -r b62f93de1a4e libv4l/receipt --- a/libv4l/receipt Sat Oct 03 16:36:26 2015 +0300 +++ b/libv4l/receipt Mon Oct 05 01:10:26 2015 +0300 @@ -8,7 +8,7 @@ SHORT_DESC="Userspace library for Video 4 Linux (1 and 2)" WEB_SITE="http://freshmeat.net/projects/libv4l" SOURCE="v4l-utils" -TARBALL="${SOURCE}-${VERSION}.tar.bz2" +TARBALL="$SOURCE-$VERSION.tar.bz2" WGET_URL="http://linuxtv.org/downloads/v4l-utils/$TARBALL" TAGS="webcam video" @@ -18,11 +18,10 @@ # Rules to configure and make the package. compile_rules() { - cd $src make && - make install PREFIX="/usr" DESTDIR="$DESTDIR" + make install PREFIX="/usr" DESTDIR="$DESTDIR" } - + # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { @@ -33,10 +32,14 @@ post_install() { - echo "export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so" >> $1/etc/profile + lib='/usr/lib/libv4l/v4l1compat.so' + if [ -e "$1$lib" ]; then + grep -q "^export LD_PRELOAD=$lib$" "$1/etc/profile" || + echo "export LD_PRELOAD=$lib" >> "$1/etc/profile" + fi } post_remove() { - sed -i 's/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/ /' $1/etc/profile + sed -i '/export LD_PRELOAD=\/usr\/lib\/libv4l\/v4l1compat.so/d' "$1/etc/profile" } diff -r 325d6b98268c -r b62f93de1a4e slitaz-base-files/receipt --- a/slitaz-base-files/receipt Sat Oct 03 16:36:26 2015 +0300 +++ b/slitaz-base-files/receipt Mon Oct 05 01:10:26 2015 +0300 @@ -102,24 +102,25 @@ # pre_install() { - local root="$1" - cp -a $root/etc $root/tmp/etc.bak 2>/dev/null + cp -a "$1/etc" "$1/tmp/etc.bak" 2>/dev/null + [ -x "$1/usr/bin/sudo" ] && mv "$1/usr/bin/sudo" "$1/usr/bin/sudo.orig" # Remove old /var/run symlink - rm -f $root/var/run + rm -f "$1/var/run" } post_install() { - local root="$1" - cp -a $root/tmp/etc.bak/* $root/etc 2>/dev/null - rm -rf $root/tmp/etc.bak + cp -a "$1/tmp/etc.bak"/* "$1/etc" 2>/dev/null + rm -r "$1/tmp/etc.bak" + + [ -x "$1/usr/bin/sudo.orig" ] && mv -f "$1/usr/bin/sudo.orig" "$1/usr/bin/sudo" # Reset permission. - chmod 640 $root/etc/shadow - chmod 640 $root/etc/gshadow + chmod 640 "$1/etc/shadow" + chmod 640 "$1/etc/gshadow" - if ! grep -q audio $root/etc/group; then - chroot $root/ /bin/addgroup -g 20 audio + if ! grep -q audio "$1/etc/group"; then + chroot "$1/" /bin/addgroup -g 20 audio fi }