- remove bundled xdg-utils and run_depends on the xdg-utils package instead

ok sturm@
This commit is contained in:
ajacoutot 2008-11-01 19:31:57 +00:00
parent 724b5582a9
commit 2b28182b9b
8 changed files with 8 additions and 118 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.4 2008/06/28 18:10:09 sturm Exp $
# $OpenBSD: Makefile,v 1.5 2008/11/01 19:31:57 ajacoutot Exp $
COMMENT= collecting and processing thoughts according to GTD
V= 2.0.1
DISTNAME= tr-$V
PKGNAME= thinkingrock-${V}p1
PKGNAME= thinkingrock-${V}p2
CATEGORIES= productivity java
HOMEPAGE= http://www.thinkingrock.com.au/
@ -23,18 +23,19 @@ MODULES= java
MODJAVA_VER= 1.5+
MODJAVA_JRERUN= Yes
RUN_DEPENDS= ::java/javaPathHelper
RUN_DEPENDS= ::java/javaPathHelper \
::devel/xdg-utils
NO_BUILD= Yes
NO_REGRESS= Yes
PKG_ARCH= *
post-extract:
@rm ${WRKSRC}/etc/tr.conf~
do-configure:
${SUBST_CMD} ${WRKSRC}/bin/tr ${WRKSRC}/etc/tr.conf
@rm ${WRKSRC}/etc/tr.conf~
@rm ${WRKSRC}/etc/tr.conf.bak
@rm ${WRKSRC}/etc/tr.conf.orig
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/thinkingrock
@ -43,16 +44,5 @@ do-install:
done
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/thinkingrock
${INSTALL_SCRIPT} ${WRKSRC}/bin/tr ${PREFIX}/bin/thinkingrock
${INSTALL_SCRIPT} ${WRKSRC}/bin/xdg-email ${PREFIX}/bin
# NetBeans shipped with TR doesn't know about OpenBSD and thus uses
# different names than on linux
ln -s xdg-email ${PREFIX}/bin/email
${INSTALL_SCRIPT} ${WRKSRC}/bin/xdg-open ${PREFIX}/bin
ln -s xdg-open ${PREFIX}/bin/open
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/thinkingrock
${INSTALL_DATA} ${FILESDIR}/README.OpenBSD \
${PREFIX}/share/doc/thinkingrock
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/thinkingrock
${INSTALL_SCRIPT} ${FILESDIR}/x* ${PREFIX}/share/examples/thinkingrock
.include <bsd.port.mk>

View File

@ -1,6 +0,0 @@
$OpenBSD: README.OpenBSD,v 1.1.1.1 2008/03/26 20:18:35 sturm Exp $
Thinkingrock is patched to permit customized start scripts when opening
files, URLs or emails. Example scripts can be found in
%%PREFIX%%/share/examples/thinkingrock. Just copy these into your PATH
as xdg-email-hook or xdg-open-hook.

View File

@ -1,20 +0,0 @@
#!/usr/bin/perl
# $OpenBSD: xdg-email-hook.pl,v 1.1.1.1 2008/03/26 20:18:35 sturm Exp $
use strict;
use warnings;
use URI;
$ARGV[0] =~ /^mailto:/ or die "Usage: $0 <mailtoURI>\n";
my $uri = URI->new($ARGV[0]);
my %headers = $uri->headers;
my $to = $uri->to;
my @cmd = ("xmutt");
push @cmd, '--body', $headers{body} if exists $headers{body};
push @cmd, '-b', $headers{bcc} if exists $headers{bcc};
push @cmd, '-c', $headers{cc} if exists $headers{cc};
push @cmd, '-s', $headers{subject} if exists $headers{subject};
exec @cmd, $to;

View File

@ -1,16 +0,0 @@
#!/bin/sh
# $OpenBSD: xdg-open-hook.sh,v 1.1.1.1 2008/03/26 20:18:35 sturm Exp $
filename=`echo "$1" | sed s#file:##`
case $filename in
*.pdf)
if `which xpdf > /dev/null`; then
xpdf $filename &
elif `which acroread > /dev/null`; then
acroread $filename &
fi
;;
*)
opera "$1" &
;;
esac

View File

@ -1,15 +0,0 @@
#!/bin/sh
# $OpenBSD: xmutt.sh,v 1.1.1.1 2008/03/26 20:18:35 sturm Exp $
export PATH=$PATH:/usr/X11R6/bin:/usr/local/bin
if [ "$1" = "--body" ]; then
mail=`mktemp /tmp/mutt.XXXXXXXXXX` || exit 1
trap 'rm $mail' 0 1 15
echo "$2" | tr "\r\f" "\n" > $mail
recode utf8..latin1 $mail
shift 2
xterm -e mutt -i $mail "$@"
else
xterm -e mutt "$@"
fi

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-bin_xdg-email,v 1.2 2008/06/05 08:33:55 sturm Exp $
--- bin/xdg-email.orig Thu Apr 10 07:12:59 2008
+++ bin/xdg-email Thu Apr 10 07:13:26 2008
@@ -598,8 +598,8 @@ mailto=`echo "${mailto}"| sed 's/[?&]$//'`
# Shouldn't happen
[ x"${mailto}" != x"" ] || exit_failure_syntax
-if which xdg-email-hook.sh > /dev/null 2> /dev/null; then
- xdg-email-hook.sh "${mailto}"
+if which xdg-email-hook > /dev/null 2> /dev/null; then
+ xdg-email-hook "${mailto}"
if [ $? -eq 0 ]; then
exit_success
else

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-bin_xdg-open,v 1.2 2008/06/05 08:33:55 sturm Exp $
--- bin/xdg-open.orig Thu Apr 10 07:14:51 2008
+++ bin/xdg-open Thu Apr 10 07:14:34 2008
@@ -403,6 +403,15 @@ if [ -z "${url}" ] ; then
exit_failure_syntax "file or URL argument missing"
fi
+if which xdg-open-hook > /dev/null 2> /dev/null; then
+ xdg-open-hook "$url"
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+fi
+
detectDE
if [ x"$DE" = x"" ]; then

View File

@ -1,15 +1,5 @@
@comment $OpenBSD: PLIST,v 1.2 2008/06/05 08:33:55 sturm Exp $
bin/email
bin/open
@comment $OpenBSD: PLIST,v 1.3 2008/11/01 19:31:57 ajacoutot Exp $
bin/thinkingrock
bin/xdg-email
bin/xdg-open
share/doc/thinkingrock/
share/doc/thinkingrock/README.OpenBSD
share/examples/thinkingrock/
share/examples/thinkingrock/xdg-email-hook.pl
share/examples/thinkingrock/xdg-open-hook.sh
share/examples/thinkingrock/xmutt.sh
share/thinkingrock/
share/thinkingrock/etc/
share/thinkingrock/etc/tr.clusters