My First Port

Paul Schmehl pauls at utdallas.edu
Tue Jul 3 20:55:24 UTC 2007


--On Tuesday, July 03, 2007 14:28:34 -0400 "Michael W. Lucas" 
<mwlucas at blackhelicopters.org> wrote:

>
> Hi,
>
> After twelve years in FreeBSD, I've finally come across a piece of
> software that I need that isn't a port already.  The software is
> mod_auth_xradius, for Apache:
>
> http://www.outoforder.cc/projects/apache/mod_auth_xradius/
>
> I went through the porter's guide and made an attempt to build a port.
> I'm sure it's wrong, so I'm not send-pr-ing it yet.  You can find my
> port at:
>
> http://www.blackhelicopters.org/~mwlucas/mod_auth_xradius.tgz
>
> While this program is small, Radius authentication for Web sites is
> one of those things that is absolutely vital for those of us who need
> it.  Having it in-tree would be really nice.
>
> I would appreciate any comments, critiques, etc., before I submit
> this.  (Or, if you ports guys would rather I submit it as-is and then
> tell me all the things I did wrong, I'm OK with that too.)  While I'm
> not a ports guy, I'm willing to try to maintain this.
>
Looks fine to me.  You just need to do a few things to the Makefile:
Right at the top, put:

# New ports collection makefile for:    mod_auth_xradius
# Date created:                         1 Jul 2007
# Whom:                                 mwlucas

$FreeBSD$

portlint -A
WARN: Makefile: [9]: whitespace before end of line.

There should never be any whitespace at the end of lines.

FATAL: Makefile: no "ports collection makefile for" line in comment section.
FATAL: Makefile: no "Whom" line in comment section.
FATAL: Makefile: no "Date created" line in comment section.
FATAL: Makefile: no $FreeBSD$ line in comment section.

I mentioned these above.

WARN: Makefile: only one MASTER_SITE configured.  Consider adding 
additional mirrors.

Not applicable in this case.

WARN: Makefile: "EXTRACT_SUFX" has to appear earlier.

EXTRACT_SUFX should be moved up to right underneath MASTER_SITES, but you 
should really use USE_BZIP2 instead.
USE_BZIP2=      Yes

4 fatal errors and 3 warnings found.

When you're building new ports, run portlint(1) to check them for errors.

ports-mgmt/portlint

Also, this only works with Apache 2.0 or greater, so you should specify 
that:

USE_APACHE=     2.0+

So, your Makefile would look like this instead:

# New ports collection makefile for:    mod_auth_xradius
# Date created:                         1 Jul 2007
# Whom:                                 mwlucas
# $FreeBSD$

PORTNAME=       mod_auth_xradius
PORTVERSION=    0.4.6
CATEGORIES=     www
MASTER_SITES=   http://www.outoforder.cc/downloads/mod_auth_xradius/

MAINTAINER=     mwlucas at FreeBSD.org
COMMENT=        Enables RADIUS authentication

USE_APACHE=   2.0+
USE_BZIP2=      yes

GNU_CONFIGURE=  yes

PLIST_FILES=    libexec/apache22/mod_auth_xradius.so

.include <bds.port.mk>

-- 
Paul Schmehl (pauls at utdallas.edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


More information about the freebsd-ports mailing list