From b1cf3c24a8f4c168bdb94fe1403779dceb95eea2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 16 Aug 2014 15:42:51 +0700 Subject: [PATCH] desktop/idesk: Added (draws desktop icons on X root window). Signed-off-by: Willy Sudiarto Raharjo --- desktop/idesk/README | 8 +++ desktop/idesk/compilefix.diff | 11 +++ desktop/idesk/create_user_dir.diff | 18 +++++ desktop/idesk/idesk.SlackBuild | 109 +++++++++++++++++++++++++++++ desktop/idesk/idesk.info | 10 +++ desktop/idesk/slack-desc | 19 +++++ 6 files changed, 175 insertions(+) create mode 100644 desktop/idesk/README create mode 100644 desktop/idesk/compilefix.diff create mode 100644 desktop/idesk/create_user_dir.diff create mode 100644 desktop/idesk/idesk.SlackBuild create mode 100644 desktop/idesk/idesk.info create mode 100644 desktop/idesk/slack-desc diff --git a/desktop/idesk/README b/desktop/idesk/README new file mode 100644 index 0000000000..64137c3a5e --- /dev/null +++ b/desktop/idesk/README @@ -0,0 +1,8 @@ +idesk (draws desktop icons on X root window) + +Idesk is program that draws desktop icons. Each icon will execute a shell +command on a configurable action. The icons can be moved on the desktop +by dragging them, and the icons will remember their positions on start-up. + +Before idesk can be started, it requires a config file in ~/.ideskrc. See +the README and examples/ in /usr/doc/idesk-$VERSION. diff --git a/desktop/idesk/compilefix.diff b/desktop/idesk/compilefix.diff new file mode 100644 index 0000000000..2d64318916 --- /dev/null +++ b/desktop/idesk/compilefix.diff @@ -0,0 +1,11 @@ +diff -Naur idesk-0.7.5/src/DesktopConfig.cpp idesk-0.7.5.patched/src/DesktopConfig.cpp +--- idesk-0.7.5/src/DesktopConfig.cpp 2005-11-10 18:07:58.000000000 -0500 ++++ idesk-0.7.5.patched/src/DesktopConfig.cpp 2014-07-05 00:14:38.000000000 -0400 +@@ -1,3 +1,7 @@ ++#include ++#include ++#include ++ + /* vim:tabstop=4:expandtab:shiftwidth=4 + * + * Idesk -- DesktopConfig.cpp diff --git a/desktop/idesk/create_user_dir.diff b/desktop/idesk/create_user_dir.diff new file mode 100644 index 0000000000..652c424041 --- /dev/null +++ b/desktop/idesk/create_user_dir.diff @@ -0,0 +1,18 @@ +diff -Naur idesk-0.7.5/src/DesktopConfig.cpp idesk-0.7.5.patched/src/DesktopConfig.cpp +--- idesk-0.7.5/src/DesktopConfig.cpp 2005-11-10 18:07:58.000000000 -0500 ++++ idesk-0.7.5.patched/src/DesktopConfig.cpp 2014-08-15 20:50:47.000000000 -0400 +@@ -236,11 +236,13 @@ + + directory += "/.idesktop/"; + ++ mkdir(directory.c_str(), 0755); ++ + fileCount = scandir(directory.c_str(), &files, 0, alphasort); + + if (fileCount == -1) + { +- cout << "Error: you have to create the .idesktop dir on your HOME!!\n"; ++ cout << "Error: Can't find or create the .idesktop dir on your HOME!!\n"; + _exit (1); + } + diff --git a/desktop/idesk/idesk.SlackBuild b/desktop/idesk/idesk.SlackBuild new file mode 100644 index 0000000000..d8d54bbaaf --- /dev/null +++ b/desktop/idesk/idesk.SlackBuild @@ -0,0 +1,109 @@ +#!/bin/sh + +# Slackware build script for idesk + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Disclaimer: + +# idesk is old and unmaintained. I wrote this SlackBuild at the request +# of someone on IRC, and decided "what the hell, I'll submit it". If +# you're reading this because you want to change anything about it, you're +# welcome to take over maintenance of this build (seriously, I don't use +# idesk, beyond running it once and seeing that it worked). The only +# maintenance I'll ever do for this build is to fix any build problems +# on future versions of Slackware (unless upstream suddenly releases a +# new version, but it's been a dead project for almost 10 years now). + +PRGNAM=idesk +VERSION=${VERSION:-0.7.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# missing #include files, newer g++ cares more than the ones from 2005. +patch -p1 < $CWD/compilefix.diff + +# The next two stanzas allow the program to start up without the user +# having to create or edit any config files. It won't *do* much but at +# least we can tell if it works or not. This seems like a minor deviation +# from the Slackware way, but in reality it lets me automate my testing +# so it ultimately increases the amount of slack in the universe. + +# don't abort if ~/.idesktop/ dir doesn't exist (just create it). Seriously, +# that almost belongs on thedailywtf. +patch -p1 < $CWD/create_user_dir.diff + +# don't reference /usr/local in default.lnk (which gets installed in +# /usr/share/idesk as well as /usr/doc). Also use kdialog for the +# "about" icon, as Slackware doesn't ship Xdialog. +sed -i \ + -e 's,/usr/local,/usr,g' \ + -e 's,Xdialog,kdialog,g' \ + examples/* + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog NEWS README TODO examples $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/desktop/idesk/idesk.info b/desktop/idesk/idesk.info new file mode 100644 index 0000000000..b14c8ef239 --- /dev/null +++ b/desktop/idesk/idesk.info @@ -0,0 +1,10 @@ +PRGNAM="idesk" +VERSION="0.7.5" +HOMEPAGE="http://idesk.sourceforge.net/html/index.html" +DOWNLOAD="http://downloads.sourceforge.net/project/idesk/idesk/idesk-0.7.5/idesk-0.7.5.tar.bz2" +MD5SUM="beb48c97815c7b085e3b3d601297fbb8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="imlib2" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/desktop/idesk/slack-desc b/desktop/idesk/slack-desc new file mode 100644 index 0000000000..b4c6d01ea6 --- /dev/null +++ b/desktop/idesk/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +idesk: idesk (draws desktop icons on X root window) +idesk: +idesk: Idesk is program that draws desktop icons. Each icon will execute +idesk: a shell command on a configurable action. The icons can be moved +idesk: on the desktop by dragging them, and the icons will remember their +idesk: positions on start-up. +idesk: +idesk: +idesk: +idesk: +idesk: