Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2006 12:11:44 -0600
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        freebsd-ports@freebsd.org
Cc:        Charles Sprickman <spork@bway.net>
Subject:   Re: [nycbug-talk] creating "local" ports (fwd)
Message-ID:  <790a9fff0611141011q4bd9ee97h9357e6d959f95abb@mail.gmail.com>
In-Reply-To: <k4krBo7Aog@dmeyer.dinoex.sub.org>
References:  <Pine.OSX.4.61.0611031519500.4567@dyn-160-39-250-49.dyn.columbia.edu> <k4krBo7Aog@dmeyer.dinoex.sub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/14/06, Dirk Meyer <dirk.meyer@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.



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