summaryrefslogtreecommitdiff
path: root/network/urlview
diff options
context:
space:
mode:
authorMichael Wagner <lapinours@web.de>2010-05-11 15:01:38 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:01:38 +0200
commitd9b8c96351a32379b6e98dd52bcdac20b5b20a2e (patch)
tree1b19c501eeac5dd7886920a6bcb2b825d9b4f916 /network/urlview
parent510be39fd321d9fb0532b499b3cdf23dbe742623 (diff)
downloadslackbuilds-d9b8c96351a32379b6e98dd52bcdac20b5b20a2e.tar.gz
network/urlview: Initial import
Diffstat (limited to 'network/urlview')
-rw-r--r--network/urlview/README10
-rw-r--r--network/urlview/doinst.sh15
-rw-r--r--network/urlview/patches/Makefile.in.diff12
-rw-r--r--network/urlview/patches/sample.urlview.diff15
-rw-r--r--network/urlview/patches/url_handler.sh.diff15
-rw-r--r--network/urlview/slack-desc19
-rw-r--r--network/urlview/urlview.SlackBuild92
-rw-r--r--network/urlview/urlview.info8
8 files changed, 186 insertions, 0 deletions
diff --git a/network/urlview/README b/network/urlview/README
new file mode 100644
index 0000000000..a89983e2c4
--- /dev/null
+++ b/network/urlview/README
@@ -0,0 +1,10 @@
+urlview is a curses program for extracting URLs from text files and
+displaying a menu from which you can select a specific URL to view using
+your favorite browser program.
+
+It was originally part of mutt. See /etc/urlview.conf on how to configure
+mutt, tin, or your default browser.
+
+Please be aware that /etc/urlview.conf and /usr/bin/url_handler.sh are
+configuration files, so they are not overwritten on upgrades. Be sure to
+merge/move the .new files after each upgrade.
diff --git a/network/urlview/doinst.sh b/network/urlview/doinst.sh
new file mode 100644
index 0000000000..4562d132b4
--- /dev/null
+++ b/network/urlview/doinst.sh
@@ -0,0 +1,15 @@
+# Handle configuration files
+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...
+}
+
+config etc/urlview.conf.new
+config usr/bin/url_handler.sh.new
diff --git a/network/urlview/patches/Makefile.in.diff b/network/urlview/patches/Makefile.in.diff
new file mode 100644
index 0000000000..2bb0334b83
--- /dev/null
+++ b/network/urlview/patches/Makefile.in.diff
@@ -0,0 +1,12 @@
+--- Makefile.in~ 2007-06-08 14:09:57.000000000 +0200
++++ Makefile.in 2007-06-08 14:33:40.000000000 +0200
+@@ -318,7 +318,8 @@
+
+
+ install-data-local:
+- $(INSTALL_DATA) urlview.man $(mandir)/man1/urlview.1
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
++ $(INSTALL_DATA) urlview.man ${DESTDIR}$(mandir)/man1/urlview.1
+
+ # how to create a target for uninstall-data-local???
+
diff --git a/network/urlview/patches/sample.urlview.diff b/network/urlview/patches/sample.urlview.diff
new file mode 100644
index 0000000000..111719f5e5
--- /dev/null
+++ b/network/urlview/patches/sample.urlview.diff
@@ -0,0 +1,15 @@
+--- sample.urlview~ 2007-06-08 14:11:09.000000000 +0200
++++ sample.urlview 2007-06-08 14:11:33.000000000 +0200
+@@ -19,10 +19,10 @@
+ #REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
+ REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
+
+-# Command to invoke for selected URL. Use lynx, netscape, or url_handler.sh
++# Command to invoke for selected URL. Use lynx, firefox, or url_handler.sh
+ # shell script.
+
+ #COMMAND lynx %s
+-#COMMAND netscape -remote 'openURL(%s)'
++#COMMAND firefox -remote 'openURL(%s)'
+ COMMAND url_handler.sh
+
diff --git a/network/urlview/patches/url_handler.sh.diff b/network/urlview/patches/url_handler.sh.diff
new file mode 100644
index 0000000000..d976e3c90b
--- /dev/null
+++ b/network/urlview/patches/url_handler.sh.diff
@@ -0,0 +1,15 @@
+--- url_handler.sh~ 2007-06-08 14:12:20.000000000 +0200
++++ url_handler.sh 2007-06-08 14:14:06.000000000 +0200
+@@ -28,8 +28,10 @@
+ # VT: Launch in the same terminal
+
+ # The lists of programs to be executed are
+-https_prgs="/usr/X11R6/bin/netscape:XW /usr/bin/lynx:XT"
+-http_prgs="/usr/bin/lynx:XT /usr/X11R6/bin/netscape:XW"
++https_prgs="/usr/bin/firefox:XW /usr/bin/lynx:XT"
++https_prgs="/usr/bin/firefox:XW /usr/bin/lynx:XT"
++http_prgs="/usr/bin/lynx:XT /usr/bin/firefox:XW"
++http_prgs="/usr/bin/lynx:XT /usr/bin/firefox:XW"
+ mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/pine:VT /usr/bin/mail:VT"
+ gopher_prgs="/usr/bin/lynx:XT /usr/bin/gopher:XT"
+ ftp_prgs="/usr/bin/lynx:XT /usr/bin/ncftp:XT"
diff --git a/network/urlview/slack-desc b/network/urlview/slack-desc
new file mode 100644
index 0000000000..7290bfe0c5
--- /dev/null
+++ b/network/urlview/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+urlview: urlview (extract URLs from text files)
+urlview:
+urlview: urlview is a curses program for extracting URLs from text files and
+urlview: displaying a menu from which you can select a specific URL to view
+urlview: using your favorite browser program.
+urlview:
+urlview: It was originally a part of mutt.
+urlview:
+urlview:
+urlview:
+urlview:
diff --git a/network/urlview/urlview.SlackBuild b/network/urlview/urlview.SlackBuild
new file mode 100644
index 0000000000..a9470fdbbc
--- /dev/null
+++ b/network/urlview/urlview.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+#
+# Slackware build script for urlview
+# (C) 2007 Michael Wagner <lapinours@web.de>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=urlview
+VERSION=0.9
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="AUTHORS COPYING ChangeLog INSTALL README"
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION || exit 1
+
+# Apply patches for DESTDIR and mostly path fixes:
+for i in $CWD/patches/*.diff; do
+ patch -p0 < $i || exit 1
+done
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -name "*.?" -type f 2> /dev/null | xargs gzip -9 2> /dev/null
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+# Use sample.urlview as system-wide default configuration:
+install -D -m 0644 sample.urlview $PKG/etc/urlview.conf.new
+
+# Let url_handler.sh do what it is supposed to be, handle URL events:
+install -m 0755 url_handler.sh $PKG/usr/bin/url_handler.sh.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
+
+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.tgz
diff --git a/network/urlview/urlview.info b/network/urlview/urlview.info
new file mode 100644
index 0000000000..d320e9e581
--- /dev/null
+++ b/network/urlview/urlview.info
@@ -0,0 +1,8 @@
+PRGNAM="urlview"
+VERSION="0.9"
+HOMEPAGE="ftp://ftp.mutt.org/pub/mutt/contrib/urlview-0.9.README"
+DOWNLOAD="ftp://ftp.mutt.org/pub/mutt/contrib/urlview-0.9.tar.gz"
+MD5SUM="67731f73e69297ffd106b65c8aebb2ab"
+MAINTAINER="Michael Wagner"
+EMAIL="lapinours@web.de"
+APPROVED="rworkman"