[nycbug-talk] creating "local" ports (fwd)

Scot Hetzel swhetzel at gmail.com
Tue Nov 14 18:11:46 UTC 2006


On 11/14/06, Dirk Meyer <dirk.meyer at dinoex.sub.org> wrote:
> Hallo Charles Sprickman,
>
> > I'm finding that there are a number of ports that we need to patch for
> > some functionality that's unique to our business (qmail, mailfront, etc.).
> > Currently we just do "make patch" and then apply our patches.  This works,
> > but is a bit of a pain to maintain.
> > Is there a way to create a "local" category?  ie: /usr/ports/LOCAL
>
> I like to point out a very easy way:
>
> $ mkdir /usr/ports/LOCAL
> $ echo "PKGCATEGORY?=LOCAL" > /usr/ports/LOCAL/makefile.inc
> $ echo "PKGNAMESUFFIX?=-local" >> /usr/ports/LOCAL/makefile.inc

I found a way where you don't need to set PKGCATEGORY, and allows your
local ports to be included in a 'make index'.

/usr/ports/Makefile.local
# $FreeBSD$
#

SUBDIR+=        local

/usr/ports/local/Makefile
# $FreeBSD$
#

SUBDIR += emulators
SUBDIR += games
SUBDIR += graphics
SUBDIR += net
SUBDIR += security
SUBDIR += textproc
SUBDIR += x11

.include <bsd.port.subdir.mk>

/usr/ports/local/emulators/Makefile
# $FreeBSD$
#

    COMMENT = Local Emulators for other operating systems

    SUBDIR += linux-wine

.include <bsd.port.subdir.mk>

/usr/ports/local/emulators/Makefile.inc
# $FreeBSD$
#
# This file needs to be copied into every local/*/ subdirectory to set
# common variables.

# Used to set the origin of the local port
PKGORIGIN=      local/${PKGCATEGORY}/${PORTDIRNAME}

# Used in the local ports tree to set dependencies on other local ports.
LOCALPORTSDIR=  ${PORTSDIR}/local

#Uncomment if you want your local packages to have a "-local" suffix.
#PGKNAMESUFFIX?= -local

Scot
-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list