diff options
-rw-r--r-- | net-im/jabber/Makefile | 104 | ||||
-rw-r--r-- | net-im/jabber/files/patch-jabberd-mio_tls.cc | 101 | ||||
-rw-r--r-- | net-im/jabber/files/patch-man-Makefile.in | 9 | ||||
-rw-r--r-- | net-im/jabber/files/pkg-deinstall.in | 1 | ||||
-rw-r--r-- | net-im/jabber/files/pkg-install.in | 11 | ||||
-rw-r--r-- | net-im/jabber/pkg-plist | 3 |
6 files changed, 163 insertions, 66 deletions
diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile index 8ae46024821e..ada0f48fff40 100644 --- a/net-im/jabber/Makefile +++ b/net-im/jabber/Makefile @@ -6,8 +6,8 @@ PORTVERSION= 1.6.1.1 PORTREVISION= 14 PORTEPOCH= 1 CATEGORIES= net-im ipv6 -MASTER_SITES= http://download.jabberd.org/jabberd14/ \ - http://download.jabberd.org/jabberd14/old/ +MASTER_SITES= http://download.jabberd.org/jabberd14/%SUBDIR%/ +MASTER_SITE_SUBDIR= . old DISTNAME= jabberd14-${PORTVERSION} DIST_SUBDIR= jabber @@ -16,57 +16,46 @@ COMMENT= XMPP/Jabber server daemon LICENSE= GPLv2 -LIB_DEPENDS= pth:${PORTSDIR}/devel/pth-hard \ - popt:${PORTSDIR}/devel/popt \ - idn:${PORTSDIR}/dns/libidn \ - expat:${PORTSDIR}/textproc/expat2 \ - tasn1:${PORTSDIR}/security/libtasn1 \ - gnutls:${PORTSDIR}/security/gnutls \ - gcrypt:${PORTSDIR}/security/libgcrypt +LIB_DEPENDS= libpopt.so:${PORTSDIR}/devel/popt \ + libpth.so:${PORTSDIR}/devel/pth-hard \ + libidn.so:${PORTSDIR}/dns/libidn \ + libgnutls.so:${PORTSDIR}/security/gnutls \ + libexpat.so:${PORTSDIR}/textproc/expat2 OPTIONS_DEFINE= IPV6 MYSQL PGSQL USE_RC_SUBR= jabber -USE_GMAKE= yes -USES= gettext iconv pkgconfig +USES= gettext gmake iconv pkgconfig USE_AUTOTOOLS= libtool -USE_LDCONFIG= ${PREFIX}/lib/jabber -MAKE_JOBS_UNSAFE= yes - -.if !defined(NO_INSTALL_MANPAGES) -MAN5= jabber.xml.5 -MAN8= jabberd14.8 -.endif - -JABBER_USER= jabber -JABBER_UID= 93 -JABBER_GROUP= ${JABBER_USER} -JABBER_GID= ${JABBER_UID} -JABBER_ETCDIR= "${PREFIX}/etc" -JABBER_RUNDIR= "/var/run/jabberd" -JABBER_SPOOLDIR="/var/spool/jabberd" -JABBER_LOGDIR= "/var/log/jabberd" - CONFIGURE_ARGS= --localstatedir=/var \ --sysconfdir=${JABBER_ETCDIR} \ --includedir=${PREFIX}/include/jabber \ --libdir=${PREFIX}/lib/jabber +USE_LDCONFIG= ${PREFIX}/lib/jabber +MAKE_JOBS_UNSAFE= yes -CPPFLAGS+= -I${LOCALBASE}/include/pth -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib/pth -L${LOCALBASE}/lib -ltasn1 -lgcrypt +CPPFLAGS+= $$(pth-config --cflags) \ + -I${LOCALBASE}/include +LDFLAGS+= $$(pth-config --ldflags) \ + -L${LOCALBASE}/lib -SUB_FILES+= pkg-install pkg-deinstall pkg-message -SUB_LIST+= JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \ +SUB_FILES= pkg-install pkg-deinstall pkg-message +SUB_LIST= JABBER_USER=${JABBER_USER} JABBER_UID=${JABBER_UID} \ JABBER_GROUP=${JABBER_GROUP} JABBER_GID=${JABBER_GID} \ JABBER_ETCDIR="${JABBER_ETCDIR}" \ JABBER_LOGDIR="${JABBER_LOGDIR}" \ JABBER_SPOOLDIR="${JABBER_SPOOLDIR}" \ JABBER_RUNDIR="${JABBER_RUNDIR}" -DOCS= AUTHORS ChangeLog INSTALL NEWS README README.SQL README.config \ - README.filespool README.karma README.protocols TODO UPGRADE mysql.sql +JABBER_USER= jabber +JABBER_UID= 93 +JABBER_GROUP= ${JABBER_USER} +JABBER_GID= ${JABBER_UID} +JABBER_ETCDIR= "${PREFIX}/etc" +JABBER_RUNDIR= "/var/run/jabberd" +JABBER_SPOOLDIR="/var/spool/jabberd" +JABBER_LOGDIR= "/var/log/jabberd" -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MMYSQL} @@ -88,29 +77,36 @@ IGNORE= pth with soft syscalls is installed, please reinstall pth from devel/pth .endif post-patch: - @${REINPLACE_CMD} -e "s|\\\$$(localstatedir)/log/jabberd|${JABBER_LOGDIR}|g" \ - -e "s|\\\$$(localstatedir)/spool/jabberd|${JABBER_SPOOLDIR}|g" \ - -e "s|\\\$$(localstatedir)/run/jabberd|${JABBER_RUNDIR}|g" \ + @${REINPLACE_CMD} -e \ + 's|\\\$$(localstatedir)/log/jabberd|${JABBER_LOGDIR}|g ; \ + s|\\\$$(localstatedir)/spool/jabberd|${JABBER_SPOOLDIR}| ; \ + s|\\\$$(localstatedir)/run/jabberd|${JABBER_RUNDIR}|g' \ ${WRKSRC}/Makefile.in - @${REINPLACE_CMD} -e "s|@localstatedir@/log/jabberd|${JABBER_LOGDIR}|g" \ - -e "s|@localstatedir@/spool/jabberd|${JABBER_SPOOLDIR}|g" \ - -e "s|@localstatedir@/run/jabberd|${JABBER_RUNDIR}|g" \ + @${REINPLACE_CMD} -e \ + 's|@localstatedir@/log/jabberd|${JABBER_LOGDIR}|g ; \ + s|@localstatedir@/spool/jabberd|${JABBER_SPOOLDIR}|g ; \ + s|@localstatedir@/run/jabberd|${JABBER_RUNDIR}|g' \ ${WRKSRC}/jabber.xml.dist.in - @${LN} -s ${WRKSRC}/man/jabberd.8.in ${WRKSRC}/man/jabberd14.8.in + @${REINPLACE_CMD} -e \ + '/<gcrypt.h>/s|^|//| ; \ + /gcry_control/s|^|//|' \ + ${WRKSRC}/jabberd/gcrypt_init.c + @${REINPLACE_CMD} -e \ + 's|locale, LOCALEDIR)|locale)|' \ + ${WRKSRC}/jabberd/lib/messages.cc + @${REINPLACE_CMD} -e \ + 's|"$(localedir)|"$$(DESTDIR)$(localedir)|' \ + ${WRKSRC}/po/Makefile.in + @${LN} -s jabberd.8.in ${WRKSRC}/man/jabberd14.8.in post-install: - @${TOUCH} ${PREFIX}/include/jabber/platform-settings - @${INSTALL_DATA} ${WRKSRC}/jabber.xml.dist ${PREFIX}/etc/jabber.xml.sample -.if !defined(NO_INSTALL_MANPAGES) - @cd ${WRKSRC}/man && make install-man -.endif -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for FILE in ${DOCS} - @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE} + @${TOUCH} ${STAGEDIR}${PREFIX}/include/jabber/platform-settings + (cd ${WRKSRC} && ${INSTALL_DATA} jabber.xml.dist \ + ${STAGEDIR}${PREFIX}/etc/jabber.xml.sample) + @${MKDIR} ${STAGEDIR}${DOCSDIR} +.for i in AUTHORS ChangeLog INSTALL NEWS README README.SQL README.config \ + README.filespool README.karma README.protocols TODO UPGRADE mysql.sql + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor -.endif - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/net-im/jabber/files/patch-jabberd-mio_tls.cc b/net-im/jabber/files/patch-jabberd-mio_tls.cc index 12bc9f54aadd..1a945861ceb2 100644 --- a/net-im/jabber/files/patch-jabberd-mio_tls.cc +++ b/net-im/jabber/files/patch-jabberd-mio_tls.cc @@ -1,6 +1,14 @@ --- jabberd/mio_tls.cc.orig 2008-03-06 10:21:01.669677189 +0100 +++ jabberd/mio_tls.cc 2008-03-06 10:35:04.744064592 +0100 -@@ -612,7 +612,7 @@ +@@ -39,7 +39,6 @@ + #include <set> + #include <string> + #include <sstream> +-#include <gcrypt.h> + #include <vector> + #include <list> + #include <iostream> +@@ -612,7 +611,7 @@ } // load OpenPGP key/certificate @@ -9,7 +17,7 @@ if (ret < 0) { log_error(NULL, "Error loading OpenPGP key pub=%s/priv=%s: %s", pubfile, privfile, gnutls_strerror(ret)); continue; -@@ -631,7 +631,7 @@ +@@ -631,7 +630,7 @@ } // load the OpenPGP keyring @@ -18,7 +26,7 @@ if (ret < 0) { log_error(NULL, "Error loading OpenPGP keyring %s: %s", file, gnutls_strerror(ret)); continue; -@@ -640,23 +640,6 @@ +@@ -640,23 +639,6 @@ continue; } @@ -42,3 +50,90 @@ // setup protocols to use if (j_strcmp(xmlnode_get_localname(cur), "protocols") == 0) { char const *const protocols_data = xmlnode_get_data(cur); +@@ -916,7 +898,7 @@ + /* load asn1 tree to be used by libtasn1 */ + ret = asn1_array2tree(subjectAltName_asn1_tab, &mio_tls_asn1_tree, NULL); + if (ret != ASN1_SUCCESS) { +- std::cerr << "Error preparing the libtasn1 library: " << libtasn1_strerror(ret) << std::endl; ++ std::cerr << "Error preparing the libtasn1 library: " << asn1_strerror(ret) << std::endl; + return false; + /* XXX we have to delete the structure on shutdown using asn1_delete_structure(&mio_tls_asn1_tree) */ + } +@@ -1684,14 +1666,14 @@ + /* init subjectAltName_element */ + ret = asn1_create_element(mio_tls_asn1_tree, "PKIX1.SubjectAltName", &subjectAltName_element); + if (ret != ASN1_SUCCESS) { +- log_warn(log_id.c_str(), "error creating asn1 element for PKIX1.SubjectAltName: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str()); ++ log_warn(log_id.c_str(), "error creating asn1 element for PKIX1.SubjectAltName: %s (%s)", asn1_strerror(ret), cert_subject.c_str()); + break; + } + + /* decode the extension */ + ret = asn1_der_decoding(&subjectAltName_element, subjectAltName, subjectAltName_size, NULL); + if (ret != ASN1_SUCCESS) { +- log_warn(log_id.c_str(), "error DER decoding subjectAltName extension: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str()); ++ log_warn(log_id.c_str(), "error DER decoding subjectAltName extension: %s (%s)", asn1_strerror(ret), cert_subject.c_str()); + asn1_delete_structure(&subjectAltName_element); + break; + } +@@ -1712,7 +1694,7 @@ + break; + } + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error accessing type for %s in subjectAltName: %s (%s)", cnt_string, libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error accessing type for %s in subjectAltName: %s (%s)", cnt_string, asn1_strerror(ret), cert_subject.c_str()); + break; + } + +@@ -1732,7 +1714,7 @@ + + ret = asn1_read_value(subjectAltName_element, access_string, dNSName, &dNSName_len); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error accessing %s in subjectAltName: %s (%s)", access_string, libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error accessing %s in subjectAltName: %s (%s)", access_string, asn1_strerror(ret), cert_subject.c_str()); + break; + } + +@@ -1772,7 +1754,7 @@ + /* get the OID of the otherName */ + ret = asn1_read_value(subjectAltName_element, access_string_type, otherNameType, &otherNameType_len); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error accessing type information %s in subjectAltName: %s (%s)", access_string_type, libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error accessing type information %s in subjectAltName: %s (%s)", access_string_type, asn1_strerror(ret), cert_subject.c_str()); + break; + } + +@@ -1785,7 +1767,7 @@ + /* get the value of the otherName */ + ret = asn1_read_value(subjectAltName_element, access_string_value, otherNameValue, &otherNameValue_len); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error accessing value of othername %s in subjectAltName: %s (%s)", access_string_value, libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error accessing value of othername %s in subjectAltName: %s (%s)", access_string_value, asn1_strerror(ret), cert_subject.c_str()); + break; + } + +@@ -1799,21 +1781,21 @@ + + ret = asn1_create_element(mio_tls_asn1_tree, "PKIX1.DirectoryString", &directoryString_element); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error creating DirectoryString element: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error creating DirectoryString element: %s (%s)", asn1_strerror(ret), cert_subject.c_str()); + asn1_delete_structure(&directoryString_element); + break; + } + + ret = asn1_der_decoding(&directoryString_element, otherNameValue, otherNameValue_len, NULL); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error decoding DirectoryString: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error decoding DirectoryString: %s (%s)", asn1_strerror(ret), cert_subject.c_str()); + asn1_delete_structure(&directoryString_element); + break; + } + + ret = asn1_read_value(directoryString_element, "utf8String", thisIdOnXMPPaddr, &thisIdOnXMPPaddr_len); + if (ret != ASN1_SUCCESS) { +- log_notice(log_id.c_str(), "error accessing utf8String of DirectoryString: %s (%s)", libtasn1_strerror(ret), cert_subject.c_str()); ++ log_notice(log_id.c_str(), "error accessing utf8String of DirectoryString: %s (%s)", asn1_strerror(ret), cert_subject.c_str()); + asn1_delete_structure(&directoryString_element); + break; + } diff --git a/net-im/jabber/files/patch-man-Makefile.in b/net-im/jabber/files/patch-man-Makefile.in index 6a433ef56bfd..315abac1331b 100644 --- a/net-im/jabber/files/patch-man-Makefile.in +++ b/net-im/jabber/files/patch-man-Makefile.in @@ -11,12 +11,3 @@ edit = sed \ -e 's,\@sysconfdir\@,$(sysconfdir),g' \ -e 's,\@VERSION\@,$(VERSION),g' -@@ -387,7 +387,7 @@ - - info-am: - --install-data-am: install-man -+install-data-am: - - install-exec-am: - diff --git a/net-im/jabber/files/pkg-deinstall.in b/net-im/jabber/files/pkg-deinstall.in index 274d53a37749..93c63ae9f7f8 100644 --- a/net-im/jabber/files/pkg-deinstall.in +++ b/net-im/jabber/files/pkg-deinstall.in @@ -8,6 +8,7 @@ USER=%%JABBER_USER%% GROUP=%%JABBER_GROUP%% RUNDIR="%%JABBER_RUNDIR%%" SPOOLDIR="%%JABBER_SPOOLDIR%%" +LOGDIR="%%LOGDIR%%" if pw usershow "${USER}" 2>/dev/null 1>&2; then echo "To delete Jabber user permanently, use 'pw userdel ${USER}'" diff --git a/net-im/jabber/files/pkg-install.in b/net-im/jabber/files/pkg-install.in index 2a7c130c1be1..d07e0e8e732a 100644 --- a/net-im/jabber/files/pkg-install.in +++ b/net-im/jabber/files/pkg-install.in @@ -11,6 +11,7 @@ GID=%%JABBER_GID%% ETCDIR=%%JABBER_ETCDIR%% RUNDIR=%%JABBER_RUNDIR%% SPOOLDIR=%%JABBER_SPOOLDIR%% +LOGDIR=%%JABBER_LOGDIR%% if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then @@ -47,6 +48,16 @@ if [ ! -d ${SPOOLDIR} ]; then mkdir -p ${SPOOLDIR} fi +if [ ! -d ${SPOOLDIR} ]; then + echo "Creating \"${SPOOLDIR}\"." + mkdir -p ${SPOOLDIR} +fi + +if [ ! -d ${LOGDIR} ]; then + echo "Creating \"${LOGDIR}\"." + mkdir -p ${LOGDIR} +fi + echo "Fixing ownerships and modes in \"${SPOOLDIR}\"." chown -R ${USER}:${GROUP} ${SPOOLDIR} chmod -R go= ${SPOOLDIR} diff --git a/net-im/jabber/pkg-plist b/net-im/jabber/pkg-plist index 840c3e2fca26..faffa03a71e7 100644 --- a/net-im/jabber/pkg-plist +++ b/net-im/jabber/pkg-plist @@ -32,6 +32,8 @@ lib/jabber/libjabberdxdbsql.a lib/jabber/libjabberdxdbsql.la lib/jabber/libjabberdxdbsql.so lib/jabber/libjabberdxdbsql.so.2 +man/man5/jabber.xml.5.gz +man/man8/jabberd14.8.gz share/locale/de/LC_MESSAGES/jabberd14.mo share/locale/fr/LC_MESSAGES/jabberd14.mo share/locale/hu/LC_MESSAGES/jabberd14.mo @@ -51,5 +53,6 @@ share/locale/nl/LC_MESSAGES/jabberd14.mo %%PORTDOCS%%%%DOCSDIR%%/UPGRADE %%PORTDOCS%%%%DOCSDIR%%/mysql.sql %%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrmtry /var/spool/jabberd @dirrmtry lib/jabber @dirrmtry include/jabber |