Bug 16151 - ports update: sysutils/sarah
Summary: ports update: sysutils/sarah
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-01-17 07:50 UTC by Matt of the Long Red Hair
Modified: 2000-01-18 00:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt of the Long Red Hair 2000-01-17 07:50:01 UTC
	serveral important bug fixes since the original port was submitted

diff -ruN sarah.bak/Makefile sarah/Makefile
--- sarah.bak/Makefile	Mon Jan 10 09:36:52 2000
+++ sarah/Makefile	Mon Jan 17 02:27:03 2000
@@ -1,12 +1,12 @@
 # New ports collection makefile for:	sarah
-# Version required:	0.1b
+# Version required:	0.3b
 # Date created:		10 Jan 2000
 # Whom:				Matthew Pounsett <mattp@conundrum.com>
 #
 # $FreeBSD$
 #
 
-DISTNAME=		sarah-0.1b
+DISTNAME=		sarah-0.3b
 CATEGORIES=		sysutils
 MASTER_SITES=	ftp://ftp.conundrum.com/pub/sarah/
 
@@ -23,5 +23,12 @@
 		${INSTALL_DATA} sarah.conf.sample ${PREFIX}/etc
 	cd ${WRKSRC} && \
 		${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1
+
+post-install:
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${PREFIX}/share/doc/sarah
+	${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/sarah
+	${INSTALL_MAN} ${WRKSRC}/CHANGES ${PREFIX}/share/doc/sarah
+.endif
 
 .include <bsd.port.mk>
diff -ruN sarah.bak/files/md5 sarah/files/md5
--- sarah.bak/files/md5	Mon Jan 10 09:41:29 2000
+++ sarah/files/md5	Mon Jan 17 02:22:07 2000
@@ -1 +1 @@
-MD5 (sarah-0.1b.tar.gz) = b26ff4543af084ecd76cf65b18caa824
+MD5 (sarah-0.3b.tar.gz) = 91027f631db21225bd454eaa347b6bc8
diff -ruN sarah.bak/pkg/PLIST sarah/pkg/PLIST
--- sarah.bak/pkg/PLIST	Mon Jan 10 09:37:03 2000
+++ sarah/pkg/PLIST	Mon Jan 17 02:31:43 2000
@@ -1,2 +1,5 @@
 bin/sarah
 etc/sarah.conf.sample
+share/doc/sarah/README
+share/doc/sarah/CHANGES
+@dirrm share/doc/sarah
Comment 1 jedgar 2000-01-17 22:08:45 UTC
The script 'sarah' hard-codes the following:

my( $config )     = '/usr/local/etc/sarah.conf';

shouldn't this be configurable through ${PREFIX} ?

-----
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve   -   http://www.FreeBSD.org
Comment 2 Matt of the Long Red Hair 2000-01-17 22:11:56 UTC
On Mon, 17 Jan 2000, Chris D. Faulhaber wrote:

> The script 'sarah' hard-codes the following:
> 
> my( $config )     = '/usr/local/etc/sarah.conf';
> 
> shouldn't this be configurable through ${PREFIX} ?

There's no config script for sarah *yet*, unfortunately.  I can look at trying
to do something funky with the port makefile though, if there's a problem with
accepting the port this way.

------------------------------------------------------------------------------
``Forum, not tone.  That pile question.  Whether tip Miller into mind to
suffer tie songs and crows oh courageous fortune or to gun and Mar it.
  - Haircut''
Misinterpretation of "To be or not to be.." by an early model Newton.
Comment 3 jedgar 2000-01-17 22:17:40 UTC
On Mon, 17 Jan 2000, Matt of the Long Red Hair wrote:

> On Mon, 17 Jan 2000, Chris D. Faulhaber wrote:
> 
> > The script 'sarah' hard-codes the following:
> > 
> > my( $config )     = '/usr/local/etc/sarah.conf';
> > 
> > shouldn't this be configurable through ${PREFIX} ?
> 
> There's no config script for sarah *yet*, unfortunately.  I can look at trying
> to do something funky with the port makefile though, if there's a problem with
> accepting the port this way.
> 

Something like:

do-configure:
	${PERL} -pi.orig -e "s|/usr/local|${PREFIX}|" ${WRKSRC}/sarah

would suffice.  See
http://www.freebsd.org/handbook/porting.html#PORTING-PREFIX for a good
reference WRT PREFIX (and porting.html in general).

-----
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve   -   http://www.FreeBSD.org
Comment 4 Matt of the Long Red Hair 2000-01-17 22:25:35 UTC
On Mon, 17 Jan 2000, Chris D. Faulhaber wrote:

> Something like:
> 
> do-configure:
> 	${PERL} -pi.orig -e "s|/usr/local|${PREFIX}|" ${WRKSRC}/sarah
> 
> would suffice.  See
> http://www.freebsd.org/handbook/porting.html#PORTING-PREFIX for a good
> reference WRT PREFIX (and porting.html in general).

Thanks, I'll check it out.

What should I do about submitting an update?  is there something I can do to
attach it to this gnats ticket, or should I submit an entirely new diff via
send-pr?

------------------------------------------------------------------------------
``Forum, not tone.  That pile question.  Whether tip Miller into mind to
suffer tie songs and crows oh courageous fortune or to gun and Mar it.
  - Haircut''
Misinterpretation of "To be or not to be.." by an early model Newton.
Comment 5 Matt of the Long Red Hair 2000-01-18 00:13:36 UTC
Here's an updated diff of the port which should accomplish what you requested:

diff -ruN sarah.0.1b/Makefile sarah/Makefile
--- sarah.0.1b/Makefile	Mon Jan 10 09:36:52 2000
+++ sarah/Makefile	Mon Jan 17 19:07:55 2000
@@ -1,12 +1,12 @@
 # New ports collection makefile for:	sarah
-# Version required:	0.1b
+# Version required:	0.3b
 # Date created:		10 Jan 2000
 # Whom:				Matthew Pounsett <mattp@conundrum.com>
 #
 # $FreeBSD$
 #
 
-DISTNAME=		sarah-0.1b
+DISTNAME=		sarah-0.3b
 CATEGORIES=		sysutils
 MASTER_SITES=	ftp://ftp.conundrum.com/pub/sarah/
 
@@ -16,6 +16,11 @@
 USE_PERL5=		yes
 NO_BUILD=		yes
 
+do-configure:
+	${PERL} -pi.orig -e \
+		"s|/usr/local/etc/sarah.conf|${PREFIX}/etc/sarah.conf|" \
+		${WRKSRC}/sarah
+
 do-install:
 	cd ${WRKSRC} && \
 		${INSTALL_SCRIPT} sarah ${PREFIX}/bin
@@ -23,5 +28,12 @@
 		${INSTALL_DATA} sarah.conf.sample ${PREFIX}/etc
 	cd ${WRKSRC} && \
 		${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1
+
+post-install:
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${PREFIX}/share/doc/sarah
+	${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/sarah
+	${INSTALL_MAN} ${WRKSRC}/CHANGES ${PREFIX}/share/doc/sarah
+.endif
 
 .include <bsd.port.mk>
diff -ruN sarah.0.1b/files/md5 sarah/files/md5
--- sarah.0.1b/files/md5	Mon Jan 10 09:41:29 2000
+++ sarah/files/md5	Mon Jan 17 18:25:34 2000
@@ -1 +1 @@
-MD5 (sarah-0.1b.tar.gz) = b26ff4543af084ecd76cf65b18caa824
+MD5 (sarah-0.3b.tar.gz) = b3bb9066202d068fe982b5b0565cd30b
diff -ruN sarah.0.1b/pkg/PLIST sarah/pkg/PLIST
--- sarah.0.1b/pkg/PLIST	Mon Jan 10 09:37:03 2000
+++ sarah/pkg/PLIST	Mon Jan 17 02:31:43 2000
@@ -1,2 +1,5 @@
 bin/sarah
 etc/sarah.conf.sample
+share/doc/sarah/README
+share/doc/sarah/CHANGES
+@dirrm share/doc/sarah

------------------------------------------------------------------------------
``Forum, not tone.  That pile question.  Whether tip Miller into mind to
suffer tie songs and crows oh courageous fortune or to gun and Mar it.
  - Haircut''
Misinterpretation of "To be or not to be.." by an early model Newton.
Comment 6 Chris D.Faulhaber freebsd_committer freebsd_triage 2000-01-18 00:32:19 UTC
State Changed
From-To: open->closed

Committed, thanks!