Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2005 06:37:11 +0200
From:      Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
To:        Paul Schmehl <pauls@utdallas.edu>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Make problem
Message-ID:  <20050211063711.2bab8a80@it.buh.cameradicommercio.ro>
In-Reply-To: <2147483647.1108068463@[192.168.2.100]>
References:  <2147483647.1108068463@[192.168.2.100]>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Feb 2005 20:47:43 -0600
Paul Schmehl <pauls@utdallas.edu> wrote:


> Here's the port Makefile:
> 
> # New ports collection makefile for:    sancp
> # Date created:                         10 Feb 2005
> # Whom:                                 pauls

Usually you put your name and email here, but it's your choice.

> #
> # $FreeBSD$
> #
> 
> PORTNAME=       sancp
> PORTVERSION=    1.6.1
> CATEGORIES=     security
> MASTER_SITES=   http://www.metre.net/
> MASTER_SITE_SUBDIR=     files

This works now, but it isn't guaranteed. Probably it's better to use
MASTER_SITES=   http://www.metre.net/files/
 
> MAINTAINER=     pauls@utdallas.edu
> COMMENT=        A network connection profiler
> 
> PKGINSTALL=    ${WRKDIR}/pkg-install
> LOG_DIR=        ${LOGDIR}/sancp

I don't see it used anywhere. If you what the user to set it perhaps
it would be good to tell in pre-everything:: and use
LOG_DIR?=	/var/log/snacp

> LIB_DEPENDS+=   libpcap:/usr/lib/libpcap.a
> 
> USE_REINPLACE=  yes
> USE_RC_SUBR=    yes
> RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
> 
> DOCS=           AUTHORS COPYING LICENSE.QPL README docs/BUGS docs/ChangeLog \
>                 docs/FAQ docs/INSTALL docs/NEWS docs/USAGE

Using PORTDOCS=	..... will simplify the pkg-plist.

> .include <bsd.port.pre.mk>
> 
> post-patch:
>         @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
>                 ${FILESDIR}/sancp.sh > ${WRKDIR}/sancp.sh
> 
> post-install:
>         ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/sancp.sh  ${PREFIX}/etc/rc.d/sancp.sh

Does this work ? It translates to install  -o root -g wheel -m 555 -m 751

> .for f in sancp.conf
>         ${INSTALL_DATA} ${WRKSRC}/etc/sancp/${f} ${PREFIX}/etc/${f}-sample
>         [ -f ${PREFIX}/etc/${f} ] || \
>         ${INSTALL_DATA} ${WRKSRC}/etc/sancp/${f} ${PREFIX}/etc/${f}
> .endfor

Why .for if it's one file ? The problem with this is that you don't know
if sancp.conf is installed or not and you'll receive a nice email from
pointyhat. See mail/dspam for the way to do it in pkg-plist

> .if !defined(NOPORTDOCS)
>         @${MKDIR} ${DOCSDIR}
>         cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
> .endif
>         @${CAT} ${PKGMESSAGE}
> 
> .include <bsd.port.post.mk>


-- 
IOnut
Unregistered ;) FreeBSD "user"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050211063711.2bab8a80>