Hi,
hope you're doing well these days.
I'm working on creation a port for the NGINX Unit,
https://unit.nginx.org.
I've created Makefile for unitd, main binary, the daemon.
It's attached.
Next step is to create additional packages of Unit's modules: perl,
php, python, and ruby. So, I need your help on that.
On FreeBSD and NetBSD we have separate ports/packages for the languages.
To configure a module for Unit the configure script needs to be run
twice:
1. to configure unit daemon
2. to configure a unit module
Could you guide me about best practices in this case.
Should I create a separate port for every language?
Or it's possible to define all packages in one big Makefile?
Thank you.
--
Sergey Osokin
# $OpenBSD$
COMMENT= Dynamic web application server
VERSION= 1.25.0
DISTNAME= unit-${VERSION}
PKGNAME= ${DISTNAME}
CATEGORIES= www
HOMEPAGE= https://unit.nginx.org
MAINTAINER= Sergey A. Osokin <[email protected]>
PERMIT_PACKAGE= Yes
WANTLIB= c crypto pcre2-8 ssl z
MASTER_SITES= https://unit.nginx.org/download/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
COMPILER= base-clang ports-gcc
COMPILER_LANGS= c
LIB_DEPENDS= devel/pcre2
CONFIGURE_STYLE = simple
UNIT_DIR= /var/unit
SUBST_VARS= UNIT_DIR
CFLAGS+= -I ${LOCALBASE}/include
LDFLAGS+= -L ${LOCALBASE}/lib
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS = --prefix=${UNIT_DIR} \
--bindir=${PREFIX}/bin \
--sbindir=${PREFIX}/sbin \
--libdir=${PREFIX}/lib \
--incdir=${PREFIX}/include \
--mandir=${PREFIX}/man \
--modules=${UNIT_DIR}/modules \
--log=logs/unit.log \
--pid=/var/run/unit.pid \
--openssl \
--user=unit \
--group=unit
NO_TEST= Yes
post-install:
${INSTALL_DATA_DIR} ${WRKINST}${UNIT_DIR}
${INSTALL_DATA_DIR} ${WRKINST}${UNIT_DIR}/modules
${INSTALL_DATA_DIR} ${WRKINST}${UNIT_DIR}/state
.include <bsd.port.mk>