system/fsviewer: Added (NextStep-like file browser)

Signed-off-by: Erik Hanson <erik@slackbuilds.org>
This commit is contained in:
B. Watson 2013-02-11 23:45:51 -06:00 committed by Erik Hanson
parent edc28b0ee7
commit 411a788efa
9 changed files with 217 additions and 0 deletions

12
system/fsviewer/README Normal file
View file

@ -0,0 +1,12 @@
fsviewer (NextStep-like file browser)
FSViewer is a file system viewer for Window Maker, developed by George
Clernon visually and functionally in analogy to the Workspace Manager
of NeXTStep(TM).
Although fsviewer uses windowmaker's libraries, it will run under any
X window manager or desktop environment.
This build includes an optional patch that makes a minor change to the UI
(adds a titlebar). See README.patch.txt for details. To add a titlebar to
the initial viewer window, set TITLEBAR=yes in the script's environment.

View file

@ -0,0 +1,16 @@
Original behaviour in NextStep and OpenStep file viewer was that the first
file view window had no close button or titlebar. This tends to bug the
hell out of modern users, so this build includes an optional patch that
adds a title bar (with a disabled close button) to the first viewer.
This is strictly a cosmetic change... except if you run windowmaker,
it allows normal wmaker stuff (right-click menu with minimize, Move to,
Omnipresent, etc). Without a title bar, it's awkward or impossible to
do normal window operations, so the patch actually adds functionality.
By default, the patch isn't included in the build. To include it, set
TITLEBAR=yes in the environment, like so:
# TITLEBAR=yes ./fsviewer.SlackBuild
...or if you use sbopkg, set TITLEBAR=yes as a build option.

View file

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View file

@ -0,0 +1,106 @@
#!/bin/bash
# Slackware build script for fsviewer
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=fsviewer
VERSION=${VERSION:-0.2.6}
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-app-$VERSION
tar xvf $CWD/$PRGNAM-app-$VERSION.tar.bz2
cd $PRGNAM-app-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# The WINGs API has changed slightly in the newer versions of WindowMaker
patch -p1 < $CWD/wingsfix.diff
# See README.patch.txt for info
if [ "${TITLEBAR:-no}" = "yes" ]; then
patch -p1 < $CWD/titlebar.diff
fi
LIBS="-lWUtil" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
mkdir -p $PKG/usr/bin
install -s -m0755 defs/chdef $PKG/usr/bin
ln -s ../GNUstep/Apps/FSViewer.app/FSViewer $PKG/usr/bin/$PRGNAM
gzip -9 $PKG/usr/man/man1/*
# .desktop file comes from the Polish Linux Distro, and has been modified
# to add the icon and to pass desktop-file-validate.
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
# I like the look of FSViewer2.xpm better. You could use FSViewer.xpm if
# you prefer.
mkdir -p $PKG/usr/share/pixmaps
ln -s ../../GNUstep/Apps/FSViewer.app/xpm/FSViewer2.xpm \
$PKG/usr/share/pixmaps/$PRGNAM.xpm
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README docs/* \
$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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=FSViewer
Comment=File Viewer
Comment[pl]=Przeglądarka plików
Exec=/usr/bin/fsviewer
Icon=fsviewer
Terminal=false
Type=Application
Categories=Utility;FileManager;System;FileTools;

View file

@ -0,0 +1,10 @@
PRGNAM="fsviewer"
VERSION="0.2.6"
HOMEPAGE="http://www.bayernline.de/~gscholz/linux/fsviewer/"
DOWNLOAD="http://www.bayernline.de/~gscholz/linux/fsviewer/fsviewer-app-0.2.6.tar.bz2"
DOWNLOAD_x86_64=""
MD5SUM="cf55ccb04b635250a647aafee69e2026"
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"

View file

@ -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 ':'.
|-----handy-ruler------------------------------------------------------|
fsviewer: fsviewer (NextStep-like file browser)
fsviewer:
fsviewer: FSViewer is a file system viewer for Window Maker, developed by George
fsviewer: Clernon visually and functionally in analogy to the Workspace Manager
fsviewer: of NeXTStep(TM).
fsviewer:
fsviewer:
fsviewer:
fsviewer:
fsviewer:
fsviewer:

View file

@ -0,0 +1,12 @@
diff -Naur fsviewer-app-0.2.6/src/FSFileView.c fsviewer-app-0.2.6.patched/src/FSFileView.c
--- fsviewer-app-0.2.6/src/FSFileView.c 2007-10-14 15:06:02.000000000 -0400
+++ fsviewer-app-0.2.6.patched/src/FSFileView.c 2013-01-21 23:55:02.000000000 -0500
@@ -430,7 +430,7 @@
WMResizableWindowMask);
attributes.window_level = WMNormalWindowLevel;
attributes.extra_flags = GSFullKeyboardEventsFlag;
- attributes.flags = (GSWindowStyleAttr | GSWindowLevelAttr |
+ attributes.flags = (/* GSWindowStyleAttr | */ GSWindowLevelAttr |
GSExtraFlagsAttr);
WMSetWindowAttributes(fView->dpy, WMWidgetXID(fView->fileView),
&attributes);

View file

@ -0,0 +1,24 @@
diff -Naur fsviewer-app-0.2.6/defs/chdef.c fsviewer-app-0.2.6.patched/defs/chdef.c
--- fsviewer-app-0.2.6/defs/chdef.c 2007-10-14 12:18:25.000000000 -0400
+++ fsviewer-app-0.2.6.patched/defs/chdef.c 2013-01-21 20:12:00.000000000 -0500
@@ -374,7 +374,7 @@
SetIntegerForKey(0, "DisplayMCListPixmap");
WMWritePropListToFile(filesDB,
- wdefaultspathfordomain("FSViewer"), True);
+ wdefaultspathfordomain("FSViewer"));
result = 0;
}
else
diff -Naur fsviewer-app-0.2.6/src/extnInspector.c fsviewer-app-0.2.6.patched/src/extnInspector.c
--- fsviewer-app-0.2.6/src/extnInspector.c 2006-07-23 03:24:15.000000000 -0400
+++ fsviewer-app-0.2.6.patched/src/extnInspector.c 2013-01-21 20:09:39.000000000 -0500
@@ -229,7 +229,7 @@
if(numRows > 0)
WMWritePropListToFile(filesDB,
- wdefaultspathfordomain("FSViewer"), True);
+ wdefaultspathfordomain("FSViewer"));
if(extn)
free(extn);