diff options
author | Sergey Skvortsov <skv@FreeBSD.org> | 2011-06-08 17:13:12 +0000 |
---|---|---|
committer | Sergey Skvortsov <skv@FreeBSD.org> | 2011-06-08 17:13:12 +0000 |
commit | 572af21f20beee0b033e95ce67661b12347ba1eb (patch) | |
tree | 619c936af5676e069c2d02171185040cacbc9900 /databases/pgbouncer | |
parent | e736e2808f26bf1583357e247c1404b6bb58d1b3 (diff) |
Notes
Diffstat (limited to 'databases/pgbouncer')
-rw-r--r-- | databases/pgbouncer/Makefile | 33 | ||||
-rw-r--r-- | databases/pgbouncer/distinfo | 4 | ||||
-rw-r--r-- | databases/pgbouncer/files/patch-lib-usual-endian.h | 32 | ||||
-rw-r--r-- | databases/pgbouncer/files/pkg-deinstall.in | 11 | ||||
-rw-r--r-- | databases/pgbouncer/files/pkg-install.in | 80 |
5 files changed, 16 insertions, 144 deletions
diff --git a/databases/pgbouncer/Makefile b/databases/pgbouncer/Makefile index e93541923f44..a4ceb002b1db 100644 --- a/databases/pgbouncer/Makefile +++ b/databases/pgbouncer/Makefile @@ -6,9 +6,9 @@ # PORTNAME= pgbouncer -PORTVERSION= 1.4 +PORTVERSION= 1.4.1 CATEGORIES= databases -MASTER_SITES= http://pgfoundry.org/frs/download.php/2912/ +MASTER_SITES= http://pgfoundry.org/frs/download.php/2987/ MAINTAINER= skv@FreeBSD.org COMMENT= Lightweight connection pooler for PostgreSQL @@ -17,6 +17,9 @@ LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent PORTSCOUT= site:http://pgfoundry.org/frs/?group_id=1000258 +USERS= pgbouncer +GROUPS= pgbouncer + USE_RC_SUBR= pgbouncer.sh SUB_FILES= pkg-message pkg-install pkg-deinstall @@ -29,6 +32,8 @@ MAN5= pgbouncer.5 .endif CONFIGURE_ARGS= --with-libevent=${LOCALBASE} +CONFIGURE_ENV+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \ + PTHREAD_LIBS=${PTHREAD_LIBS} PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-deinstall @@ -44,28 +49,8 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed .include <bsd.port.pre.mk> -# Parse ${PORTSDIR}/UIDs and GIDs for the defaults -USER!= ${GREP} -E '^${PGBOUNCER_USER}:' ${PORTSDIR}/UIDs | \ - ${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):([^:]*)::0:0:([^:]*):([^:]*):([^:]*)$$/USER="\1" UID="\3" GECOS="\5" HOME="\6" SHELL="\7"/' -GROUP!= ${GREP} -E '^${PGBOUNCER_GROUP}:' ${PORTSDIR}/GIDs | \ - ${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):$$/GROUP="\1" GID="\3"/' - -# Apply the defaults where necessary -PGBOUNCER_USER?= ${USER:MUSER*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_UID?= ${USER:MUID*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_GECOS?= ${USER:MGECOS*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_HOME?= ${USER:MHOME*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_SHELL?= ${USER:MSHELL*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_GROUP?= ${GROUP:MGROUP*:C/^[^=]*=\"([^\"]*)\"$/\1/} -PGBOUNCER_GID?= ${GROUP:MGID*:C/^[^=]*=\"([^\"]*)\"$/\1/} - -SUB_LIST+= PGBOUNCER_USER="${PGBOUNCER_USER}" \ - PGBOUNCER_UID="${PGBOUNCER_UID}" \ - PGBOUNCER_GECOS="${PGBOUNCER_GECOS}" \ - PGBOUNCER_HOME="${PGBOUNCER_HOME}" \ - PGBOUNCER_SHELL="${PGBOUNCER_SHELL}" \ - PGBOUNCER_GROUP="${PGBOUNCER_GROUP}" \ - PGBOUNCER_GID="${PGBOUNCER_GID}" \ +SUB_LIST+= PGBOUNCER_USER="${USERS}" \ + PGBOUNCER_GROUP="${GROUPS}" \ PGBOUNCER_LOGDIR="${PGBOUNCER_LOGDIR}" \ PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}" \ CHMOD="${CHMOD}" CHOWN="${CHOWN}" MKDIR="${MKDIR}" PW="${PW}" diff --git a/databases/pgbouncer/distinfo b/databases/pgbouncer/distinfo index f9e4d317627e..b0fbda3c6f2b 100644 --- a/databases/pgbouncer/distinfo +++ b/databases/pgbouncer/distinfo @@ -1,2 +1,2 @@ -SHA256 (pgbouncer-1.4.tar.gz) = e94a8e7edd6de4ae6978e8f485bbc6a610195b56b1f5fe95a49bfd70959628fb -SIZE (pgbouncer-1.4.tar.gz) = 231691 +SHA256 (pgbouncer-1.4.1.tar.gz) = 24cd8fdeb6725bec260e5efbd21ba1e0a3f14b741b7003285760d178d6505672 +SIZE (pgbouncer-1.4.1.tar.gz) = 282728 diff --git a/databases/pgbouncer/files/patch-lib-usual-endian.h b/databases/pgbouncer/files/patch-lib-usual-endian.h deleted file mode 100644 index 7995a10dab31..000000000000 --- a/databases/pgbouncer/files/patch-lib-usual-endian.h +++ /dev/null @@ -1,32 +0,0 @@ ---- lib/usual/endian.h.orig 2010-12-14 07:35:50.000000000 +0100 -+++ lib/usual/endian.h 2011-01-12 16:01:08.148625395 +0100 -@@ -157,6 +157,7 @@ - /* - * Read LE/BE values from memory. - */ -+#ifndef __FreeBSD__ - - #define _DEC(name, typ, decode) \ - static inline typ name(const void *p) { \ -@@ -173,10 +174,14 @@ - _DEC(le64dec, uint64_t, le64toh) - #undef _DEC - -+#endif -+ - /* - * Write LE/BE values to memory. - */ - -+#ifndef __FreeBSD__ -+ - #define _ENC(name, typ, encode) \ - static inline void name(void *p, typ val) { \ - typ tmp = encode(val); \ -@@ -190,4 +195,6 @@ - _ENC(le64enc, uint64_t, htole64) - #undef _ENC - -+#endif -+ - #endif /* _USUAL_ENDIAN_H_ */ diff --git a/databases/pgbouncer/files/pkg-deinstall.in b/databases/pgbouncer/files/pkg-deinstall.in index 9ff4f2d7f305..f117735996a2 100644 --- a/databases/pgbouncer/files/pkg-deinstall.in +++ b/databases/pgbouncer/files/pkg-deinstall.in @@ -13,18 +13,9 @@ PGBOUNCER_LOGDIR=%%PGBOUNCER_LOGDIR%% PW="%%PW%%" -if ${PW} usershow "${pgbouncer_user}" 2>/dev/null 1>&2; then - echo "To delete ${pgbouncer_user} user permanently, use the following command:" - echo "${PW} userdel \"${pgbouncer_user}\"" -fi -if ${PW} groupshow "${pgbouncer_group}" 2>/dev/null 1>&2; then - echo "To delete ${pgbouncer_group} group permanently, use the following command:" - echo "${PW} groupdel \"${pgbouncer_group}\"" -fi for DIR in ${PGBOUNCER_RUNDIR} ${PGBOUNCER_LOGDIR}; do if test -d "${DIR}"; then - echo "You may want to remove the no longer required directory:" - echo "${DIR}" + echo "==> You should manually remove the directory: ${DIR}" fi done exit 0 diff --git a/databases/pgbouncer/files/pkg-install.in b/databases/pgbouncer/files/pkg-install.in index 10073bd98c5d..d433210fb81e 100644 --- a/databases/pgbouncer/files/pkg-install.in +++ b/databases/pgbouncer/files/pkg-install.in @@ -1,17 +1,12 @@ #! /bin/sh -# $FreeBSD# +# $FreeBSD$ if [ "$2" != "POST-INSTALL" ]; then exit 0 fi pgbouncer_user="%%PGBOUNCER_USER%%" -pgbouncer_uid="%%PGBOUNCER_UID%%" pgbouncer_group="%%PGBOUNCER_GROUP%%" -pgbouncer_gid="%%PGBOUNCER_GID%%" -pgbouncer_gecos="%%PGBOUNCER_GECOS%%" -pgbouncer_home="%%PGBOUNCER_HOME%%" -pgbouncer_shell="%%PGBOUNCER_SHELL%%" PGBOUNCER_RUNDIR="%%PGBOUNCER_RUNDIR%%" PGBOUNCER_LOGDIR="%%PGBOUNCER_LOGDIR%%" @@ -21,78 +16,11 @@ CHOWN="%%CHOWN%%" MKDIR="%%MKDIR%%" PW=%%PW%% -create_group() { - local group gid - - group=$1 - gid=$2 - - - if ${PW} group show -n $group >/dev/null 2>&1 ; then - echo "===> Using existing group $group" - else - if ${PW} groupadd -n $group -g $gid ; then - echo "===> Created group $group" - else - cat <<-EOERRORMSG -*** Failed to create group $group. - -Please add user $user and group $group -manually with the following commands: - - ${PW} groupadd -n $group -g $gid - ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \\ - -d $home -s $shell -h - - -and retry installing this package. -EOERRORMSG - exit 1 - fi - fi - -} - - -create_user() { - local user uid group gecos home shell - - user=$1 - uid=$2 - group=$3 - gecos=$4 - home=$5 - shell=$6 - - if ${PW} user show -n $user >/dev/null 2>&1 ; then - echo "===> Using existing user $user" - else - if ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \ - -d "$home" -s "$shell" -h - ; then - echo "===> Created user $user" - else - cat <<-EOERRORMSG -*** Failed to create user $user. - -Please add user $user manually with the following command: - - ${PW} useradd -n $user -u $uid -g $group -c "$gecos" \\ - -d $home -s $shell -h - - -and retry installing this package. -EOERRORMSG - exit 1 - fi - fi -} - -create_group $pgbouncer_group $pgbouncer_gid -create_user $pgbouncer_user $pgbouncer_uid $pgbouncer_group \ - "$pgbouncer_gecos" "$pgbouncer_home" "$pgbouncer_shell" for DIR in ${PGBOUNCER_RUNDIR} ${PGBOUNCER_LOGDIR}; do - echo "===> Creating directory ${DIR}" + echo "==> Creating directory ${DIR}" ${MKDIR} ${DIR} - echo "===> Changing ownership of ${DIR}" + echo "==> Changing ownership of ${DIR}" ${CHOWN} -R ${pgbouncer_user}:${pgbouncer_group} ${DIR} - echo "===> Changing permissions of ${DIR}" + echo "==> Changing permissions of ${DIR}" ${CHMOD} -R 770 ${DIR} done |