- Update to ver.3

Approved by:	maintainer timeout
This commit is contained in:
Pav Lucistnik 2011-07-25 08:47:17 +00:00
parent bc922dc065
commit a3252a9df2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278291
6 changed files with 21 additions and 152 deletions

View File

@ -6,10 +6,9 @@
#
PORTNAME= gnarr
PORTVERSION= 2
PORTREVISION= 1
PORTVERSION= 3
CATEGORIES= games
MASTER_SITES= http://sacredchao.net/~piman/archive/
MASTER_SITES= http://www.volny.cz/nakamura/gnarr/
MAINTAINER= roam@FreeBSD.org
COMMENT= A program for generating battle cries

View File

@ -1,2 +1,2 @@
SHA256 (gnarr-2.tar.gz) = 8feffdf4f719b49018d3fd5d5c26156df2262442252cecd97c6bfce47eeb04d3
SIZE (gnarr-2.tar.gz) = 3246
SHA256 (gnarr-3.tar.gz) = f7c462efb0ff89ae2632db2457db785baa5f1b08606d3f9530831ff5f6a043d9
SIZE (gnarr-3.tar.gz) = 4935

View File

@ -1,44 +0,0 @@
--- Makefile 2000/12/13 13:10:33 1.1.1.1
+++ Makefile 2000/12/13 13:48:26 1.2
@@ -1,13 +1,35 @@
+PREFIX ?= /usr/local
+BINDIR = ${PREFIX}/bin
+ETCDIR = ${PREFIX}/etc
+MANDIR = ${PREFIX}/man
+MAN6DIR = ${MANDIR}/man6
+
+INSTALL ?= install
+INST_COPY ?= -c
+INST_OWNER ?= -o root
+INST_GROUP ?= -g wheel
+INST_P_MODE ?= -m 555
+INST_D_MODE ?= -m 444
+
+INSTALL_PROGRAM ?= ${INSTALL} ${COPY} ${INST_OWNER} ${INST_GROUP} ${INST_P_MODE}
+INSTALL_DATA ?= ${INSTALL} ${COPY} ${INST_OWNER} ${INST_GROUP} ${INST_D_MODE}
+
+MKDIR ?= mkdir -p
+RM ?= rm -f
+
all:
install:
- install -D -m 755 gnarr $(DESTDIR)/usr/games/gnarr
- install -D -m 755 gnarr.rc $(DESTDIR)/etc/gnarrrc
- install -D -m 644 gnarr.6 $(DESTDIR)/usr/share/man/man6/gnarr.6
+ ${MKDIR} ${BINDIR}
+ ${INSTALL_PROGRAM} gnarr ${BINDIR}
+ ${MKDIR} ${ETCDIR}
+ ${INSTALL_DATA} gnarr.rc ${ETCDIR}/gnarrrc
+ ${MKDIR} ${MAN6DIR}
+ ${INSTALL_DATA} gnarr.6 ${MAN6DIR}
clean:
uninstall:
- rm -f $(DESTDIR)/usr/games/gnarr
- rm -f $(DESTDIR)/etc/gnarrrc
- rm -f $(DESTDIR)/usr/share/man/man6/gnarr.6
+ ${RM} ${BINDIR}/gnarr
+ ${RM} ${ETCDIR}/gnarrrc
+ ${RM} ${MAN6DIR}/gnarr.6

View File

@ -1,61 +0,0 @@
--- gnarr 2000/12/13 13:10:33 1.1.1.1
+++ gnarr 2000/12/13 14:00:35 1.4
@@ -1,15 +1,17 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
# public domain
use strict;
my $VERSION = "v2";
+my $PREFIX = "/usr/local";
-my $one = 0; # Heh heh.
+my $one = 1; # Heh heh.
my %subrefs = ( '-h' => [\&help, 'print this help text'],
'-v' => [\&ver, 'print version information'],
- '-1' => [\&one, 'print one cry and exit'],
+ '-1' => [\&one, 'print one cry and exit (default)'],
+ '-m' => [\&mult, 'print multiple cries'],
'-l' => [\&list, 'list substitutions (long)'] );
my @place = ("hearth",
@@ -135,13 +137,20 @@
}
}
-open( BASE, "/etc/gnarrrc" );
-open( USER, "$ENV{HOME}/.gnarrrc" );
-my @base = (<BASE>, <USER>);
+my @base = ();
+
+if (open( BASE, "$PREFIX/etc/gnarrrc" )) {
+ push @base, (<BASE>);
+ close BASE;
+}
+if (open( USER, "$ENV{HOME}/.gnarrrc" )) {
+ push @base, (<USER>);
+ close USER;
+}
+
chomp @base;
-close USER;
-close BASE;
+die("No data read from gnarrc files!\n") if ($#base == -1);
do {
@@ -187,8 +196,10 @@
print "Please send any enhancements to piman\@sacredchao.net.\n\n";
exit();
}
+
+sub one { $one = 1; }
-sub one { $one = 1; }
+sub mult { $one = 0; }
sub list {
print "PLACE:\n"; print " $_\n" foreach (@place);

View File

@ -1,41 +0,0 @@
--- gnarr.6 2000/12/13 13:10:33 1.1.1.1
+++ gnarr.6 2000/12/13 14:16:02 1.2
@@ -3,7 +3,7 @@
.SH NAME
gnarr - generate a dwarven battle cry
-\fBgnarr \fR[\fI-1\fR]
+\fBgnarr \fR[\fB-1m\fR]
.br
\fBgnarr -l\fR
.br
@@ -18,21 +18,24 @@
.SH OPTIONS
.IP -1
-Print one battle cry and exit (normal behavior is to prompt for another).
+Print one battle cry and exit (normal behavior, as opposed to \fB-m\fR).
Suitable for use in scripts.
+.IP -h
+Print a help text describing command options.
+
+.IP -m
+Print battle cries, prompting for more after each one.
+
.IP -l
Print all replacements Gnarr can make to templates. You should probably
pipe this to a pager.
-.IP -h
-Print a help text describing command options.
-
.IP -v
Print version information.
.SH FILES
-.IP \fB/etc/gnarrrc/fR, \fB~/.gnarrrc\fR
+.IP \fB/etc/gnarrrc\fR,\ \fB~/.gnarrrc\fR
Contains the templates Gnarr uses to construct battle cries; one is a global
system file (installed with Gnarr), the other is user-specific.

View File

@ -1,2 +1,18 @@
bin/gnarr
etc/gnarrrc
etc/gnarr/ability
etc/gnarr/adjective
etc/gnarr/bodypart
etc/gnarr/categories
etc/gnarr/cripple
etc/gnarr/deity
etc/gnarr/event
etc/gnarr/imperative
etc/gnarr/insult
etc/gnarr/item
etc/gnarr/mockery
etc/gnarr/people
etc/gnarr/place
etc/gnarr/templates
etc/gnarr/time
etc/gnarr/weapon
@dirrm etc/gnarr