On Tue, Sep 1, 2009 at 7:36 PM, Stuart Henderson<st...@openbsd.org> wrote:

> you can set a "do-install:" target in the port Makefile. if you look
> around the ports tree you'll find plenty of examples.

Thanks Stuart for the advice. I have two more questions. The
do-install section below works fine... is that an acceptable way to
use do install? The program does not come with a man page, so I wrote
one and placed it in patches (even though it's not really a patch).
However, post-install will not copy it to /usr/local/man/man1. Any
final tips at all? I'm open to changing anything. Here's my whole
Makefile:


# $OpenBSD: Makefile.template,v 1.55 2008/08/23 15:28:00 ajacoutot Exp $
# $FreeBSD/NetBSD: credit FreeBSD/NetBSD if thats where the port came from $

# Original from: John Walker http://www.fourmilab.ch/random/
VERSION=                1.0
CATEGORIES=             misc
COMMENT=                pseudo random number sequence test program
DISTNAME=               ent-${VERSION}
EXTRACT_SUFX=           .zip
PKGNAME=                ${DISTNAME}
HOMEPAGE=               http://www.fourmilab.ch/random/
MAINTAINER=             Brad Tilley <b...@16systems.com>
MASTER_SITES=           http://16systems.com/ent/
BUILD_DEPENDS=          :unzip-*:archivers/unzip
WRKSRC=                 ${WRKDIR}
ALL_TARGET=             ent

# This software has been placed in the Public Domain by the author.
PERMIT_PACKAGE_CDROM=           Yes
PERMIT_PACKAGE_FTP=             Yes
PERMIT_DISTFILES_CDROM=         Yes
PERMIT_DISTFILES_FTP=           Yes

WANTLIB += c m

do-install:
        @cp ${WRKDIR}/ent ${PREFIX}/bin/ent
        @chmod 755 ${PREFIX}/bin/ent

post-install:
        @cp patches/ent.1 ${PREFIX}/man/man1/
        @chmod 444 ${PREFIX}/man/man1/ent.1

.include <bsd.port.mk>

Reply via email to