aafe61e7b7
PR: 192881 Submitted by: Chris Hutchinson I am sure many people wanted to see this port die, but Chris wanted to save it. Unfortunately his PR only contained about 2% of the work needed to properly stage it. I had to overhaul it with the changes to numerous to recount. Some big ticket items: converted to OptionsNG the EMACS and CLIENT_ONLY knobs (the ability to define the exact EMACS version is lost, it just takes the default. There are only 2 EMACS versions anyway). The chown/mode changes where moved from vendor makefile to pkg-plist. I also leveraged @sample keyword for the two conf files.
109 lines
2.8 KiB
Makefile
109 lines
2.8 KiB
Makefile
# Created by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= gnats
|
|
PORTVERSION= 4.1.0
|
|
PORTREVISION= 3
|
|
CATEGORIES= databases devel
|
|
MASTER_SITES= ${MASTER_SITE_GNU}
|
|
MASTER_SITE_SUBDIR= gnats
|
|
PKGNAMESUFFIX= 4
|
|
|
|
MAINTAINER= portmaster@bsdforge.com
|
|
COMMENT= GNATS, the GNU Problem Report Management System
|
|
|
|
GNU_CONFIGURE= yes
|
|
USES= gmake makeinfo
|
|
USE_GCC= any
|
|
USERS= gnats
|
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
|
|
|
.ifdef WANT_FREEFALL_CFG
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-*
|
|
GNATSDBDIR= ${DATADIR}
|
|
CONFIGURE_ARGS+= --with-gnats-default-db=${GNATSDBDIR}/gnats-db
|
|
WITH_SUBMITTER_ID= current-users
|
|
WITH_ORGANIZATION= FreeBSD
|
|
WITH_GNATSD_SERVICE= support
|
|
.endif
|
|
|
|
GNATSDBDIR?= /var/db/gnats
|
|
|
|
CONFIGURE_ARGS+= --sharedstatedir=${GNATSDBDIR}
|
|
|
|
.ifdef WITH_SUBMITTER_ID
|
|
CONFIGURE_ARGS+= --with-submitter=${WITH_SUBMITTER_ID}
|
|
.endif
|
|
|
|
.ifdef WITH_ORGANIZATION
|
|
CONFIGURE_ARGS+= --with-organization=${WITH_ORGANIZATION:Q}
|
|
.endif
|
|
|
|
.ifdef WITH_GNATSD_SERVICE
|
|
CONFIGURE_ARGS+= --with-gnats-service=${WITH_GNATSD_SERVICE}
|
|
.endif
|
|
|
|
PLIST_SUB= GNATSDBDIR=${GNATSDBDIR}
|
|
INFO= gnats-faq gnats
|
|
PORTDOCS= NEWS UPGRADING
|
|
|
|
OPTIONS_DEFINE= DOCS EMACS SERVER
|
|
OPTIONS_DEFAULT=SERVER
|
|
OPTIONS_SUB= yes
|
|
EMACS_USE= EMACS=yes
|
|
EMACS_DESC= Add support for default version of EMACS
|
|
SERVER_DESC= Install the gnats server too
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ! ${PORT_OPTIONS:MSERVER}
|
|
ALL_TARGET= all-tools
|
|
INSTALL_TARGET= install-tools
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MEMACS}
|
|
CONFIGURE_ARGS+=--with-lispdir=${LOCALBASE}/${EMACS_SITE_LISPDIR}
|
|
.else
|
|
PLIST_SUB+= EMACS_SITE_LISPDIR="@comment "
|
|
.endif
|
|
|
|
pre-everything::
|
|
.if !defined(PACKAGE_BUILDING) && !defined(WANT_FREEFALL_CFG)
|
|
@${ECHO} "============================================================="
|
|
@${ECHO}
|
|
@${ECHO} "You can build ${PKGNAME} with the following options:"
|
|
@${ECHO}
|
|
@${ECHO} "WITH_SUBMITTER_ID=unknown default submitter-id"
|
|
@${ECHO} "WITH_ORGANIZATION='unknown' default organization"
|
|
@${ECHO} "WITH_GNATSD_SERVICE=support default gnatsd port name"
|
|
@${ECHO}
|
|
@${ECHO} "============================================================="
|
|
@${ECHO}
|
|
.endif
|
|
|
|
pre-configure:
|
|
@${ECHO_CMD} 'RELEASE_TAG="\`uname -srm\`"' > ${WRKSRC}/release-info
|
|
|
|
post-build:
|
|
@for doc in pkg-message pkg-install; do \
|
|
${SED} -e 's,%%PREFIX%%,${STAGEDIR}${PREFIX},g' \
|
|
-e 's,%%GNATSDBDIR%%,${GNATSDBDIR},g' \
|
|
${PKGDIR}/$${doc} >${WRKDIR}/$${doc}; \
|
|
done
|
|
|
|
pre-install:
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/gnats
|
|
|
|
post-install:
|
|
.if ${PORT_OPTIONS:MSERVER}
|
|
${MV} ${STAGEDIR}${ETCDIR}/databases.default \
|
|
${STAGEDIR}${ETCDIR}/databases.sample
|
|
${MV} ${STAGEDIR}${ETCDIR}/gnatsd.host_access.default \
|
|
${STAGEDIR}${ETCDIR}/gnatsd.host_access.sample
|
|
.endif
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
|
|
|
|
.include <bsd.port.mk>
|