summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO31
-rw-r--r--PKGBUILD53
-rw-r--r--jabberd14.install39
-rw-r--r--jabberd14.service14
-rw-r--r--make.patch70
5 files changed, 207 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..26fa5e3531a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+# Generated by makepkg 4.2.0
+# Sun Mar 8 02:25:14 UTC 2015
+pkgbase = jabberd14-git
+ pkgdesc = Jabberd1 package
+ pkgver = 1.6
+ pkgrel = 1
+ url = https://github.com/mawis/jabberd
+ install = jabberd14.install
+ arch = x86_64
+ arch = x86
+ license = GPL2
+ makedepends = autoconf
+ makedepends = automake
+ makedepends = libtool
+ makedepends = git
+ makedepends = gcc
+ depends = gnutls
+ depends = libtasn1
+ depends = expat
+ depends = pth
+ optdepends = libmariadbclient: MySQL support
+ optdepends = postgresql-libs: PostgreSQL support
+ source = make.patch
+ source = jabberd14.install
+ source = jabberd14.service
+ md5sums = 47f17906bf2745e83fd184b917d64ae9
+ md5sums = 60195a06328a1be13b74b7fa920efdd4
+ md5sums = 8440d95469d3f072c526b934816cc4f8
+
+pkgname = jabberd14-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ba8cd04c962
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Ivan Agarkov <ivan.agarkov@gmail.com>
+pkgname=jabberd14-git
+pkgver=1.6
+pkgrel=1
+pkgdesc="Jabberd1 package"
+arch=('x86_64' 'x86')
+url="https://github.com/mawis/jabberd"
+license=('GPL2')
+depends=('gnutls' 'libtasn1' 'expat' 'pth')
+makedepends=('autoconf' 'automake' 'libtool' 'git' 'gcc')
+checkdepends=()
+optdepends=('libmariadbclient: MySQL support'
+'postgresql-libs: PostgreSQL support')
+install=("jabberd14.install")
+source=("make.patch"
+"jabberd14.install"
+"jabberd14.service")
+md5sums=('47f17906bf2745e83fd184b917d64ae9'
+ '60195a06328a1be13b74b7fa920efdd4'
+ '8440d95469d3f072c526b934816cc4f8')
+
+prepare() {
+ [ -d jabberd ] && rm -rf "$srcdir/jabberd"
+ git clone https://github.com/mawis/jabberd
+ cd "$srcdir/jabberd/jabberd14"
+ git apply "$srcdir/make.patch"
+ libtoolize
+ aclocal
+ autoheader
+ automake -a
+ autoconf
+}
+
+build() {
+ cd "$srcdir/jabberd/jabberd14"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+}
+
+
+package() {
+ cd "$srcdir/jabberd/jabberd14"
+ make install DESTDIR="$pkgdir"
+ mkdir -p "$pkgdir/usr/share/doc/jabberd"
+ install -m 0644 -t "$pkgdir/usr/share/doc/jabberd" UPGRADE jabber.xml.dist.in README.* mysql.sql pgsql_createdb.sql xdb_postgresql.xml cacerts.pem
+ mkdir -p "$pkgdir/usr/lib/systemd/system/"
+ install -m 0644 "$srcdir/jabberd14.service" "$pkgdir/usr/lib/systemd/system/jabberd14.service"
+}
diff --git a/jabberd14.install b/jabberd14.install
new file mode 100644
index 00000000000..3dd797b8b31
--- /dev/null
+++ b/jabberd14.install
@@ -0,0 +1,39 @@
+# This is a default template for a post-install scriptlet.
+# Uncomment only required functions and remove any functions
+# you don't need (and this header).
+
+## arg 1: the new package version
+pre_install() {
+ # do something here
+}
+
+## arg 1: the new package version
+post_install() {
+ cat /etc/passwd | grep -q jabberd || sudo useradd -M -d / -s /sbin/nologin -U -r jabberd
+ mkdir -p /var/run/jabberd/
+ echo "Look into /usr/share/doc/jabberd/ for *.sql files and database instructions"
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ # do something here
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ # do something here
+}
+
+## arg 1: the old package version
+pre_remove() {
+ userdel jabberd
+ groupdel jabberd
+ # do something here
+}
+
+## arg 1: the old package version
+post_remove() {
+ # do something here
+}
diff --git a/jabberd14.service b/jabberd14.service
new file mode 100644
index 00000000000..abc77b75d7d
--- /dev/null
+++ b/jabberd14.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Jabberd14 Jabber server
+
+[Service]
+User=jabberd
+Group=jabberd
+
+ExecStart=/usr/bin/jabberd
+
+Restart=always
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/make.patch b/make.patch
new file mode 100644
index 00000000000..e791296ba08
--- /dev/null
+++ b/make.patch
@@ -0,0 +1,70 @@
+From b37445d36f66bbe7f4ad16c41a1dab997a674567 Mon Sep 17 00:00:00 2001
+From: kreon <kreon@fidonode.in>
+Date: Sun, 8 Mar 2015 03:43:36 +0300
+Subject: [PATCH] make patch gnutls 3.3/libtasn1 4.2/gcrypt
+
+---
+ jabberd14/configure.ac | 13 +++++++------
+ jabberd14/jabberd/mio_tls.cc | 6 +++---
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/jabberd14/configure.ac b/jabberd14/configure.ac
+index 1ca14c7..6255199 100644
+--- a/jabberd14/configure.ac
++++ b/jabberd14/configure.ac
+@@ -231,6 +231,7 @@ AC_MSG_CHECKING(for crypt.h)
+ AC_CHECK_HEADER(crypt.h, crypt_header=yes, crypt_header=no)
+ if test "$crypt_header" != "no"; then
+ AC_DEFINE(INCLUDE_CRYPT_H,,[include the crypt.h header file])
++ LIBS="$LIBS -lgcrypt"
+ fi
+
+ dnl check for tr1/unordered_map
+@@ -289,12 +290,12 @@ else
+ fi
+
+ dnl then check for GnuTLS extra
+-PKG_CHECK_MODULES(GNUTLSEXTRA, gnutls-extra >= 1.4.0, hasgnutlsextra=yes, hasgnutlsextra=no)
+-if test $hasgnutls = "yes" ; then
+- CPPFLAGS="$CPPFLAGS $GNUTLSEXTRA_CFLAGS"
+- LDFLAGS="$LDFLAGS $GNUTLSEXTRA_LIBS"
+- AC_DEFINE(HAVE_GNUTLS_EXTRA,,[if GnuTLS-extra should be compiled in])
+-fi
++#PKG_CHECK_MODULES(GNUTLSEXTRA, gnutls-extra >= 1.4.0, hasgnutlsextra=yes, hasgnutlsextra=no)
++#if test $hasgnutls = "yes" ; then
++# CPPFLAGS="$CPPFLAGS $GNUTLSEXTRA_CFLAGS"
++# LDFLAGS="$LDFLAGS $GNUTLSEXTRA_LIBS"
++# AC_DEFINE(HAVE_GNUTLS_EXTRA,,[if GnuTLS-extra should be compiled in])
++#fi
+
+ dnl check for libidn
+ AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=DIR],[Where to find libidn (required)]),
+diff --git a/jabberd14/jabberd/mio_tls.cc b/jabberd14/jabberd/mio_tls.cc
+index 294d84b..b303a21 100644
+--- a/jabberd14/jabberd/mio_tls.cc
++++ b/jabberd14/jabberd/mio_tls.cc
+@@ -43,10 +43,8 @@
+ #include <vector>
+ #include <list>
+ #include <iostream>
+-
+ // Tell gcrypt that we are using libpth - had to move this to a plain C file
+ extern "C" void mio_tls_gcrypt_init();
+-
+ extern const ASN1_ARRAY_TYPE subjectAltName_asn1_tab[];
+
+ /**
+@@ -114,7 +112,9 @@ pool mio_tls_pool = NULL;
+ * tree of ASN1 structures
+ */
+ ASN1_TYPE mio_tls_asn1_tree = ASN1_TYPE_EMPTY;
+-
++static inline const char *libtasn1_strerror(int code) {
++ return asn1_strerror(code);
++}
+ /**
+ * close the TLS connection
+ *
+--
+2.3.0
+