pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

www/unit: add ext.mk for NGINX Unit modules.



Module Name:	pkgsrc-wip
Committed By:	Sergey A. Osokin <osa%FreeBSD.org@localhost>
Pushed By:	osa
Date:		Sun Nov 15 22:12:12 2020 -0500
Changeset:	d45ebd94de36e5419ff2fa0fbf37044904f980c9

Modified Files:
	unit/Makefile.common
	unit/PLIST
Added Files:
	unit/ext.mk

Log Message:
www/unit: add ext.mk for NGINX Unit modules.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d45ebd94de36e5419ff2fa0fbf37044904f980c9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unit/Makefile.common |  3 +++
 unit/PLIST           |  2 +-
 unit/ext.mk          | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 1 deletion(-)

diffs:
diff --git a/unit/Makefile.common b/unit/Makefile.common
index 9e4f069412..39b4a9a3dd 100644
--- a/unit/Makefile.common
+++ b/unit/Makefile.common
@@ -1,7 +1,10 @@
 # $NetBSD$
 #
 # used by www/unit/Makefile
+# used by www/unit-perl/Makefile
 # used by www/unit-php/Makefile
+# used by www/unit-python/Makefile
+# used by www/unit-ruby/Makefile
 
 # Do *not* add any version-specific data here
 
diff --git a/unit/PLIST b/unit/PLIST
index 4d3ae4a459..374d1a10db 100644
--- a/unit/PLIST
+++ b/unit/PLIST
@@ -10,4 +10,4 @@ ${PLIST.devkit}include/nxt_version.h
 ${PLIST.devkit}include/nxt_websocket_header.h
 ${PLIST.devkit}lib/libunit.a
 sbin/unitd
-@pkgdir libexec/unit
+@pkgdir ${UNITEXTDIR}
diff --git a/unit/ext.mk b/unit/ext.mk
new file mode 100644
index 0000000000..acd20047ee
--- /dev/null
+++ b/unit/ext.mk
@@ -0,0 +1,38 @@
+# $NetBSD$
+#
+# NGINX Unit extension package framework, for bundled extensions.
+#
+# Just include this file, define MODNAME, define PKGREVISION if necessary,
+# add dependencies, and add the appropriate --with-configure-arg, then include
+# bsd.pkg.mk.
+#
+# Original idea comes from lang/php/ext.mk.
+
+.if !defined(UNITEXT_MK)
+UNITEXT_MK=	defined
+
+PLIST_SUBST+=	MODNAME=${MODNAME}
+PLIST_SUBST+=	PKGMODNAME=${PKGMODNAME}
+PLIST_SUBST+=	SHLIB_SUFFIX=${SHLIB_SUFFIX}
+PLIST_SUBST+=	PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+
+.if ${OBJECT_FMT} == "SOM"
+SHLIB_SUFFIX=		sl
+.else
+SHLIB_SUFFIX=		so
+.endif
+
+do-build: do-module-build
+
+do-module-build:
+	cd ${WRKSRC} && ${MAKE} ${MODNAME}
+
+do-install: do-module-install
+
+do-module-install:
+	${MKDIR} ${DESTDIR}${PREFIX}/libexec/unit/modules/
+	${INSTALL_LIB} ${WRKSRC}/build/${MODNAME}.unit.so \
+		${DESTDIR}${PREFIX}/libexec/unit/modules/
+
+
+.endif  # PHPEXT_MK


Home | Main Index | Thread Index | Old Index