include $(TOPDIR)/rules.mk
PKG_NAME:=beanstalkd
-PKG_VERSION:=1.9
-PKG_RELEASE:=2
-
-# for now, build from latest commit since releases are infrequent and
-# useful fixes trickle in...
-PKG_SOURCE_URL:=https://github.com/kr/beanstalkd.git
-PKG_SOURCE_VERSION:=b7b4a6a14b7e8d096dc8cbc255b23be17a228cbb
-
-PKG_SOURCE_PROTO:=git
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://github.com/beanstalkd/$(PKG_NAME)/archive/refs/tags
+PKG_SOURCE_VERSION:=1.13
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_URL_FILE:=v$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-v$(PKG_VERSION)
-PKG_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c
+PKG_HASH:=26292dcdc0a7011d2f8ad968612f2cd8b2ef07687224876015399ae85e9e5263
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
PKG_LICENSE:=MIT
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -1,17 +1,16 @@
--PREFIX=/usr/local
--BINDIR=$(DESTDIR)$(PREFIX)/bin
--CFLAGS=-Wall -Werror\
-- -Wformat=2\
-- -g\
--
--LDFLAGS=
--OS=$(shell uname|tr A-Z a-z)
--INSTALL=install
--
--VERS=$(shell ./vers.sh)
--TARG=beanstalkd
--MOFILE=main.o
--OFILES=\
-+PREFIX ?= /usr/local
-+BINDIR = $(DESTDIR)$(PREFIX)/bin
-+CFLAGS += -Wall -Werror -Wformat=2 -g
-+LDFLAGS +=
-+LDLIBS ?=
-+
-+OS ?= $(shell uname | tr 'A-Z' 'a-z')
-+INSTALL ?= install
-+
-+VERS = $(shell ./vers.sh)
-+TARG = beanstalkd
-+MOFILE = main.o
-+OFILES = \
- $(OS).o\
- conn.o\
- file.o\
-@@ -29,52 +28,44 @@ OFILES=\
- vers.o\
- walg.o\
-
--TOFILES=\
-+TOFILES = \
- testheap.o\
- testjobs.o\
- testserv.o\
- testutil.o\
-
--HFILES=\
-+HFILES = \
- dat.h\
- sd-daemon.h\
-
- ifeq ($(OS),linux)
--
--LDLIBS=\
-- -lrt\
--
-+ LDLIBS += -lrt
- endif
-
--CLEANFILES=\
-+CLEANFILES = \
- vers.c\
-
--.PHONY: all
- all: $(TARG)
-
- $(TARG): $(OFILES) $(MOFILE)
- $(LINK.o) -o $@ $^ $(LDLIBS)
-
--.PHONY: install
- install: $(BINDIR)/$(TARG)
-
- $(BINDIR)/%: %
- $(INSTALL) -d $(dir $@)
- $(INSTALL) $< $@
-
--CLEANFILES:=$(CLEANFILES) $(TARG)
-+CLEANFILES := $(CLEANFILES) $(TARG)
-
- $(OFILES) $(MOFILE): $(HFILES)
-
--.PHONY: clean
- clean:
- rm -f *.o $(CLEANFILES)
-
--.PHONY: check
- check: ct/_ctcheck
- ct/_ctcheck
-
--.PHONY: bench
- bench: ct/_ctcheck
- ct/_ctcheck -b
-
-@@ -88,11 +79,8 @@ ct/ct.o ct/_ctcheck.o: ct/ct.h ct/intern
-
- $(TOFILES): $(HFILES) ct/ct.h
-
--CLEANFILES:=$(CLEANFILES) ct/_* ct/*.o
-+CLEANFILES += ct/_* ct/*.o
-
--ifneq ($(shell ./verc.sh),$(shell cat vers.c 2>/dev/null))
--.PHONY: vers.c
--endif
- vers.c:
- ./verc.sh >vers.c
-
-@@ -100,3 +88,9 @@ doc/beanstalkd.1 doc/beanstalkd.1.html:
- ronn $<
-
- freebsd.o: darwin.c
-+
-+.PHONY: all install clean check bench
-+
-+ifneq ($(shell ./verc.sh),$(shell cat vers.c 2>/dev/null))
-+.PHONY: vers.c
-+endif
+++ /dev/null
---- a/sd-daemon.c
-+++ b/sd-daemon.c
-@@ -32,7 +32,7 @@
- #include <sys/stat.h>
- #include <sys/socket.h>
- #include <sys/un.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <netinet/in.h>
- #include <stdlib.h>
- #include <errno.h>
+++ /dev/null
---- a/linux.c
-+++ b/linux.c
-@@ -1,4 +1,6 @@
- #define _XOPEN_SOURCE 600
-+#include <unistd.h>
-+#include <sys/types.h>
- #include <stdint.h>
- #include <fcntl.h>
- #include <stdlib.h>
-@@ -19,7 +21,7 @@ static int epfd;
- int
- rawfalloc(int fd, int len)
- {
-- return posix_fallocate(fd, 0, len);
-+ return ftruncate(fd, len);
- }
-
-
--- /dev/null
+--- a/net.c
++++ b/net.c
+@@ -158,7 +158,7 @@ make_unix_socket(char *path)
+ memset(&addr, 0, sizeof(struct sockaddr_un));
+ addr.sun_family = AF_UNIX;
+ if (strlen(path) > maxlen) {
+- warnx("socket path %s is too long (%ld characters), where maximum allowed is %ld",
++ warnx("socket path %s is too long (%zu characters), where maximum allowed is %zu",
+ path, strlen(path), maxlen);
+ return -1;
+ }