diff options
author | Eric Hameleers <alien@slackware.com> | 2013-05-16 14:05:35 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2013-05-16 14:05:35 +0000 |
commit | 185177b21ad21dc26f58b9bfd8ec421b7af6042c (patch) | |
tree | 2d207a7dd427b5104d87fdd10c615c2abc93011b | |
parent | 726456b9b12237328adcd92a47859c21a87ed928 (diff) | |
download | asb-185177b21ad21dc26f58b9bfd8ec421b7af6042c.tar.gz asb-185177b21ad21dc26f58b9bfd8ec421b7af6042c.tar.xz |
Several updates
-rwxr-xr-x | razor-qt/build/razor-qt.SlackBuild | 66 |
1 files changed, 54 insertions, 12 deletions
diff --git a/razor-qt/build/razor-qt.SlackBuild b/razor-qt/build/razor-qt.SlackBuild index c831e944..c700057e 100755 --- a/razor-qt/build/razor-qt.SlackBuild +++ b/razor-qt/build/razor-qt.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright 2011 Eric Hameleers, Eindhoven, NL +# Copyright 2011, 2013 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -28,10 +28,12 @@ # For: razor-qt # Descr: light-weight desktop environment based on Qt technologies # URL: http://razor-qt.org/ -# Needs: +# Needs: libstatgrab # Changelog: # 0.4.0-1: 18/Dec/2011 by Eric Hameleers <alien@slackware.com> # * Initial build. +# 0.5.2-1: 16/may/2013 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh razor-qt.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -42,7 +44,7 @@ # Set initial variables: PRGNAM=razor-qt -VERSION=${VERSION:-0.4.0} +VERSION=${VERSION:-0.5.2} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} @@ -65,22 +67,31 @@ SRCURL="http://razor-qt.org/downloads/$(echo $PRGNAM | tr -d -)-${VERSION}.tar.b ## # Automatically determine the architecture we're building on: +MARCH=$( uname -m ) if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i486 ;; - arm*) export ARCH=arm ;; + case "$MARCH" in + i?86) export ARCH=i486 ;; + armv7hl) export ARCH=$MARCH ;; + armv6hl) export ARCH=$MARCH ;; + arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; + *) export ARCH=$MARCH ;; esac fi case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" + i?86) SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; + armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; + armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; *) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; @@ -148,6 +159,7 @@ echo Building ... mkdir -p build cd build cmake \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -160,9 +172,40 @@ cd build make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log cd - +# Do not autostart this unrelated app: +rm -f $PKG/etc/xdg/autostart/razor-qstardict-autostart.desktop + +# Make the config migration script executable: +chmod 0755 $PKG/usr/share/razor/razor-confupdate/desktop*.py + +# Add the xinitrc file: +install -m755 -D $SRCDIR/xinitrc.razorqt $PKG/etc/X11/xinit/xinitrc.razorqt + +# Don't clobber existing configuration: +for FILE in desktop razor session windowmanagers razor-panel/panel; do + mv $PKG/etc/xdg/razor/$FILE.conf{,.new} +done + # Add this to the doinst.sh: mkdir -p $PKG/install cat <<EOINS >> $PKG/install/doinst.sh +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +for FILE in desktop razor session windowmanagers razor-panel/panel; do + config etc/xdg/razor/\$FILE.conf.new +done + # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 @@ -186,13 +229,10 @@ EOINS mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $SRCDIR/xinitrc.razorqt > $PKG/usr/doc/$PRGNAM-$VERSION/xinitrc.sample chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; -# Add the xinitrc file: -install -m755 -D $SRCDIR/xinitrc.razor $PKG/etc/X11/xinit/xinitrc.razor -cp $SRCDIR/xinitrc.razor $PKG/usr/doc/$PRGNAM-$VERSION/xinitrc.sample - # Compress the man page(s) if present: if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; @@ -206,6 +246,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc +cat $SRCDIR/slack-required > $PKG/install/slack-required # Build the package: cd $PKG @@ -214,6 +255,7 @@ cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt +cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep # Restore the original umask: umask ${_UMASK_} |