Your own port in the FreeBSD ports tree

Creating your own port in the FreeBSD ports tree makes 3rd party software maintenance at lot easier.

If you have a whole bunch of computers it might make sense to gather all common ports in one base port, create role ports that depend on the base port, and finally create ports specific to each computer, depending on the relevant role ports.

Change XYZ into a prefix unique to your organization to avoid potential name clash.

# $XYZ$

SUBDIR+=        local
# $XYZ$

COMMENT=        Local software

SUBDIR+=        xyz-computername

.include <bsd.port.subdir.mk>
# $XYZ$
# $FreeBSD: head/x11/xorg/Makefile 336621 2013-12-16 11:11:09Z zeising $

PORTNAME=               xyz-computername
PORTVERSION=            1
PORTREVISION=           0
CATEGORIES=             local
VALID_CATEGORIES+=      local
MASTER_SITES=           # none
DISTFILES=              # none
EXTRACT_ONLY=           # none

MAINTAINER=             hostmaster@example.org
COMMENT=                Software needed at computername.example.org running FreeBSD/amd64 stable/9

NO_BUILD=               yes
NO_MTREE=               yes

# Software for updating/upgrading OS and 3rd party sw on stable/10 and head
#RUN_DEPENDS+=           \
#                        pkg>0:${PORTSDIR}/ports-mgmt/pkg \
#                        dialog4ports>0:${PORTSDIR}/ports-mgmt/dialog4ports \
#                        portupgrade>0:${PORTSDIR}/ports-mgmt/portupgrade \
#                        subversion>0:${PORTSDIR}/devel/subversion \

# EOL

# Software for updating/upgrading OS and 3rd party sw on stable/8 and stable/9
RUN_DEPENDS+=           \
                        dialog4ports>0:${PORTSDIR}/ports-mgmt/dialog4ports \
                        portupgrade>0:${PORTSDIR}/ports-mgmt/portupgrade \
                        portaudit>0:${PORTSDIR}/ports-mgmt/portaudit \
                        subversion>0:${PORTSDIR}/devel/subversion \

# EOL

# Software for comfy tty experience
RUN_DEPENDS+=           \
                        bash>0:${PORTSDIR}/shells/bash \
                        mc>0:${PORTSDIR}/misc/mc \
                        screen>0:${PORTSDIR}/sysutils/screen \

# EOL

# Software for sysadmin tasks
RUN_DEPENDS+=           \
                        parallel>0:${PORTSDIR}/sysutils/parallel \
                        psmisc>0:${PORTSDIR}/sysutils/psmisc \
                        smartmontools>0:${PORTSDIR}/sysutils/smartmontools \
                        htop>0:${PORTSDIR}/sysutils/htop \
                        vpnc>0:${PORTSDIR}/security/vpnc \

# EOL

# Software specific for this model
RUN_DEPENDS+=           \
                        bwn-firmware-kmod>0:${PORTSDIR}/net/bwn-firmware-kmod \

# EOL

# Software for X11
RUN_DEPENDS+=           \
                        xorg>0:${PORTSDIR}/x11/xorg \
                        xdm>0:${PORTSDIR}/x11/xdm \
                        blackbox>0:${PORTSDIR}/x11-wm/blackbox \
                        bbkeys>0:${PORTSDIR}/x11-wm/bbkeys \
                        bbpager>0:${PORTSDIR}/x11-wm/bbpager \
                        bbmail>0:${PORTSDIR}/mail/bbmail \
                        gkrellm2>0:${PORTSDIR}/sysutils/gkrellm2 \
                        xlockmore>0:${PORTSDIR}/x11/xlockmore \
                        xscreensaver>0:${PORTSDIR}/x11/xscreensaver \
                        opera>0:${PORTSDIR}/www/opera \
                        firefox-i18n>0:${PORTSDIR}/www/firefox-i18n \
                        wireshark>0:${PORTSDIR}/net/wireshark \
                        emacs24>0:${PORTSDIR}/editors/emacs \
                        gimp>0:${PORTSDIR}/graphics/gimp \
                        rdesktop>0:${PORTSDIR}/net/rdesktop \
                        ddd>0:${PORTSDIR}/devel/ddd \

# EOL

do-install:     # empty

.include <bsd.port.pre.mk>

.if make(package)
.if !defined(DEPENDS_TARGET:Mpackage) || empty(DEPENDS_TARGET:Mpackage)
DEPENDS_TARGET="package"
.endif
.endif

.include <bsd.port.post.mk>

PKGORIGIN=  ${CATEGORIES}/${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}

# EOF
Software needed at computername.example.org running FreeBSD/amd64 stable/9
@comment This packing list left intentionally empty