From f1327f8f77684c05e82a2e278a0f97d92b4a20f8 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Thu, 29 Dec 2011 22:02:54 +0000 Subject: [PATCH] Update to version 0.2.8 PR: ports/163067 Submitted by: toddnni Approved by: maintainer with slight improvement --- audio/umurmur/Makefile | 24 ++++++++++--------- audio/umurmur/distinfo | 4 ++-- audio/umurmur/files/patch-Makefile | 15 ------------ .../files/{patch-conf.c => patch-src-conf.c} | 23 ++++++------------ audio/umurmur/files/patch-src-conf.h | 11 +++++++++ audio/umurmur/files/umurmur.in | 4 +++- audio/umurmur/pkg-plist | 2 +- 7 files changed, 37 insertions(+), 46 deletions(-) delete mode 100644 audio/umurmur/files/patch-Makefile rename audio/umurmur/files/{patch-conf.c => patch-src-conf.c} (50%) create mode 100644 audio/umurmur/files/patch-src-conf.h diff --git a/audio/umurmur/Makefile b/audio/umurmur/Makefile index 56957c35c05c..e6829c56e7ba 100644 --- a/audio/umurmur/Makefile +++ b/audio/umurmur/Makefile @@ -6,36 +6,38 @@ # PORTNAME= umurmur -PORTVERSION= 0.2.6 -PORTREVISION= 1 +PORTVERSION= 0.2.8 CATEGORIES= audio net MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} MAINTAINER= ayu@commun.jp COMMENT= Minimalistic Murmur (Mumble server) -LIB_DEPENDS= config.10:${PORTSDIR}/devel/libconfig +LIB_DEPENDS= config.10:${PORTSDIR}/devel/libconfig \ + protobuf-c.0:${PORTSDIR}/devel/protobuf-c USE_GMAKE= yes +GNU_CONFIGURE= yes USE_OPENSSL= yes +CONFIGURE_ARGS= --with-ssl=openssl USE_RC_SUBR= umurmur -MAKE_ENV+= TARGET_ARCH= +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib .include -do-build: - @(cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} all) - pre-su-install: @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL -pre-install: - @${SED} -i '' -e 's|"/etc/|"${PREFIX}/etc/|' ${WRKSRC}/umurmur.conf.example +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/conf.h + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/conf.c + @${REINPLACE_CMD} \ + -e 's|/etc/|${PREFIX}/etc/|g' ${WRKSRC}/umurmur.conf.example -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/umurmurd ${PREFIX}/sbin +post-install: @${MKDIR} ${PREFIX}/etc/umurmur @${INSTALL_DATA} ${WRKSRC}/umurmur.conf.example ${PREFIX}/etc/umurmur/umurmur.conf.sample @if [ ! -f ${PREFIX}/etc/umurmur/umurmur.conf ]; then \ diff --git a/audio/umurmur/distinfo b/audio/umurmur/distinfo index 4bbd70692493..5fc0efaccf71 100644 --- a/audio/umurmur/distinfo +++ b/audio/umurmur/distinfo @@ -1,2 +1,2 @@ -SHA256 (umurmur-0.2.6.tar.gz) = b1f237191ea1db7890be86bc3ebe562570901d8bd58bc53d9ecee0a3f4be38cb -SIZE (umurmur-0.2.6.tar.gz) = 86014 +SHA256 (umurmur-0.2.8.tar.gz) = 62c43da2f07125977cf8024a0775ed697101816c3fa8f36345780901aaf08736 +SIZE (umurmur-0.2.8.tar.gz) = 155357 diff --git a/audio/umurmur/files/patch-Makefile b/audio/umurmur/files/patch-Makefile deleted file mode 100644 index 4e4b179314f8..000000000000 --- a/audio/umurmur/files/patch-Makefile +++ /dev/null @@ -1,15 +0,0 @@ ---- src/Makefile.orig 2011-02-24 13:06:56.000000000 +0900 -+++ src/Makefile 2011-02-24 13:07:54.000000000 +0900 -@@ -25,9 +25,10 @@ - # OpenSSL - usually installed at a standard place - # EXTRA_CFLAGS:= - # EXTRA_LDFLAGS:=-lcrypto -lssl -+EXTRA_LDFLAGS:=-lcrypto -lssl - --CFLAGS:=$(CFLAGS) -I. -Wall $(EXTRA_CFLAGS) --LDFLAGS:=$(EXTRA_LDFLAGS) $(LDFLAGS) -lconfig -+CFLAGS:=$(CFLAGS) -I. -I/usr/local/include -Wall $(EXTRA_CFLAGS) -+LDFLAGS:=$(EXTRA_LDFLAGS) $(LDFLAGS) -L/usr/local/lib -lconfig - - umurmurd:google/protobuf-c/libprotobuf_c.a $(OBJS) - $(CC) $(LDFLAGS) $(OBJS) $(SSL_LIB) google/protobuf-c/libprotobuf_c.a -o umurmurd diff --git a/audio/umurmur/files/patch-conf.c b/audio/umurmur/files/patch-src-conf.c similarity index 50% rename from audio/umurmur/files/patch-conf.c rename to audio/umurmur/files/patch-src-conf.c index a1ec098a543f..2f3e1a9440e9 100644 --- a/audio/umurmur/files/patch-conf.c +++ b/audio/umurmur/files/patch-src-conf.c @@ -1,39 +1,30 @@ ---- src/conf.c.orig 2011-02-24 13:16:42.000000000 +0900 -+++ src/conf.c 2011-02-24 13:17:50.000000000 +0900 -@@ -40,7 +40,7 @@ - - static config_t configuration; - --#define DEFAULT_CONFIG "/etc/umurmur.conf" -+#define DEFAULT_CONFIG "/usr/local/etc/umurmur/umurmur.conf" - #define DEFAULT_WELCOME "Welcome to uMurmur!" - #define DEFAULT_MAX_CLIENTS 10 - #define DEFAULT_MAX_BANDWIDTH 48000 -@@ -73,23 +73,23 @@ +--- src/conf.c.old 2011-12-04 19:11:54.718388035 +0200 ++++ src/conf.c 2011-12-04 19:13:08.845299535 +0200 +@@ -87,23 +87,23 @@ case CERTIFICATE: setting = config_lookup(&configuration, "certificate"); if (!setting) - return "/etc/umurmur/certificate.crt"; -+ return "/usr/local/etc/umurmur/certificate.crt"; ++ return "%%PREFIX%%/etc/umurmur/certificate.crt"; else { if ((strsetting = config_setting_get_string(setting)) != NULL) return strsetting; else - return "/etc/umurmur/certificate.crt"; -+ return "/usr/local/etc/umurmur/certificate.crt"; ++ return "%%PREFIX%%/etc/umurmur/certificate.crt"; } break; case KEY: setting = config_lookup(&configuration, "private_key"); if (!setting) - return "/etc/umurmur/private_key.key"; -+ return "/usr/local/etc/umurmur/private_key.key"; ++ return "%%PREFIX%%/etc/umurmur/private_key.key"; else { if ((strsetting = config_setting_get_string(setting)) != NULL) return strsetting; else - return "/etc/umurmur/private_key.key"; -+ return "/usr/local/etc/umurmur/private_key.key"; ++ return "%%PREFIX%%/etc/umurmur/private_key.key"; } break; case PASSPHRASE: diff --git a/audio/umurmur/files/patch-src-conf.h b/audio/umurmur/files/patch-src-conf.h new file mode 100644 index 000000000000..06ae66d2ef86 --- /dev/null +++ b/audio/umurmur/files/patch-src-conf.h @@ -0,0 +1,11 @@ +--- src/conf.h.old 2011-12-04 19:11:49.751119971 +0200 ++++ src/conf.h 2011-12-04 19:13:32.677786798 +0200 +@@ -33,7 +33,7 @@ + + #include "messages.h" + +-#define DEFAULT_CONFIG "/etc/umurmur.conf" ++#define DEFAULT_CONFIG "%%PREFIX%%/etc/umurmur/umurmur.conf" + + typedef enum param { + CERTIFICATE, diff --git a/audio/umurmur/files/umurmur.in b/audio/umurmur/files/umurmur.in index 3a19eadc08cd..64d14b04a528 100644 --- a/audio/umurmur/files/umurmur.in +++ b/audio/umurmur/files/umurmur.in @@ -11,6 +11,8 @@ # # umurmur_enable (bool): Set to NO by default. # Set it to YES to enable umurmur. +# umurmur_user (str): Set to "umurmur" by default. +# Set to change user account. # umurmur_flags (str): Set to "" by default. # Extra flags passed to start command. # @@ -28,7 +30,7 @@ rcvar=${name}_enable # pidfile pidfile="/var/run/umurmur/umurmur.pid" -command="%%PREFIX%%/sbin/umurmurd" +command="%%PREFIX%%/bin/umurmurd" command_args="-p ${pidfile}" load_rc_config $name diff --git a/audio/umurmur/pkg-plist b/audio/umurmur/pkg-plist index af7c7744f0ee..547dbb841a8e 100644 --- a/audio/umurmur/pkg-plist +++ b/audio/umurmur/pkg-plist @@ -3,5 +3,5 @@ @unexec if cmp -s %D/etc/umurmur/umurmur.conf.sample %D/etc/umurmur/umurmur.conf; then rm -f %D/etc/umurmur/umurmur.conf; fi etc/umurmur/umurmur.conf.sample @exec if [ ! -f %D/etc/umurmur/umurmur.conf ] ; then cp -p %D/%F %B/umurmur/umurmur.conf; fi -sbin/umurmurd +bin/umurmurd @dirrmtry etc/umurmur