pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/beanstalkd
Module Name: pkgsrc
Committed By: khorben
Date: Thu Mar 18 22:54:53 UTC 2021
Added Files:
pkgsrc/net/beanstalkd: DESCR Makefile PLIST distinfo
pkgsrc/net/beanstalkd/files: beanstalkd.sh
pkgsrc/net/beanstalkd/patches: patch-Makefile patch-darwin.c
Log Message:
beanstalkd: import version 1.12
Beanstalk is a simple, fast work queue. Its interface is generic, but was
originally designed for reducing the latency of page views in high-volume web
applications by running time-consuming tasks asynchronously.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/beanstalkd/DESCR \
pkgsrc/net/beanstalkd/Makefile pkgsrc/net/beanstalkd/PLIST \
pkgsrc/net/beanstalkd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/beanstalkd/files/beanstalkd.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/beanstalkd/patches/patch-Makefile \
pkgsrc/net/beanstalkd/patches/patch-darwin.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/net/beanstalkd/DESCR
diff -u /dev/null pkgsrc/net/beanstalkd/DESCR:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/DESCR Thu Mar 18 22:54:52 2021
@@ -0,0 +1,3 @@
+Beanstalk is a simple, fast work queue. Its interface is generic, but was
+originally designed for reducing the latency of page views in high-volume web
+applications by running time-consuming tasks asynchronously.
Index: pkgsrc/net/beanstalkd/Makefile
diff -u /dev/null pkgsrc/net/beanstalkd/Makefile:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/Makefile Thu Mar 18 22:54:52 2021
@@ -0,0 +1,45 @@
+# $NetBSD: Makefile,v 1.1 2021/03/18 22:54:52 khorben Exp $
+
+DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV}
+PKGNAME= ${GITHUB_PROJECT}-1.12
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=kr/}
+GITHUB_PROJECT= beanstalkd
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://kr.github.io/beanstalkd/
+COMMENT= Simple, fast work queue
+LICENSE= mit
+
+USE_TOOLS+= gmake
+
+B_MANDIR= ${PKGMANDIR}/man1
+B_DOCDIR= share/doc/${PKGBASE}
+RCD_SCRIPTS+= beanstalkd
+INSTALLATION_DIRS+= ${B_MANDIR} ${B_DOCDIR} share/examples/rc.d
+
+PKG_GROUPS_VARS+= BEANSTALKD_GROUP
+PKG_USERS_VARS= BEANSTALKD_USER
+BUILD_DEFS+= BEANSTALKD_USER BEANSTALKD_GROUP BEANSTALKD_HOME VARBASE
+BEANSTALKD_USER?= beanstalkd
+FILES_SUBST+= BEANSTALK_USER=${BEANSTALKD_USER}
+BEANSTALKD_GROUP?= beanstalkd
+BEANSTALKD_HOME?= ${VARBASE}/chroot/beanstalkd
+PKG_HOME.beanstalkd?= ${BEANSTALKD_HOME}
+PLIST_SUBST+= BEANSTALK_HOME=${BEANSTALKD_HOME}
+PKG_GROUPS= ${BEANSTALKD_GROUP}
+PKG_GECOS.beanstalkd= beanstalk daemon
+PKG_USERS= ${BEANSTALKD_USER}:${BEANSTALKD_GROUP}
+OWN_DIRS_PERMS+= ${PKG_HOME.beanstalkd} ${PKG_USERS:S/:/ /1} 0700
+
+post-patch:
+ ${CP} ${WRKSRC}/freebsd.c ${WRKSRC}/netbsd.c
+
+post-install:
+ ${INSTALL_MAN} ${WRKSRC}/doc/beanstalkd.1 \
+ ${DESTDIR}${PREFIX}/${B_MANDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/protocol.txt \
+ ${DESTDIR}${PREFIX}/${B_DOCDIR}
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/beanstalkd/PLIST
diff -u /dev/null pkgsrc/net/beanstalkd/PLIST:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/PLIST Thu Mar 18 22:54:52 2021
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2021/03/18 22:54:52 khorben Exp $
+bin/beanstalkd
+man/man1/beanstalkd.1
+share/doc/beanstalkd/protocol.txt
+share/examples/rc.d/beanstalkd
Index: pkgsrc/net/beanstalkd/distinfo
diff -u /dev/null pkgsrc/net/beanstalkd/distinfo:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/distinfo Thu Mar 18 22:54:52 2021
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2021/03/18 22:54:52 khorben Exp $
+
+SHA1 (beanstalkd-1.12.tar.gz) = 09a6cbd7766f54875ee9b709ca64e245e58350c9
+RMD160 (beanstalkd-1.12.tar.gz) = 7d211fe9585c777dc988acc0ad8a754e20e7ad75
+SHA512 (beanstalkd-1.12.tar.gz) = 347f8cf29501d4bf1a01a472f8f6265d1211eadfaa4e5626c8fcab5b1f8116e1e0ddee2a0c82ac116ee60655a2e3b514d254f98c2154be76109a24d77f7d8210
+Size (beanstalkd-1.12.tar.gz) = 79592 bytes
+SHA1 (patch-Makefile) = bc96a1028ac2666f348ac842d4b39e7047f12340
+SHA1 (patch-darwin.c) = 83db9922d20d12cff4f99c5214a45ffdc17285c2
Index: pkgsrc/net/beanstalkd/files/beanstalkd.sh
diff -u /dev/null pkgsrc/net/beanstalkd/files/beanstalkd.sh:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/files/beanstalkd.sh Thu Mar 18 22:54:52 2021
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $NetBSD: beanstalkd.sh,v 1.1 2021/03/18 22:54:52 khorben Exp $
+#
+# beanstalkd - simple, fast work queue daemon
+#
+# PROVIDE: beanstalkd
+# REQUIRE: DAEMON NETWORKING SERVERS
+#
+# You will need to set some variables in @PKG_SYSCONFDIR@/rc.conf to start beanstalkd:
+#
+# beanstalkd=YES
+
+. /etc/rc.subr
+
+name="beanstalkd"
+rcvar=${name}
+beanstalkd_user="@BEANSTALK_USER@"
+beanstalkd_host="127.0.0.1"
+beanstalkd_port="11300"
+start_cmd="beanstalkd_start"
+restart_cmd="beanstalkd_stop ; beanstalkd_start"
+stop_cmd="beanstalkd_stop"
+command="@PREFIX@/bin/${name}"
+command_args="-u ${beanstalkd_user} -l ${beanstalkd_host} -p ${beanstalkd_port}"
+
+beanstalkd_start()
+{
+ ${command} ${command_args} &
+}
+
+beanstalkd_stop()
+{
+ pkill -u @BEANSTALK_USER@ 2>/dev/null
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ eval ${start_cmd}
+fi
Index: pkgsrc/net/beanstalkd/patches/patch-Makefile
diff -u /dev/null pkgsrc/net/beanstalkd/patches/patch-Makefile:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/patches/patch-Makefile Thu Mar 18 22:54:52 2021
@@ -0,0 +1,12 @@
+$NetBSD: patch-Makefile,v 1.1 2021/03/18 22:54:52 khorben Exp $
+
+Fix NetBSD support.
+
+--- Makefile.orig 2020-06-04 19:54:32.000000000 +0000
++++ Makefile
+@@ -120,3 +120,5 @@ doc/beanstalkd.1 doc/beanstalkd.1.html:
+ ronn $<
+
+ freebsd.o: darwin.c
++
++netbsd.o: darwin.c
Index: pkgsrc/net/beanstalkd/patches/patch-darwin.c
diff -u /dev/null pkgsrc/net/beanstalkd/patches/patch-darwin.c:1.1
--- /dev/null Thu Mar 18 22:54:53 2021
+++ pkgsrc/net/beanstalkd/patches/patch-darwin.c Thu Mar 18 22:54:52 2021
@@ -0,0 +1,32 @@
+$NetBSD: patch-darwin.c,v 1.1 2021/03/18 22:54:52 khorben Exp $
+
+Fix casting errors.
+
+--- darwin.c.orig 2014-08-05 03:39:54.000000000 +0000
++++ darwin.c
+@@ -79,7 +79,11 @@ sockwant(Socket *s, int rw)
+ ev->data = Infinity;
+ }
+ ev->flags = EV_ADD;
+- ev->udata = s;
++#if defined(__NetBSD__)
++ ev->udata = (intptr_t) s;
++#else
++ ev->udata = s;
++#endif
+ s->added = ev->filter;
+ ev++;
+ n++;
+@@ -105,7 +109,11 @@ socknext(Socket **s, int64 timeout)
+ }
+
+ if (r > 0) {
+- *s = ev.udata;
++#if defined(__NetBSD__)
++ *s = (Socket *) ev.udata;
++#else
++ *s = ev.udata;
++#endif
+ if (ev.flags & EV_EOF) {
+ return 'h';
+ }
Home |
Main Index |
Thread Index |
Old Index