diff options
author | Michael Hansen | 2015-06-16 15:18:08 -0700 |
---|---|---|
committer | Michael Hansen | 2015-06-16 15:18:40 -0700 |
commit | 1d9b77efba17ce1605ce2cfe5456a34e685efa96 (patch) | |
tree | 706982a5df2f07203e8ca2d242808696c4073b63 | |
parent | a1c29fe96409192228a716b3788541f8adebb8b3 (diff) | |
download | aur-1d9b77efba17ce1605ce2cfe5456a34e685efa96.tar.gz |
Merge DJ_L's additions for openchange-server support
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | ocsmanager.service | 12 | ||||
-rw-r--r-- | openchange-provision-type-error.patch | 12 |
3 files changed, 58 insertions, 6 deletions
@@ -1,5 +1,5 @@ # Maintainer: Michael Hansen <zrax0111 gmail com> -# Contributor: DJ Lucas <dj@linuxfromscratch.org> +# Maintainer: DJ Lucas <dj_AT_linuxfromscratch_DOT_org> # Contributor: ngoonee <ngoonee.talk@gmail.com> # Contributor: Adam Russell <adamlr6+arch@gmail.com> pkgname=openchange @@ -7,8 +7,7 @@ _codename=VULCAN pkgver=2.3 pkgrel=1 pkgdesc="A portable, open source implementation of Microsoft Exchange server \ -and Exchange protocols. This package was originally created to support \ -evolution-mapi and may not work for any other purpose." +and Exchange protocols." arch=('i686' 'x86_64' 'armv6h' 'armv7h') url="http://www.openchange.org" license=('GPL3') @@ -17,9 +16,13 @@ depends=('samba>=4.2.2' 'libical' 'sqlite3' 'file' 'boost' 'python2' makedepends=('ccache' 'docbook-xsl' 'libxslt') options=(!makeflags) # Releases are mirrored at http://tracker.openchange.org/projects/openchange/files -source=("https://github.com/openchange/openchange/archive/${pkgname}-${pkgver}-${_codename}.tar.gz") +source=("https://github.com/openchange/openchange/archive/${pkgname}-${pkgver}-${_codename}.tar.gz" + "ocsmanager.service" + "openchange-provision-type-error.patch") -sha256sums=('46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e') +sha256sums=('46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e' + '45bd19e2a5725a94692ae606086be6d57423375c9b1c0eb5322c6e09ef2b5fb3' + '65dc742e95dd1bff1581ea3d76b4dfe8d01ca52ab5e64ffc80efc10417a2ff97') # Used to be pkgname-pkgver-codename, but now we have two openchanges. WAT _srcsubdir="${pkgname}-${pkgname}-${pkgver}-${_codename}" @@ -27,6 +30,8 @@ _srcsubdir="${pkgname}-${pkgname}-${pkgver}-${_codename}" build() { cd "${srcdir}/${_srcsubdir}" + patch -p1 < "${srcdir}/openchange-provision-type-error.patch" + PYTHON_CALLERS="$(find ${srcdir}/${_srcsubdir} -name '*.py') $(find ${srcdir}/${_srcsubdir} -name 'configure.ac') setup/openchange_newuser setup/openchange_provision @@ -49,6 +54,7 @@ build() { --datadir=/usr/share/samba \ --enable-pyopenchange \ --with-modulesdir=/usr/lib/samba/modules + make FLEX=/usr/bin/flex BISON=/usr/bin/bison || return 1 } @@ -56,7 +62,8 @@ package() { _pyver=`python2 -c 'import sys; print(sys.version[:3])'` cd "${srcdir}/${_srcsubdir}" - make DESTDIR="$pkgdir/" install + make DESTDIR="${pkgdir}" install + make DESTDIR="${pkgdir}" pyopenchange-install # NOTE: Not using `make installman' because that generates a bunch # of doxygen-based manpages which may have conflicting names with @@ -68,6 +75,27 @@ package() { ln -s libmapi.so libmapi.so.0 ln -s libocpf.so libocpf.so.0 + # Install OCSManager + cd "${srcdir}/${_srcsubdir}" + make srcdir="${srcdir}/${_srcsubdir}" DESTDIR="${pkgdir}" ocsmanager-install + install -vdm700 -o http -g http "${pkgdir}/var/cache/ntlmauthhandler" + install -vDm644 "${srcdir}/ocsmanager.service" \ + "${pkgdir}/usr/lib/systemd/system/ocsmanager.service" + install -vDm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/ocsmanager/ocsmanager.ini" \ + "${pkgdir}/etc/ocsmanager/ocsmanager.ini" + install -vDm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/ocsmanager/ocsmanager-apache.conf" \ + "${pkgdir}/etc/httpd/conf/extra/ocsmanager.conf" + + # Install RPC Proxy + cd "${sourcedir}/mapiproxy/services/web/rpcproxy" + install -vdm755 "${pkgdir}/usr/lib/openchange/web/rpcproxy" + install -vm644 "${srcdir}/${_srcsubdir}/mapiproxy/services/web/rpcproxy/rpcproxy.conf" \ + "${pkgdir}/etc/httpd/conf/extra/rpcproxy.conf" + python2 setup.py install \ + --root="${pkgdir}" \ + --install-lib=/usr/lib/openchange/web/rpcproxy \ + --install-scripts=/usr/lib/openchange/web/rpcproxy + find "${pkgdir}/usr/lib/python${_pyver}/site-packages" -name '*.py' | \ xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" } diff --git a/ocsmanager.service b/ocsmanager.service new file mode 100644 index 000000000000..6b049eb7534d --- /dev/null +++ b/ocsmanager.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenChange OCSManager +After=samba.service + +[Service] +Type=simple +PIDFile=/var/run/ocsmanager.pid +ExecStart=/usr/sbin/paster serve /etc/ocsmanager/ocsmanager.ini --pid-file=/run/ocsmanager.pid --log-file=/var/log/ocsmanager.log +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/openchange-provision-type-error.patch b/openchange-provision-type-error.patch new file mode 100644 index 000000000000..27dadcff4609 --- /dev/null +++ b/openchange-provision-type-error.patch @@ -0,0 +1,12 @@ +diff -rupN a/python/openchange/mailbox.py b/python/openchange/mailbox.py +--- a/python/openchange/mailbox.py 2015-06-16 14:58:47.625735072 -0700 ++++ b/python/openchange/mailbox.py 2015-06-16 14:58:16.188582238 -0700 +@@ -498,7 +498,7 @@ class OpenChangeDBWithMysqlBackend(Mysql + def change_number(self): + if self._change_number is None: + cur = self._execute("SELECT change_number FROM servers WHERE id = %s", +- self.server_id) ++ (self.server_id,)) + data = cur.fetchone() + if data: + self._change_number = data[0] |