diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-01-20 20:41:20 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-01-20 20:41:20 -0300 |
commit | 33fcf0e7b95e530b849e59e90fdea4001e01283d (patch) | |
tree | 5eab4f238207cce42c8351067ade9999df065a1f /community-testing | |
parent | 3b0910bf6527c3b761d9579b2ed37a9a42595fa3 (diff) | |
parent | a1922d0ec660fdc1892f2783515f781c090df0a9 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/gnash/PKGBUILD
community/libopenraw/PKGBUILD
community/smalltalk/PKGBUILD
core/coreutils/PKGBUILD
core/libarchive/PKGBUILD
extra/dhcp/PKGBUILD
extra/gmime/PKGBUILD
extra/gvfs/PKGBUILD
extra/kdeutils/PKGBUILD
extra/libreoffice/PKGBUILD
extra/lirc/PKGBUILD
extra/php-suhosin/PKGBUILD
extra/qtwebkit/PKGBUILD
extra/sdl_image/PKGBUILD
extra/sdl_net/PKGBUILD
extra/sdl_ttf/PKGBUILD
extra/spamassassin/PKGBUILD
extra/tftp-hpa/PKGBUILD
extra/totem-plparser/PKGBUILD
extra/tumbler/PKGBUILD
extra/vim/PKGBUILD
extra/wipe/PKGBUILD
extra/xfce4-netload-plugin/PKGBUILD
kde-unstable/kdebase-workspace/PKGBUILD
kde-unstable/kdebase-workspace/kde-np.pam
kde-unstable/kdebase-workspace/kde.pam
multilib/binutils-multilib/PKGBUILD
multilib/chuck/PKGBUILD
multilib/dev86/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/jack2-multilib/PKGBUILD
multilib/lib32-gdk-pixbuf2/PKGBUILD
multilib/lib32-glib2/PKGBUILD
multilib/lib32-glibc/PKGBUILD
multilib/lib32-glibc/lib32-glibc.conf
multilib/lib32-gtk2/PKGBUILD
multilib/lib32-libpulse/PKGBUILD
multilib/lib32-pango/PKGBUILD
multilib/lib32-sdl_image/PKGBUILD
multilib/lib32-sdl_ttf/PKGBUILD
multilib/libtool-multilib/PKGBUILD
multilib/nspluginwrapper/PKGBUILD
multilib/q4wine/PKGBUILD
multilib/wine/PKGBUILD
staging/php/PKGBUILD
staging/php/php-fpm.conf.in.patch
staging/php/php.ini.patch
Diffstat (limited to 'community-testing')
-rw-r--r-- | community-testing/balsa/PKGBUILD | 47 | ||||
-rw-r--r-- | community-testing/balsa/balsa.install | 12 | ||||
-rw-r--r-- | community-testing/balsa/gmime26.patch | 1372 | ||||
-rw-r--r-- | community-testing/dbmail/PKGBUILD | 51 | ||||
-rw-r--r-- | community-testing/dbmail/dbmail-2.2.10-pam-support.patch | 251 | ||||
-rw-r--r-- | community-testing/dbmail/dbmail.conf.d | 9 | ||||
-rw-r--r-- | community-testing/dbmail/dbmail.rc.d | 41 | ||||
-rw-r--r-- | community-testing/libzdb/PKGBUILD | 21 | ||||
-rw-r--r-- | community-testing/lilypond/PKGBUILD | 43 | ||||
-rw-r--r-- | community-testing/lilypond/lilypond.install | 48 | ||||
-rw-r--r-- | community-testing/lilypond/texlive-workaround.patch | 88 | ||||
-rw-r--r-- | community-testing/pinot/PKGBUILD | 50 | ||||
-rw-r--r-- | community-testing/pinot/pinot.changelog | 2 | ||||
-rw-r--r-- | community-testing/pinot/pinot.install | 15 |
14 files changed, 2050 insertions, 0 deletions
diff --git a/community-testing/balsa/PKGBUILD b/community-testing/balsa/PKGBUILD new file mode 100644 index 000000000..43eae5357 --- /dev/null +++ b/community-testing/balsa/PKGBUILD @@ -0,0 +1,47 @@ +# $Id: PKGBUILD 62015 2012-01-14 12:24:56Z ibiru $ +# Maintainer : Ionut Biru <ibiru@archlinux.org> +# Maintainer: Brad Fanella <bradfanella@archlinux.us> +# Contributor: Roman Kyrylych <roman@archlinux.org> + +pkgname=balsa +pkgver=2.4.11 +pkgrel=1 +pkgdesc="An e-mail client for GNOME" +arch=('i686' 'x86_64') +license=('GPL') +url='http://pawsa.fedorapeople.org/balsa/' +depends=('gmime' 'libwebkit' 'libesmtp' 'libnotify' 'gpgme' 'gtksourceview2' 'gtkspell' 'gnome-icon-theme' 'desktop-file-utils') +makedepends=('perlxml' 'gnome-doc-utils' 'intltool') +install=balsa.install +source=(http://pawsa.fedorapeople.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + gmime26.patch) +md5sums=('915c622b6385aa4f83d5eee8f31ee8e8' + '108d33f533558a371189441edce7d7e6') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -Np1 -i "${srcdir}/gmime26.patch" + autoreconf -fi + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-ssl \ + --with-gpgme=gpgme-config \ + --with-gss \ + --with-ldap \ + --with-gtksourceview \ + --with-gtkspell \ + --with-rubrica \ + --with-sqlite \ + --without-nm \ + --without-gnome \ + --with-html-widget=webkit + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make GTK_UPDATE_ICON_CACHE=/bin/true DESTDIR="${pkgdir}" install +} diff --git a/community-testing/balsa/balsa.install b/community-testing/balsa/balsa.install new file mode 100644 index 000000000..1f167b5e9 --- /dev/null +++ b/community-testing/balsa/balsa.install @@ -0,0 +1,12 @@ +post_install() { + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/community-testing/balsa/gmime26.patch b/community-testing/balsa/gmime26.patch new file mode 100644 index 000000000..fe4e6a9fa --- /dev/null +++ b/community-testing/balsa/gmime26.patch @@ -0,0 +1,1372 @@ +From 393d0077495cb750ee47bab6ec44a60906a95179 Mon Sep 17 00:00:00 2001 +From: Peter Bloomfield <PeterBloomfield@bellsouth.net> +Date: Mon, 28 Nov 2011 03:00:55 +0000 +Subject: Build with GMime 2.6.0 + + * configure.in: check for GMime >= 2.5.7 + * libbalsa/gmime-application-pkcs7.c + (g_mime_application_pkcs7_sign), (g_mime_application_pkcs7_verify), + (g_mime_application_pkcs7_encrypt), + (g_mime_application_pkcs7_decrypt): build with GMime >= 2.5.7. + * libbalsa/gmime-application-pkcs7.h: ditto. + * libbalsa/gmime-gpgme-context.c (g_mime_gpgme_context_get_type), + (g_mime_gpgme_context_class_init), (g_mime_gpgme_context_finalize), + (g_mime_gpgme_digest_id): ditto. + * libbalsa/gmime-gpgme-context.h: ditto. + * libbalsa/gmime-part-rfc2440.c (g_mime_part_rfc2440_sign_encrypt), + (g_mime_part_rfc2440_verify), (g_mime_part_rfc2440_decrypt): + ditto. + * libbalsa/gmime-part-rfc2440.h: ditto. + * libbalsa/rfc3156.c (password_request_func), + (libbalsa_sign_mime_object), (libbalsa_encrypt_mime_object), + (libbalsa_body_check_signature), (libbalsa_body_decrypt): ditto. +--- +diff --git a/ChangeLog b/ChangeLog +index bd95e68..d5c62f5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,25 @@ ++2011-11-27 Peter Bloomfield ++ ++ Build with GMime 2.6.0 ++ ++ * configure.in: check for GMime >= 2.5.7 ++ * libbalsa/gmime-application-pkcs7.c ++ (g_mime_application_pkcs7_sign), (g_mime_application_pkcs7_verify), ++ (g_mime_application_pkcs7_encrypt), ++ (g_mime_application_pkcs7_decrypt): build with GMime >= 2.5.7. ++ * libbalsa/gmime-application-pkcs7.h: ditto. ++ * libbalsa/gmime-gpgme-context.c (g_mime_gpgme_context_get_type), ++ (g_mime_gpgme_context_class_init), (g_mime_gpgme_context_finalize), ++ (g_mime_gpgme_digest_id): ditto. ++ * libbalsa/gmime-gpgme-context.h: ditto. ++ * libbalsa/gmime-part-rfc2440.c (g_mime_part_rfc2440_sign_encrypt), ++ (g_mime_part_rfc2440_verify), (g_mime_part_rfc2440_decrypt): ++ ditto. ++ * libbalsa/gmime-part-rfc2440.h: ditto. ++ * libbalsa/rfc3156.c (password_request_func), ++ (libbalsa_sign_mime_object), (libbalsa_encrypt_mime_object), ++ (libbalsa_body_check_signature), (libbalsa_body_decrypt): ditto. ++ + 2011-11-22 Pawel Salek + + * NEWS, configure.in: release balsa-2.4.11 +diff --git a/configure.in b/configure.in +index 4a8320e..64d99f3 100644 +--- a/configure.in ++++ b/configure.in +@@ -307,7 +307,12 @@ fi + case "$with_gmime" in + 2.4) ;; + 2.6) AC_DEFINE([HAVE_GMIME_2_6], [1], +- [Defined to build with GMime version 2.5 or 2.6]) ;; ++ [Defined to build with GMime version 2.5 or 2.6]) ++ if $PKG_CONFIG --atleast-version=2.5.7 gmime-2.6; then ++ AC_DEFINE([HAVE_GMIME_2_5_7], [1], ++ [Defined when GMime version is at least 2.5.7]) ++ fi ++ ;; + *) AC_MSG_ERROR([unknown GMime version $with_gmime]) ;; + esac + +diff --git a/libbalsa/gmime-application-pkcs7.c b/libbalsa/gmime-application-pkcs7.c +index 12f4f8f..63b8087 100644 +--- a/libbalsa/gmime-application-pkcs7.c ++++ b/libbalsa/gmime-application-pkcs7.c +@@ -96,8 +96,14 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + GMimeFilter *crlf_filter, *from_filter; + + g_return_val_if_fail (GMIME_IS_PART (pkcs7), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1); + g_return_val_if_fail (ctx->sign_protocol != NULL, -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail (GMIME_IS_CRYPTO_CONTEXT (ctx), -1); ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol(ctx) ++ != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail (GMIME_IS_OBJECT (content), -1); + + /* Prepare all the parts for signing... */ +@@ -127,7 +133,14 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + sig_data_stream = g_mime_stream_mem_new (); + + /* get the signed content */ +- if (g_mime_cipher_context_sign (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, sig_data_stream, err) == -1) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_sign (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, sig_data_stream, err) == -1) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_sign ++ (ctx, userid, GMIME_CIPHER_HASH_DEFAULT, filtered_stream, ++ sig_data_stream, err) == -1) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref (filtered_stream); + g_object_unref (sig_data_stream); + g_object_unref (stream); +@@ -168,9 +181,15 @@ g_mime_application_pkcs7_sign (GMimePart *pkcs7, GMimeObject *content, + * decrypting it again. In this case, validity is undefined. + */ + GMimeObject * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_verify(GMimePart * pkcs7, + GMimeSignatureValidity ** validity, + GMimeCipherContext * ctx, GError ** err) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_application_pkcs7_verify(GMimePart * pkcs7, ++ GMimeSignatureList ** list, ++ GMimeCryptoContext * ctx, GError ** err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeObject *decrypted; + GMimeDataWrapper *wrapper; +@@ -181,8 +200,14 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + const char *smime_type; + + g_return_val_if_fail(GMIME_IS_PART(pkcs7), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_IS_CIPHER_CONTEXT(ctx), NULL); + g_return_val_if_fail(ctx->encrypt_protocol != NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(GMIME_IS_CRYPTO_CONTEXT(ctx), NULL); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some sanity checks */ + smime_type = +@@ -208,9 +233,16 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + g_object_unref(crlf_filter); + + /* get the cleartext */ ++#ifndef HAVE_GMIME_2_5_7 + *validity = g_mime_cipher_context_verify(ctx, GMIME_CIPHER_HASH_DEFAULT, + ciphertext, filtered_stream, err); +- if (!*validity) { ++ if (!*validity) ++#else /* HAVE_GMIME_2_5_7 */ ++ *list = g_mime_crypto_context_verify(ctx, GMIME_CIPHER_ALGO_DEFAULT, ++ ciphertext, filtered_stream, err); ++ if (!*list) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(filtered_stream); + g_object_unref(ciphertext); + g_object_unref(stream); +@@ -248,7 +280,12 @@ g_mime_application_pkcs7_verify(GMimePart * pkcs7, + */ + int + g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *ctx, GPtrArray *recipients, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *ctx, ++ GPtrArray *recipients, ++#endif /* HAVE_GMIME_2_5_7 */ + GError **err) + { + GMimeDataWrapper *wrapper; +@@ -257,8 +294,14 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + GMimeFilter *crlf_filter; + + g_return_val_if_fail (GMIME_IS_PART (pkcs7), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail (GMIME_IS_CIPHER_CONTEXT (ctx), -1); + g_return_val_if_fail (ctx->encrypt_protocol != NULL, -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail (GMIME_IS_CRYPTO_CONTEXT (ctx), -1); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail (GMIME_IS_OBJECT (content), -1); + + /* get the cleartext */ +@@ -279,7 +322,15 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + + /* encrypt the content stream */ + ciphertext = g_mime_stream_mem_new (); +- if (g_mime_cipher_context_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_encrypt (ctx, FALSE, NULL, recipients, stream, ciphertext, err) == -1) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_encrypt ++ (ctx, FALSE, NULL, ++ GMIME_CIPHER_ALGO_DEFAULT, ++ recipients, stream, ciphertext, err) == -1) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref (ciphertext); + g_object_unref (stream); + return -1; +@@ -313,8 +364,14 @@ g_mime_application_pkcs7_encrypt (GMimePart *pkcs7, GMimeObject *content, + * err with more information about the reason. + */ + GMimeObject * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + GError **err) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, ++ GMimeCryptoContext *ctx, ++ GError **err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeObject *decrypted; + GMimeDataWrapper *wrapper; +@@ -325,8 +382,14 @@ g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + const char *smime_type; + + g_return_val_if_fail(GMIME_IS_PART(pkcs7), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_IS_CIPHER_CONTEXT(ctx), NULL); + g_return_val_if_fail(ctx->encrypt_protocol != NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(GMIME_IS_CRYPTO_CONTEXT(ctx), NULL); ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol(ctx) ++ != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some sanity checks */ + smime_type = +@@ -353,7 +416,13 @@ g_mime_application_pkcs7_decrypt (GMimePart *pkcs7, GMimeCipherContext *ctx, + g_object_unref(crlf_filter); + + /* get the cleartext */ +- if (g_mime_cipher_context_decrypt(ctx, ciphertext, filtered_stream, err) == NULL) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (g_mime_cipher_context_decrypt(ctx, ciphertext, filtered_stream, err) == NULL) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_crypto_context_decrypt ++ (ctx, ciphertext, filtered_stream, err) == NULL) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(filtered_stream); + g_object_unref(ciphertext); + g_object_unref(stream); +diff --git a/libbalsa/gmime-application-pkcs7.h b/libbalsa/gmime-application-pkcs7.h +index 03fa401..6678ff5 100644 +--- a/libbalsa/gmime-application-pkcs7.h ++++ b/libbalsa/gmime-application-pkcs7.h +@@ -28,7 +28,11 @@ extern "C" { + #endif /* __cplusplus */ + + #include <gmime/gmime-part.h> ++#ifndef HAVE_GMIME_2_5_7 + #include <gmime/gmime-cipher-context.h> ++#else /* HAVE_GMIME_2_5_7 */ ++#include <gmime/gmime-crypto-context.h> ++#endif /* HAVE_GMIME_2_5_7 */ + + #undef HAS_APPLICATION_PKCS7_MIME_SIGNED_SUPPORT + +@@ -39,21 +43,40 @@ extern "C" { + * Balsa always encodes S/MIME signed stuff as multipart/signed. */ + int g_mime_application_pkcs7_sign(GMimePart * pkcs7, + GMimeObject * content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ctx, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext * ctx, ++#endif /* HAVE_GMIME_2_5_7 */ + const char *userid, GError ** err); + #endif + ++#ifndef HAVE_GMIME_2_5_7 + GMimeObject *g_mime_application_pkcs7_verify(GMimePart * pkcs7, + GMimeSignatureValidity ** validity, + GMimeCipherContext * ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeObject *g_mime_application_pkcs7_verify(GMimePart * pkcs7, ++ GMimeSignatureList ** validity, ++ GMimeCryptoContext * ctx, GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + int g_mime_application_pkcs7_encrypt(GMimePart * pkcs7, + GMimeObject * content, ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ctx, ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext * ctx, ++#endif /* HAVE_GMIME_2_5_7 */ + GPtrArray * recipients, GError ** err); + ++#ifndef HAVE_GMIME_2_5_7 + GMimeObject *g_mime_application_pkcs7_decrypt(GMimePart * pkcs7, + GMimeCipherContext * ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeObject *g_mime_application_pkcs7_decrypt(GMimePart * pkcs7, ++ GMimeCryptoContext * ctx, GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + #ifdef __cplusplus + } +diff --git a/libbalsa/gmime-gpgme-context.c b/libbalsa/gmime-gpgme-context.c +index 24b140b..0c56f94 100644 +--- a/libbalsa/gmime-gpgme-context.c ++++ b/libbalsa/gmime-gpgme-context.c +@@ -27,6 +27,9 @@ + #include <unistd.h> + #include <glib.h> + #include <gmime/gmime.h> ++#ifdef HAVE_GMIME_2_5_7 ++#include <gmime/gmime-certificate.h> ++#endif /* HAVE_GMIME_2_5_7 */ + #include <gpgme.h> + #include <time.h> + #include <glib/gi18n.h> +@@ -44,6 +47,7 @@ static gboolean g_mime_gpgme_context_check_protocol(GMimeGpgmeContextClass + protocol, + GError ** error); + ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherHash g_mime_gpgme_hash_id(GMimeCipherContext * ctx, + const char *hash); + +@@ -70,6 +74,46 @@ static GMimeSignatureValidity *g_mime_gpgme_decrypt(GMimeCipherContext * + GMimeStream * istream, + GMimeStream * ostream, + GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDigestAlgo g_mime_gpgme_digest_id(GMimeCryptoContext * ctx, ++ const char *hash); ++ ++static const char *g_mime_gpgme_digest_name(GMimeCryptoContext * ctx, ++ GMimeDigestAlgo hash); ++ ++static const char ++ *g_mime_gpgme_get_signature_protocol(GMimeCryptoContext * context); ++static const char ++ *g_mime_gpgme_get_encryption_protocol(GMimeCryptoContext * context); ++static const char ++ *g_mime_gpgme_get_key_exchange_protocol(GMimeCryptoContext * context); ++ ++static int g_mime_gpgme_sign(GMimeCryptoContext * ctx, ++ const char * userid, ++ GMimeDigestAlgo hash, ++ GMimeStream * istream, ++ GMimeStream * ostream, ++ GError ** err); ++ ++static GMimeSignatureList *g_mime_gpgme_verify(GMimeCryptoContext * ctx, ++ GMimeDigestAlgo hash, ++ GMimeStream * istream, ++ GMimeStream * sigstream, ++ GError ** err); ++ ++static int g_mime_gpgme_encrypt(GMimeCryptoContext * ctx, ++ gboolean sign, ++ const char *userid, ++ GMimeDigestAlgo digest, ++ GPtrArray * recipients, ++ GMimeStream * istream, ++ GMimeStream * ostream, GError ** err); ++ ++static GMimeDecryptResult *g_mime_gpgme_decrypt(GMimeCryptoContext * ctx, ++ GMimeStream * istream, ++ GMimeStream * ostream, ++ GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + + /* internal passphrase callback */ +@@ -102,7 +146,11 @@ static void g_set_error_from_gpgme(GError ** error, gpgme_error_t gpgme_err, + const gchar * message); + + ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherContextClass *parent_class = NULL; ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeCryptoContextClass *parent_class = NULL; ++#endif /* HAVE_GMIME_2_5_7 */ + + + GType +@@ -124,8 +172,13 @@ g_mime_gpgme_context_get_type(void) + }; + + type = ++#ifndef HAVE_GMIME_2_5_7 + g_type_register_static(GMIME_TYPE_CIPHER_CONTEXT, + "GMimeGpgmeContext", &info, 0); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_type_register_static(GMIME_TYPE_CRYPTO_CONTEXT, ++ "GMimeGpgmeContext", &info, 0); ++#endif /* HAVE_GMIME_2_5_7 */ + } + + return type; +@@ -136,19 +189,39 @@ static void + g_mime_gpgme_context_class_init(GMimeGpgmeContextClass * klass) + { + GObjectClass *object_class = G_OBJECT_CLASS(klass); ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContextClass *cipher_class = + GMIME_CIPHER_CONTEXT_CLASS(klass); ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContextClass *crypto_class = ++ GMIME_CRYPTO_CONTEXT_CLASS(klass); ++#endif /* HAVE_GMIME_2_5_7 */ + + parent_class = g_type_class_ref(G_TYPE_OBJECT); + + object_class->finalize = g_mime_gpgme_context_finalize; + ++#ifndef HAVE_GMIME_2_5_7 + cipher_class->hash_id = g_mime_gpgme_hash_id; + cipher_class->hash_name = g_mime_gpgme_hash_name; + cipher_class->sign = g_mime_gpgme_sign; + cipher_class->verify = g_mime_gpgme_verify; + cipher_class->encrypt = g_mime_gpgme_encrypt; + cipher_class->decrypt = g_mime_gpgme_decrypt; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto_class->digest_id = g_mime_gpgme_digest_id; ++ crypto_class->digest_name = g_mime_gpgme_digest_name; ++ crypto_class->get_signature_protocol = ++ g_mime_gpgme_get_signature_protocol; ++ crypto_class->get_encryption_protocol = ++ g_mime_gpgme_get_encryption_protocol; ++ crypto_class->get_key_exchange_protocol = ++ g_mime_gpgme_get_key_exchange_protocol; ++ crypto_class->sign = g_mime_gpgme_sign; ++ crypto_class->verify = g_mime_gpgme_verify; ++ crypto_class->encrypt = g_mime_gpgme_encrypt; ++ crypto_class->decrypt = g_mime_gpgme_decrypt; ++#endif /* HAVE_GMIME_2_5_7 */ + + if (gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP) == + GPG_ERR_NO_ERROR) +@@ -190,7 +263,11 @@ g_mime_gpgme_context_finalize(GObject * object) + } + + #if !defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + g_object_unref(GMIME_CIPHER_CONTEXT(ctx)->session); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(GMIME_CRYPTO_CONTEXT(ctx)->session); ++#endif /* HAVE_GMIME_2_5_7 */ + #endif /* HAVE_GMIME_2_6 */ + + G_OBJECT_CLASS(parent_class)->finalize(object); +@@ -200,15 +277,26 @@ g_mime_gpgme_context_finalize(GObject * object) + /* + * Convert a hash algorithm name to a number + */ ++#ifndef HAVE_GMIME_2_5_7 + static GMimeCipherHash + g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDigestAlgo ++g_mime_gpgme_digest_id(GMimeCryptoContext * ctx, const char *hash) ++#endif /* HAVE_GMIME_2_5_7 */ + { ++#ifndef HAVE_GMIME_2_5_7 + if (hash == NULL) + return GMIME_CIPHER_HASH_DEFAULT; ++#else /* HAVE_GMIME_2_5_7 */ ++ if (hash == NULL) ++ return GMIME_DIGEST_ALGO_DEFAULT; ++#endif /* HAVE_GMIME_2_5_7 */ + + if (!g_ascii_strcasecmp(hash, "pgp-")) + hash += 4; + ++#ifndef HAVE_GMIME_2_5_7 + if (!g_ascii_strcasecmp(hash, "md2")) + return GMIME_CIPHER_HASH_MD2; + else if (!g_ascii_strcasecmp(hash, "md5")) +@@ -223,6 +311,22 @@ g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) + return GMIME_CIPHER_HASH_HAVAL5160; + + return GMIME_CIPHER_HASH_DEFAULT; ++#else /* HAVE_GMIME_2_5_7 */ ++ if (!g_ascii_strcasecmp(hash, "md2")) ++ return GMIME_DIGEST_ALGO_MD2; ++ else if (!g_ascii_strcasecmp(hash, "md5")) ++ return GMIME_DIGEST_ALGO_MD5; ++ else if (!g_ascii_strcasecmp(hash, "sha1")) ++ return GMIME_DIGEST_ALGO_SHA1; ++ else if (!g_ascii_strcasecmp(hash, "ripemd160")) ++ return GMIME_DIGEST_ALGO_RIPEMD160; ++ else if (!g_ascii_strcasecmp(hash, "tiger192")) ++ return GMIME_DIGEST_ALGO_TIGER192; ++ else if (!g_ascii_strcasecmp(hash, "haval-5-160")) ++ return GMIME_DIGEST_ALGO_HAVAL5160; ++ ++ return GMIME_DIGEST_ALGO_DEFAULT; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -230,7 +334,11 @@ g_mime_gpgme_hash_id(GMimeCipherContext * ctx, const char *hash) + * Convert a hash algorithm number to a string + */ + static const char * ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_digest_name(GMimeCryptoContext * context, GMimeDigestAlgo hash) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); + char *p; +@@ -239,6 +347,7 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + g_return_val_if_fail(ctx->gpgme_ctx, NULL); + + /* note: this is only a subset of the hash algorithms gpg(me) supports */ ++#ifndef HAVE_GMIME_2_5_7 + switch (hash) { + case GMIME_CIPHER_HASH_MD2: + p = "pgp-md2"; +@@ -258,6 +367,27 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + case GMIME_CIPHER_HASH_HAVAL5160: + p = "pgp-haval-5-160"; + break; ++#else /* HAVE_GMIME_2_5_7 */ ++ switch (hash) { ++ case GMIME_DIGEST_ALGO_MD2: ++ p = "pgp-md2"; ++ break; ++ case GMIME_DIGEST_ALGO_MD5: ++ p = "pgp-md5"; ++ break; ++ case GMIME_DIGEST_ALGO_SHA1: ++ p = "pgp-sha1"; ++ break; ++ case GMIME_DIGEST_ALGO_RIPEMD160: ++ p = "pgp-ripemd160"; ++ break; ++ case GMIME_DIGEST_ALGO_TIGER192: ++ p = "pgp-tiger192"; ++ break; ++ case GMIME_DIGEST_ALGO_HAVAL5160: ++ p = "pgp-haval-5-160"; ++ break; ++#endif /* HAVE_GMIME_2_5_7 */ + default: + if (!(p = ctx->micalg)) + return p; +@@ -270,6 +400,29 @@ g_mime_gpgme_hash_name(GMimeCipherContext * context, GMimeCipherHash hash) + return p; + } + ++#ifdef HAVE_GMIME_2_5_7 ++static const char * ++g_mime_gpgme_get_signature_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->sign_protocol; ++} ++ ++static const char * ++g_mime_gpgme_get_encryption_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->encrypt_protocol; ++} ++ ++static const char * ++g_mime_gpgme_get_key_exchange_protocol(GMimeCryptoContext * context) ++{ ++ GMimeGpgmeContext *ctx = GMIME_GPGME_CONTEXT(context); ++ return ctx->key_protocol; ++} ++ ++#endif /* HAVE_GMIME_2_5_7 */ + + /* + * Wrapper to convert the passphrase returned from the gmime session to gpgme. +@@ -279,7 +432,11 @@ g_mime_session_passphrase(void *HOOK, const char *UID_HINT, + const char *PASSPHRASE_INFO, int PREV_WAS_BAD, + int FD) + { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *ctx = GMIME_CIPHER_CONTEXT(HOOK); ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *ctx = GMIME_CRYPTO_CONTEXT(HOOK); ++#endif /* HAVE_GMIME_2_5_7 */ + #if defined(HAVE_GMIME_2_6) + GMimeStream *stream; + gboolean rc; +@@ -366,9 +523,15 @@ cb_data_release(void *handle) + * arg, but set the value in the context. + */ + static int ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_sign(GMimeCipherContext * context, const char *userid, + GMimeCipherHash hash, GMimeStream * istream, + GMimeStream * ostream, GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_sign(GMimeCryptoContext * context, const char *userid, ++ GMimeDigestAlgo hash, GMimeStream * istream, ++ GMimeStream * ostream, GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_sig_mode_t sig_mode; +@@ -460,6 +623,7 @@ g_mime_gpgme_sign(GMimeCipherContext * context, const char *userid, + } + + ++#ifndef HAVE_GMIME_2_5_7 + /* + * In standard mode, verify that sigstream contains a detached signature for + * istream. In single-part mode (RFC 2440, RFC 2633 application/pkcs7-mime), +@@ -471,13 +635,33 @@ static GMimeSignatureValidity * + g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + GMimeStream * istream, GMimeStream * sigstream, + GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++/* ++ * In standard mode, verify that sigstream contains a detached signature for ++ * istream. In single-part mode (RFC 2440, RFC 2633 application/pkcs7-mime), ++ * istream contains clearsigned data, and sigstream will be filled with the ++ * verified plaintext. The routine returns a GMimeSignatureList object. ++ * More information is saved in the context's signature object. ++ * On error error is set accordingly. ++ */ ++static GMimeSignatureList * ++g_mime_gpgme_verify(GMimeCryptoContext * context, GMimeDigestAlgo hash, ++ GMimeStream * istream, GMimeStream * sigstream, ++ GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; + gpgme_protocol_t protocol; + gpgme_error_t err; + gpgme_data_t msg, sig; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *list; ++ GMimeSignature *signature; ++ ++#endif /* HAVE_GMIME_2_5_7 */ + struct gpgme_data_cbs cbs = { + (gpgme_data_read_cb_t) g_mime_gpgme_stream_rd, /* read method */ + (gpgme_data_write_cb_t) g_mime_gpgme_stream_wr, /* write method */ +@@ -521,6 +705,7 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + ctx->sig_state = + g_mime_gpgme_sigstat_new_from_gpgme_ctx(gpgme_ctx); + ++#ifndef HAVE_GMIME_2_5_7 + validity = g_mime_signature_validity_new(); + if (ctx->sig_state) { + switch (ctx->sig_state->status) +@@ -536,12 +721,44 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + } + } else + g_mime_signature_validity_set_status(validity, GMIME_SIGNATURE_STATUS_UNKNOWN); ++#else /* HAVE_GMIME_2_5_7 */ ++ list = g_mime_signature_list_new(); ++ signature = g_mime_signature_new(); ++ g_mime_signature_list_add(list, signature); ++ ++ if (ctx->sig_state) { ++ switch (ctx->sig_state->status) ++ { ++ case GPG_ERR_NO_ERROR: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_GOOD); ++ break; ++ case GPG_ERR_NOT_SIGNED: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, ++ GMIME_SIGNATURE_ERROR_NONE); ++ break; ++ default: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_BAD); ++ } ++ } else { ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, GMIME_SIGNATURE_ERROR_NONE); ++ } ++#endif /* HAVE_GMIME_2_5_7 */ + + /* release gmgme data buffers */ + gpgme_data_release(msg); + gpgme_data_release(sig); + ++#ifndef HAVE_GMIME_2_5_7 + return validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ return list; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -549,10 +766,19 @@ g_mime_gpgme_verify(GMimeCipherContext * context, GMimeCipherHash hash, + * Encrypt istream to ostream for recipients. If sign is set, sign by userid. + */ + static int ++#ifndef HAVE_GMIME_2_5_7 + g_mime_gpgme_encrypt(GMimeCipherContext * context, gboolean sign, + const char *userid, GPtrArray * recipients, + GMimeStream * istream, GMimeStream * ostream, + GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++g_mime_gpgme_encrypt(GMimeCryptoContext * context, gboolean sign, ++ const char *userid, ++ GMimeDigestAlgo digest, ++ GPtrArray * recipients, ++ GMimeStream * istream, GMimeStream * ostream, ++ GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; +@@ -653,9 +879,15 @@ g_mime_gpgme_encrypt(GMimeCipherContext * context, gboolean sign, + * Decrypt istream to ostream. In RFC 2440 mode, also try to check an included + * signature (if any). + */ ++#ifndef HAVE_GMIME_2_5_7 + static GMimeSignatureValidity * + g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + GMimeStream * ostream, GError ** error) ++#else /* HAVE_GMIME_2_5_7 */ ++static GMimeDecryptResult * ++g_mime_gpgme_decrypt(GMimeCryptoContext * context, GMimeStream * istream, ++ GMimeStream * ostream, GError ** error) ++#endif /* HAVE_GMIME_2_5_7 */ + { + GMimeGpgmeContext *ctx = (GMimeGpgmeContext *) context; + gpgme_ctx_t gpgme_ctx; +@@ -668,7 +900,13 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + NULL, /* seek method */ + cb_data_release /* release method */ + }; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeDecryptResult *result; ++ GMimeSignatureList *list; ++ GMimeSignature *signature; ++#endif /* HAVE_GMIME_2_5_7 */ + + /* some paranoia checks */ + g_return_val_if_fail(ctx, NULL); +@@ -716,6 +954,7 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + /* try to get information about the signature (if any) */ + ctx->sig_state = g_mime_gpgme_sigstat_new_from_gpgme_ctx(gpgme_ctx); + ++#ifndef HAVE_GMIME_2_5_7 + validity = g_mime_signature_validity_new(); + if (ctx->sig_state) { + switch (ctx->sig_state->status) +@@ -733,14 +972,57 @@ g_mime_gpgme_decrypt(GMimeCipherContext * context, GMimeStream * istream, + g_mime_signature_validity_set_status(validity, GMIME_SIGNATURE_STATUS_UNKNOWN); + + return validity; ++#else /* HAVE_GMIME_2_5_7 */ ++ list = g_mime_signature_list_new(); ++ signature = g_mime_signature_new(); ++ g_mime_signature_list_add(list, signature); ++ result = g_mime_decrypt_result_new(); ++ g_mime_decrypt_result_set_signatures(result, list); ++ ++ if (ctx->sig_state) { ++ switch (ctx->sig_state->status) ++ { ++ case GPG_ERR_NO_ERROR: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_GOOD); ++ break; ++ case GPG_ERR_NOT_SIGNED: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, ++ GMIME_SIGNATURE_ERROR_NONE); ++ break; ++ default: ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_BAD); ++ } ++ } else { ++ g_mime_signature_set_status(signature, ++ GMIME_SIGNATURE_STATUS_ERROR); ++ g_mime_signature_set_errors(signature, GMIME_SIGNATURE_ERROR_NONE); ++ } ++ ++ return result; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + ++#ifndef HAVE_GMIME_2_5_7 + /* + * Create a new gpgme cipher context with protocol. If anything fails, return + * NULL and set error. + */ ++#else /* HAVE_GMIME_2_5_7 */ ++/* ++ * Create a new gpgme crypto context with protocol. If anything fails, return ++ * NULL and set error. ++ */ ++#endif /* HAVE_GMIME_2_5_7 */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeCryptoContext * ++#endif /* HAVE_GMIME_2_5_7 */ + #if defined(HAVE_GMIME_2_6) + g_mime_gpgme_context_new(GMimePasswordRequestFunc request_passwd, + gpgme_protocol_t protocol, GError ** error) +@@ -749,7 +1031,11 @@ g_mime_gpgme_context_new(GMimeSession * session, + gpgme_protocol_t protocol, GError ** error) + #endif /* HAVE_GMIME_2_6 */ + { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *cipher; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *crypto; ++#endif /* HAVE_GMIME_2_5_7 */ + GMimeGpgmeContext *ctx; + gpgme_error_t err; + gpgme_ctx_t gpgme_ctx; +@@ -766,14 +1052,22 @@ g_mime_gpgme_context_new(GMimeSession * session, + return NULL; + } + ++#ifndef HAVE_GMIME_2_5_7 + /* create the cipher context */ ++#else /* HAVE_GMIME_2_5_7 */ ++ /* create the crypto context */ ++#endif /* HAVE_GMIME_2_5_7 */ + ctx = g_object_new(GMIME_TYPE_GPGME_CONTEXT, NULL, NULL); + if (!ctx) { + gpgme_release(gpgme_ctx); + return NULL; + } else + ctx->gpgme_ctx = gpgme_ctx; ++#ifndef HAVE_GMIME_2_5_7 + cipher = (GMimeCipherContext *) ctx; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto = (GMimeCryptoContext *) ctx; ++#endif /* HAVE_GMIME_2_5_7 */ + + /* check if the requested protocol is available */ + if (!g_mime_gpgme_context_check_protocol +@@ -785,23 +1079,47 @@ g_mime_gpgme_context_new(GMimeSession * session, + + /* setup according to requested protocol */ + #if defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + cipher->request_passwd = request_passwd; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto->request_passwd = request_passwd; ++#endif /* HAVE_GMIME_2_5_7 */ + #else /* HAVE_GMIME_2_6 */ ++#ifndef HAVE_GMIME_2_5_7 + cipher->session = session; ++#else /* HAVE_GMIME_2_5_7 */ ++ crypto->session = session; ++#endif /* HAVE_GMIME_2_5_7 */ + g_object_ref(session); + #endif /* HAVE_GMIME_2_6 */ + gpgme_set_protocol(gpgme_ctx, protocol); + if (protocol == GPGME_PROTOCOL_OpenPGP) { ++#ifndef HAVE_GMIME_2_5_7 + cipher->sign_protocol = "application/pgp-signature"; + cipher->encrypt_protocol = "application/pgp-encrypted"; + cipher->key_protocol = NULL; /* FIXME */ ++#else /* HAVE_GMIME_2_5_7 */ ++ ctx->sign_protocol = "application/pgp-signature"; ++ ctx->encrypt_protocol = "application/pgp-encrypted"; ++ ctx->key_protocol = NULL; /* FIXME */ ++#endif /* HAVE_GMIME_2_5_7 */ + } else { ++#ifndef HAVE_GMIME_2_5_7 + cipher->sign_protocol = "application/pkcs7-signature"; + cipher->encrypt_protocol = "application/pkcs7-mime"; + cipher->key_protocol = NULL; /* FIXME */ ++#else /* HAVE_GMIME_2_5_7 */ ++ ctx->sign_protocol = "application/pkcs7-signature"; ++ ctx->encrypt_protocol = "application/pkcs7-mime"; ++ ctx->key_protocol = NULL; /* FIXME */ ++#endif /* HAVE_GMIME_2_5_7 */ + } + ++#ifndef HAVE_GMIME_2_5_7 + return cipher; ++#else /* HAVE_GMIME_2_5_7 */ ++ return crypto; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +diff --git a/libbalsa/gmime-gpgme-context.h b/libbalsa/gmime-gpgme-context.h +index 585d927..19c5fae 100644 +--- a/libbalsa/gmime-gpgme-context.h ++++ b/libbalsa/gmime-gpgme-context.h +@@ -63,7 +63,11 @@ typedef gboolean(*GMimeGpgmeKeyTrustCB) (const gchar * name, + GMimeGpgmeContext * ctx); + + struct _GMimeGpgmeContext { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext parent_object; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext parent_object; ++#endif /* HAVE_GMIME_2_5_7 */ + + gpgme_ctx_t gpgme_ctx; /* gpgme context */ + gboolean singlepart_mode; /* set context to single-part mode (RFC 2440, 2633) */ +@@ -73,11 +77,21 @@ struct _GMimeGpgmeContext { + GMimeGpgmeKeySelectCB key_select_cb; /* key selection callback */ + GMimeGpgmeKeyTrustCB key_trust_cb; /* low trust key cb */ + gpgme_passphrase_cb_t passphrase_cb; /* passphrase callback */ ++#ifdef HAVE_GMIME_2_5_7 ++ ++ const gchar *sign_protocol; ++ const gchar *encrypt_protocol; ++ const gchar *key_protocol; ++#endif /* HAVE_GMIME_2_5_7 */ + }; + + + struct _GMimeGpgmeContextClass { ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContextClass parent_class; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContextClass parent_class; ++#endif /* HAVE_GMIME_2_5_7 */ + + gboolean has_proto_openpgp; + gboolean has_proto_cms; +@@ -86,10 +100,17 @@ struct _GMimeGpgmeContextClass { + + GType g_mime_gpgme_context_get_type(void); + #if defined(HAVE_GMIME_2_6) ++#ifndef HAVE_GMIME_2_5_7 + GMimeCipherContext *g_mime_gpgme_context_new(GMimePasswordRequestFunc + request_passwd, + gpgme_protocol_t protocol, + GError ** error); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeCryptoContext *g_mime_gpgme_context_new(GMimePasswordRequestFunc ++ request_passwd, ++ gpgme_protocol_t protocol, ++ GError ** error); ++#endif /* HAVE_GMIME_2_5_7 */ + #else /* HAVE_GMIME_2_6 */ + GMimeCipherContext *g_mime_gpgme_context_new(GMimeSession * session, + gpgme_protocol_t protocol, +diff --git a/libbalsa/gmime-part-rfc2440.c b/libbalsa/gmime-part-rfc2440.c +index 795d2e1..e79c4cb 100644 +--- a/libbalsa/gmime-part-rfc2440.c ++++ b/libbalsa/gmime-part-rfc2440.c +@@ -112,8 +112,13 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + + g_return_val_if_fail(GMIME_IS_PART(part), -1); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), -1); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->sign_protocol != NULL, + -1); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, -1); ++#endif /* HAVE_GMIME_2_5_7 */ + g_return_val_if_fail(recipients != NULL || sign_userid != NULL, -1); + + /* get the raw content */ +@@ -131,14 +136,27 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + ctx->singlepart_mode = TRUE; + if (recipients == NULL) + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_sign(GMIME_CIPHER_CONTEXT(ctx), sign_userid, + GMIME_CIPHER_HASH_DEFAULT, stream, + cipherstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_sign(GMIME_CRYPTO_CONTEXT(ctx), sign_userid, ++ GMIME_CIPHER_ALGO_DEFAULT, stream, ++ cipherstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + else + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_encrypt(GMIME_CIPHER_CONTEXT(ctx), + sign_userid != NULL, sign_userid, + recipients, stream, cipherstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_encrypt(GMIME_CRYPTO_CONTEXT(ctx), ++ sign_userid != NULL, sign_userid, ++ GMIME_CIPHER_ALGO_DEFAULT, ++ recipients, stream, cipherstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + if (result == -1) { + g_object_unref(cipherstream); + return -1; +@@ -202,18 +220,31 @@ g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + * set on err to provide more information. Upon success, the content + * of part is replaced by the verified output of the crypto engine. + */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeSignatureList * ++#endif /* HAVE_GMIME_2_5_7 */ + g_mime_part_rfc2440_verify(GMimePart * part, + GMimeGpgmeContext * ctx, GError ** err) + { + GMimeStream *stream, *plainstream; + GMimeDataWrapper * wrapper; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *list; ++#endif /* HAVE_GMIME_2_5_7 */ + + g_return_val_if_fail(GMIME_IS_PART(part), NULL); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->sign_protocol != NULL, + NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_signature_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* get the raw content */ + wrapper = g_mime_part_get_content_object(GMIME_PART(part)); +@@ -227,13 +258,25 @@ g_mime_part_rfc2440_verify(GMimePart * part, + + /* verify the signature */ + ctx->singlepart_mode = TRUE; ++#ifndef HAVE_GMIME_2_5_7 + valid = + g_mime_cipher_context_verify(GMIME_CIPHER_CONTEXT(ctx), + GMIME_CIPHER_HASH_DEFAULT, stream, + plainstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ list = ++ g_mime_crypto_context_verify(GMIME_CRYPTO_CONTEXT(ctx), ++ GMIME_CIPHER_ALGO_DEFAULT, stream, ++ plainstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* upon success, replace the signed content by the checked one */ +- if (valid) { ++#ifndef HAVE_GMIME_2_5_7 ++ if (valid) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (list) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + GMimeDataWrapper *wrapper = g_mime_data_wrapper_new(); + + g_mime_data_wrapper_set_stream(wrapper, plainstream); +@@ -242,7 +285,11 @@ g_mime_part_rfc2440_verify(GMimePart * part, + } + g_object_unref(plainstream); + ++#ifndef HAVE_GMIME_2_5_7 + return valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ return list; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + +@@ -255,19 +302,32 @@ g_mime_part_rfc2440_verify(GMimePart * part, + * verified and the result is placed in ctx by the underlying gpgme + * context. + */ ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity * ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeDecryptResult * ++#endif /* HAVE_GMIME_2_5_7 */ + g_mime_part_rfc2440_decrypt(GMimePart * part, + GMimeGpgmeContext * ctx, GError ** err) + { + GMimeStream *stream, *plainstream; + GMimeDataWrapper * wrapper; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *result; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeDecryptResult *result; ++#endif /* HAVE_GMIME_2_5_7 */ + gchar *headbuf = g_malloc0(1024); + + g_return_val_if_fail(GMIME_IS_PART(part), NULL); + g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), NULL); ++#ifndef HAVE_GMIME_2_5_7 + g_return_val_if_fail(GMIME_CIPHER_CONTEXT(ctx)->encrypt_protocol != + NULL, NULL); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_return_val_if_fail(g_mime_crypto_context_get_encryption_protocol ++ (GMIME_CRYPTO_CONTEXT(ctx)) != NULL, NULL); ++#endif /* HAVE_GMIME_2_5_7 */ + + /* get the raw content */ + wrapper = g_mime_part_get_content_object(part); +@@ -284,8 +344,13 @@ g_mime_part_rfc2440_decrypt(GMimePart * part, + + /* decrypt and (if possible) verify the input */ + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_cipher_context_decrypt(GMIME_CIPHER_CONTEXT(ctx), stream, + plainstream, err); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_crypto_context_decrypt(GMIME_CRYPTO_CONTEXT(ctx), stream, ++ plainstream, err); ++#endif /* HAVE_GMIME_2_5_7 */ + + if (result != NULL) { + GMimeStream *filter_stream; +diff --git a/libbalsa/gmime-part-rfc2440.h b/libbalsa/gmime-part-rfc2440.h +index 48be5a4..cc1901a 100644 +--- a/libbalsa/gmime-part-rfc2440.h ++++ b/libbalsa/gmime-part-rfc2440.h +@@ -53,12 +53,21 @@ int g_mime_part_rfc2440_sign_encrypt(GMimePart * part, + GPtrArray * recipients, + const char *sign_userid, + GError ** err); ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *g_mime_part_rfc2440_verify(GMimePart * part, + GMimeGpgmeContext * ctx, + GError ** err); + GMimeSignatureValidity *g_mime_part_rfc2440_decrypt(GMimePart * part, + GMimeGpgmeContext * + ctx, GError ** err); ++#else /* HAVE_GMIME_2_5_7 */ ++GMimeSignatureList *g_mime_part_rfc2440_verify(GMimePart * part, ++ GMimeGpgmeContext * ctx, ++ GError ** err); ++GMimeDecryptResult *g_mime_part_rfc2440_decrypt(GMimePart * part, ++ GMimeGpgmeContext * ctx, ++ GError ** err); ++#endif /* HAVE_GMIME_2_5_7 */ + + #ifdef __cplusplus + } +diff --git a/libbalsa/rfc3156.c b/libbalsa/rfc3156.c +index a56e12c..df4a2e1 100644 +--- a/libbalsa/rfc3156.c ++++ b/libbalsa/rfc3156.c +@@ -268,9 +268,15 @@ libbalsa_message_body_protection(LibBalsaMessageBody * body) + + #if defined(HAVE_GMIME_2_6) + static gboolean ++#ifndef HAVE_GMIME_2_5_7 + password_request_func(GMimeCipherContext * ctx, const char *user_id, + const char *prompt_ctx, gboolean reprompt, + GMimeStream * response, GError ** err) ++#else /* HAVE_GMIME_2_5_7 */ ++password_request_func(GMimeCryptoContext * ctx, const char *user_id, ++ const char *prompt_ctx, gboolean reprompt, ++ GMimeStream * response, GError ** err) ++#endif /* HAVE_GMIME_2_5_7 */ + { + gint fd; + gchar *name_used; +@@ -366,9 +372,16 @@ libbalsa_sign_mime_object(GMimeObject ** content, const gchar * rfc822_for, + return FALSE; + } + ++#ifndef HAVE_GMIME_2_5_7 + if (g_mime_multipart_signed_sign + (mps, *content, GMIME_CIPHER_CONTEXT(ctx), rfc822_for, +- GMIME_CIPHER_HASH_DEFAULT, error) != 0) { ++ GMIME_CIPHER_HASH_DEFAULT, error) != 0) ++#else /* HAVE_GMIME_2_5_7 */ ++ if (g_mime_multipart_signed_sign ++ (mps, *content, GMIME_CRYPTO_CONTEXT(ctx), rfc822_for, ++ GMIME_DIGEST_ALGO_DEFAULT, error) != 0) ++#endif /* HAVE_GMIME_2_5_7 */ ++ { + g_object_unref(mps); + g_object_unref(ctx); + #if !defined(HAVE_GMIME_2_6) +@@ -458,10 +471,18 @@ libbalsa_encrypt_mime_object(GMimeObject ** content, GList * rfc822_for, + + encrypted_obj = GMIME_OBJECT(mpe); + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_multipart_encrypted_encrypt(mpe, *content, + GMIME_CIPHER_CONTEXT(ctx), + FALSE, NULL, + recipients, error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_multipart_encrypted_encrypt(mpe, *content, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ FALSE, NULL, ++ GMIME_DIGEST_ALGO_DEFAULT, ++ recipients, error); ++#endif /* HAVE_GMIME_2_5_7 */ + } + #ifdef HAVE_SMIME + else { +@@ -471,9 +492,15 @@ libbalsa_encrypt_mime_object(GMimeObject ** content, GList * rfc822_for, + encrypted_obj = GMIME_OBJECT(pkcs7); + ctx->singlepart_mode = TRUE; + result = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_application_pkcs7_encrypt(pkcs7, *content, + GMIME_CIPHER_CONTEXT(ctx), + recipients, error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_application_pkcs7_encrypt(pkcs7, *content, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ recipients, error); ++#endif /* HAVE_GMIME_2_5_7 */ + } + #endif + +@@ -565,8 +592,14 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + #if !defined(HAVE_GMIME_2_6) + GMimeSession *session; + #endif /* HAVE_GMIME_2_6 */ +- GMimeCipherContext *ctx; ++#ifndef HAVE_GMIME_2_5_7 ++ GMimeCipherContext *g_mime_ctx; + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeCryptoContext *g_mime_ctx; ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ ++ GMimeGpgmeContext *ctx; + GError *error = NULL; + + /* paranoia checks */ +@@ -592,12 +625,12 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + /* try to create GMimeGpgMEContext */ + #if !defined(HAVE_GMIME_2_6) + session = g_object_new(g_mime_session_get_type(), NULL, NULL); +- ctx = g_mime_gpgme_context_new(session, protocol, &error); ++ g_mime_ctx = g_mime_gpgme_context_new(session, protocol, &error); + #else /* HAVE_GMIME_2_6 */ +- ctx = ++ g_mime_ctx = + g_mime_gpgme_context_new(password_request_func, protocol, &error); + #endif /* HAVE_GMIME_2_6 */ +- if (ctx == NULL) { ++ if (g_mime_ctx == NULL) { + if (error) { + libbalsa_information(LIBBALSA_INFORMATION_ERROR, "%s: %s", + _("creating a gpgme context failed"), +@@ -613,6 +646,7 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + body->parts->next->sig_info->status = GPGME_SIG_STAT_ERROR; + return FALSE; + } ++ ctx = GMIME_GPGME_CONTEXT(g_mime_ctx); + + /* S/MIME uses the protocol application/pkcs7-signature, but some ancient + mailers, not yet knowing RFC 2633, use application/x-pkcs7-signature, +@@ -622,14 +656,19 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + g_mime_object_get_content_type_parameter(GMIME_OBJECT (body->mime_part), + "protocol"); + if (!g_ascii_strcasecmp(cms_protocol, "application/x-pkcs7-signature")) ++#ifndef HAVE_GMIME_2_5_7 ++ g_mime_ctx->sign_protocol = cms_protocol; ++#else /* HAVE_GMIME_2_5_7 */ + ctx->sign_protocol = cms_protocol; ++#endif /* HAVE_GMIME_2_5_7 */ + } + + /* verify the signature */ + + libbalsa_mailbox_lock_store(body->message->mailbox); + valid = g_mime_multipart_signed_verify(GMIME_MULTIPART_SIGNED +- (body->mime_part), ctx, &error); ++ (body->mime_part), g_mime_ctx, ++ &error); + libbalsa_mailbox_unlock_store(body->message->mailbox); + + if (valid == NULL) { +@@ -642,12 +681,16 @@ libbalsa_body_check_signature(LibBalsaMessageBody * body, + libbalsa_information(LIBBALSA_INFORMATION_ERROR, + _("signature verification failed")); + } +- if (GMIME_GPGME_CONTEXT(ctx)->sig_state) { +- body->parts->next->sig_info = GMIME_GPGME_CONTEXT(ctx)->sig_state; ++ if (ctx->sig_state) { ++ body->parts->next->sig_info = ctx->sig_state; + g_object_ref(G_OBJECT(body->parts->next->sig_info)); + } ++#ifndef HAVE_GMIME_2_5_7 + g_mime_signature_validity_free(valid); +- g_object_unref(ctx); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(valid); ++#endif /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(g_mime_ctx); + #if !defined(HAVE_GMIME_2_6) + g_object_unref(session); + #endif /* HAVE_GMIME_2_6 */ +@@ -747,14 +790,26 @@ libbalsa_body_decrypt(LibBalsaMessageBody * body, + libbalsa_mailbox_lock_store(body->message->mailbox); + if (protocol == GPGME_PROTOCOL_OpenPGP) + mime_obj = ++#ifndef HAVE_GMIME_2_5_7 + g_mime_multipart_encrypted_decrypt(GMIME_MULTIPART_ENCRYPTED(body->mime_part), + GMIME_CIPHER_CONTEXT(ctx), + &error); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_mime_multipart_encrypted_decrypt(GMIME_MULTIPART_ENCRYPTED(body->mime_part), ++ GMIME_CRYPTO_CONTEXT(ctx), ++ NULL, ++ &error); ++#endif /* HAVE_GMIME_2_5_7 */ + #ifdef HAVE_SMIME + else if (smime_signed) { ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ + + ctx->singlepart_mode = TRUE; ++#ifndef HAVE_GMIME_2_5_7 + mime_obj = + g_mime_application_pkcs7_verify(GMIME_PART(body->mime_part), + &valid, +@@ -766,6 +821,19 @@ libbalsa_body_decrypt(LibBalsaMessageBody * body, + g_mime_application_pkcs7_decrypt(GMIME_PART(body->mime_part), + GMIME_CIPHER_CONTEXT(ctx), + &error); ++#else /* HAVE_GMIME_2_5_7 */ ++ mime_obj = ++ g_mime_application_pkcs7_verify(GMIME_PART(body->mime_part), ++ &valid, ++ GMIME_CRYPTO_CONTEXT(ctx), ++ &error); ++ g_object_unref(valid); ++ } else ++ mime_obj = ++ g_mime_application_pkcs7_decrypt(GMIME_PART(body->mime_part), ++ GMIME_CRYPTO_CONTEXT(ctx), ++ &error); ++#endif /* HAVE_GMIME_2_5_7 */ + #endif + libbalsa_mailbox_unlock_store(body->message->mailbox); + +@@ -906,7 +974,11 @@ libbalsa_rfc2440_verify(GMimePart * part, GMimeGpgmeSigstat ** sig_info) + GMimeSession *session; + #endif /* HAVE_GMIME_2_6 */ + GMimeGpgmeContext *ctx; ++#ifndef HAVE_GMIME_2_5_7 + GMimeSignatureValidity *valid; ++#else /* HAVE_GMIME_2_5_7 */ ++ GMimeSignatureList *valid; ++#endif /* HAVE_GMIME_2_5_7 */ + GError *error = NULL; + gpgme_error_t retval; + +@@ -978,7 +1050,11 @@ libbalsa_rfc2440_verify(GMimePart * part, GMimeGpgmeSigstat ** sig_info) + } + + /* clean up */ ++#ifndef HAVE_GMIME_2_5_7 + g_mime_signature_validity_free(valid); ++#else /* HAVE_GMIME_2_5_7 */ ++ g_object_unref(valid); ++#endif /* HAVE_GMIME_2_5_7 */ + retval = ctx->sig_state->status; + g_object_unref(ctx); + #if !defined(HAVE_GMIME_2_6) +-- +cgit v0.9.0.2 diff --git a/community-testing/dbmail/PKGBUILD b/community-testing/dbmail/PKGBUILD new file mode 100644 index 000000000..e7fd4b3ad --- /dev/null +++ b/community-testing/dbmail/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 62080 2012-01-15 19:14:39Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Sebastian Faltoni <sebastian.faltoni@gmail.com> + +pkgname=dbmail +pkgver=3.0.0_rc3 +pkgrel=1 +pkgdesc="Fast and scalable sql based mail services" +arch=('i686' 'x86_64') +depends=('gmime' 'libzdb' 'mhash' 'libevent') +makedepends=('asciidoc' 'xmlto' 'docbook-xsl' 'docbook-xml' 'postgresql-libs>=8.4.1' + 'sqlite3' 'libmysqlclient' 'libldap>=2.4.18' 'libsieve') +optdepends=('postgresql-libs: for PostgreSQL storage backend' + 'sqlite3: for SQLite storage backend' + 'libmysqlclient: for MySQL storage backend' + 'libldap: for LDAP authentication' + 'libsieve: for dbmail-sieve') +url="http://www.dbmail.org" +license=('GPL') +options=('!libtool' 'zipman') +backup=(etc/conf.d/dbmail) +conflicts=('dbmail') +provides=('dbmail') +source=(http://www.dbmail.org/download/3.0/dbmail-${pkgver/_/-}.tar.gz + dbmail.conf.d + dbmail.rc.d) +md5sums=('52c3b9aad310efc90a6a2fff0552f73e' + 'e7f72bc360decdb2475266391ad12329' + '099225611da20ec194c092ac9befc33c') + +build() { + cd $srcdir/dbmail-${pkgver/_/-}/ + + [ -f Makefile ] || ./configure --prefix=/usr \ + --with-mysql --with-pgsql --with-sqlite --with-ldap --with-sieve + make +} + +package() { + cd $srcdir/dbmail-${pkgver/_/-}/ + make DESTDIR=$pkgdir install + (cd man && make && make install DESTDIR=$pkgdir) + + mkdir $pkgdir/etc + install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample + install -Dm644 ../dbmail.conf.d $pkgdir/etc/conf.d/dbmail + install -Dm755 ../dbmail.rc.d $pkgdir/etc/rc.d/dbmail + mkdir $pkgdir/usr/share/dbmail + cp -r sql/* $pkgdir/usr/share/dbmail/ + cp dbmail.schema $pkgdir/usr/share/dbmail/ +} diff --git a/community-testing/dbmail/dbmail-2.2.10-pam-support.patch b/community-testing/dbmail/dbmail-2.2.10-pam-support.patch new file mode 100644 index 000000000..805a7f609 --- /dev/null +++ b/community-testing/dbmail/dbmail-2.2.10-pam-support.patch @@ -0,0 +1,251 @@ +diff -wbBur dbmail-2.2.10/configure.in dbmail-2.2.10.pam/configure.in +--- dbmail-2.2.10/configure.in 2008-03-24 17:49:33.000000000 +0300 ++++ dbmail-2.2.10.pam/configure.in 2008-09-18 16:43:04.000000000 +0400 +@@ -78,6 +78,13 @@ + + AC_SUBST(CRYPTLIB) + ++dnl Check for PAM ++AC_SUBST(PAMLIBS,"") ++AC_CHECK_HEADERS(security/pam_appl.h, ++ [AC_CHECK_LIB(pam,pam_start, ++ [AC_DEFINE(HAVE_PAM,1,[Define if you have PAN including devel headers]) ++ PAMLIBS="-lpam"],,)]) ++ + AC_SUBST(MYSQLLIB) + AC_SUBST(MYSQLALIB) + AC_SUBST(MYSQLLTLIB) +diff -wbBur dbmail-2.2.10/dbmail-user.c dbmail-2.2.10.pam/dbmail-user.c +--- dbmail-2.2.10/dbmail-user.c 2008-03-24 17:49:33.000000000 +0300 ++++ dbmail-2.2.10.pam/dbmail-user.c 2008-09-18 16:43:04.000000000 +0400 +@@ -157,7 +157,7 @@ + "md5", "md5-raw", "md5sum", "md5sum-raw", + "md5-hash", "md5-hash-raw", "md5-digest", "md5-digest-raw", + "md5-base64", "md5-base64-raw", "md5base64", "md5base64-raw", +- "shadow", "", NULL ++ "shadow", "pam", "", NULL + }; + + /* These must correspond to the easy text names. */ +@@ -166,7 +166,7 @@ + MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW, + MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW, + MD5_BASE64, MD5_BASE64_RAW, MD5_BASE64, MD5_BASE64_RAW, +- SHADOW, PLAINTEXT, PWTYPE_NULL ++ SHADOW, PWTYPE_PAM, PLAINTEXT, PWTYPE_NULL + }; + + memset(pw, 0, 50); +@@ -251,6 +251,12 @@ + *enctype = "crypt"; + } + break; ++#ifdef HAVE_PAM ++ case PWTYPE_PAM: ++ null_strncpy(pw, passwd, 49); ++ *enctype = "pam"; ++ break; ++#endif + default: + qerrorf("Error: password type not supported [%s].\n", + passwdtype); +diff -wbBur dbmail-2.2.10/dbmail-user.h dbmail-2.2.10.pam/dbmail-user.h +--- dbmail-2.2.10/dbmail-user.h 2008-03-24 17:49:33.000000000 +0300 ++++ dbmail-2.2.10.pam/dbmail-user.h 2008-09-18 16:43:04.000000000 +0400 +@@ -34,7 +34,7 @@ + typedef enum { + PLAINTEXT = 0, PLAINTEXT_RAW, CRYPT, CRYPT_RAW, + MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW, +- MD5_BASE64, MD5_BASE64_RAW, SHADOW, PWTYPE_NULL ++ MD5_BASE64, MD5_BASE64_RAW, SHADOW, PWTYPE_PAM, PWTYPE_NULL + } pwtype_t; + + int mkpassword(const char * const user, const char * const passwd, +diff -wbBur dbmail-2.2.10/modules/authsql.c dbmail-2.2.10.pam/modules/authsql.c +--- dbmail-2.2.10/modules/authsql.c 2008-03-24 17:49:33.000000000 +0300 ++++ dbmail-2.2.10.pam/modules/authsql.c 2008-09-18 16:43:04.000000000 +0400 +@@ -27,6 +27,19 @@ + #include "dbmail.h" + #define THIS_MODULE "auth" + ++#ifdef HAVE_PAM ++#include <security/pam_appl.h> ++ ++#ifndef DEFAULT_DBMAIL_PAM_SERVICE ++#define DEFAULT_DBMAIL_PAM_SERVICE "dbmail" ++#endif ++ ++#ifndef DEFAULT_DBMAIL_PAM_TTL ++#define DEFAULT_DBMAIL_PAM_TTL 60 ++#endif ++ ++#endif ++ + extern db_param_t _db_params; + #define DBPFX _db_params.pfx + +@@ -49,17 +62,80 @@ + */ + static int __auth_query(const char *thequery); + ++#ifdef HAVE_PAM ++ ++static char *pam_password = NULL; /* Workaround for Solaris 2.6 brokenness */ ++static pam_handle_t *pamh = NULL; ++static int pam_ttl = DEFAULT_DBMAIL_PAM_TTL; ++static char *pam_service = DEFAULT_DBMAIL_PAM_SERVICE; ++static time_t pamh_created = 0; ++/* ++ * A simple "conversation" function returning the supplied password. ++ * Has a bit to much error control, but this is my first PAM application ++ * so I'd rather check everything than make any mistakes. The function ++ * expects a single converstation message of type PAM_PROMPT_ECHO_OFF. ++ */ ++static int ++password_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) ++{ ++ if (num_msg != 1 || msg[0]->msg_style != PAM_PROMPT_ECHO_OFF) { ++ TRACE(TRACE_ERROR, "Unexpected PAM converstaion '%d/%s'", msg[0]->msg_style, msg[0]->msg); ++ return PAM_CONV_ERR; ++ } ++ if (!appdata_ptr) { ++ /* Workaround for Solaris 2.6 where the PAM library is broken ++ * and does not pass appdata_ptr to the conversation routine ++ */ ++ appdata_ptr = pam_password; ++ } ++ if (!appdata_ptr) { ++ TRACE(TRACE_ERROR, "ERROR: No password available to password_converstation!"); ++ return PAM_CONV_ERR; ++ } ++ *resp = calloc(num_msg, sizeof(struct pam_response)); ++ if (!*resp) { ++ TRACE(TRACE_ERROR, "Out of memory!"); ++ return PAM_CONV_ERR; ++ } ++ (*resp)[0].resp = strdup((char *) appdata_ptr); ++ (*resp)[0].resp_retcode = 0; ++ ++ return ((*resp)[0].resp ? PAM_SUCCESS : PAM_CONV_ERR); ++} ++ ++static struct pam_conv conv = ++{ ++ &password_conversation, ++ NULL ++}; ++ ++#endif ++ ++ + int auth_connect() + { + /* this function is only called after a connection has been made + * if, in the future this is not the case, db.h should export a + * function that enables checking for the database connection + */ ++#ifdef HAVE_PAM ++ ++#endif + return 0; + } + + int auth_disconnect() + { ++#ifdef HAVE_PAM ++ int retval=PAM_SUCCESS; ++ if (pamh) { ++ retval = pam_end(pamh, retval); ++ if (retval != PAM_SUCCESS) { ++ pamh = NULL; ++ TRACE(TRACE_ERROR, "failed to release PAM authenticator"); ++ } ++ } ++#endif + return 0; + } + +@@ -458,7 +534,71 @@ + is_validated = (strncmp(md5str, query_result, 32) == 0) ? 1 : 0; + g_free(md5str); + } ++#ifdef HAVE_PAM ++ else if (strcasecmp(query_result, "pam") == 0) { ++ int retval=0; ++ TRACE(TRACE_DEBUG, "validating using pam for user [%s] pass:[%s]",real_username,password); ++ conv.appdata_ptr = (char *) password; ++ pam_password= password; ++ if (pam_ttl == 0) { ++ /* Create PAM connection */ ++ retval = pam_start(pam_service, real_username, &conv, &pamh); ++ if (retval != PAM_SUCCESS) { ++ TRACE(TRACE_ERROR, "failed to create PAM authenticator"); ++ goto pam_error; ++ } ++ } else if (!pamh || (time(NULL) - pamh_created) >= pam_ttl || pamh_created > time(NULL)) { ++ /* Close previous PAM connection */ ++ if (pamh) { ++ retval = pam_end(pamh, retval); ++ if (retval != PAM_SUCCESS) { ++ TRACE(TRACE_WARNING, "failed to release PAM authenticator"); ++ } ++ pamh = NULL; ++ } ++ /* Initialize persistent PAM connection */ ++ retval = pam_start(pam_service, "dbmail@", &conv, &pamh); ++ if (retval != PAM_SUCCESS) { ++ TRACE(TRACE_ERROR, "failed to create PAM authenticator"); ++ goto pam_error; ++ } ++ pamh_created = time(NULL); ++ } ++ retval = PAM_SUCCESS; ++ if (pam_ttl != 0) { ++ if (retval == PAM_SUCCESS) ++ retval = pam_set_item(pamh, PAM_USER, real_username); ++ if (retval == PAM_SUCCESS) ++ retval = pam_set_item(pamh, PAM_CONV, &conv); ++ } ++ if (retval == PAM_SUCCESS) ++ retval = pam_authenticate(pamh, 0); ++ if (retval == PAM_SUCCESS ) //&& !no_acct_mgmt ++ retval = pam_acct_mgmt(pamh, 0); ++ if (retval == PAM_SUCCESS) { ++ is_validated=1; ++ } else { ++pam_error: ++ is_validated=0; ++ } ++ /* cleanup */ ++ retval = PAM_SUCCESS; ++#ifdef PAM_AUTHTOK ++ if (pam_ttl != 0) { ++ if (retval == PAM_SUCCESS) ++ retval = pam_set_item(pamh, PAM_AUTHTOK, NULL); ++ } ++#endif ++ if (pam_ttl == 0 || retval != PAM_SUCCESS) { ++ retval = pam_end(pamh, retval); ++ if (retval != PAM_SUCCESS) { ++ TRACE(TRACE_WARNING, "failed to release PAM authenticator\n"); ++ } ++ pamh = NULL; ++ } + ++ } ++#endif + if (is_validated) { + db_user_log_login(*user_idnr); + } else { +diff -wbBur dbmail-2.2.10/modules/Makefile.am dbmail-2.2.10.pam/modules/Makefile.am +--- dbmail-2.2.10/modules/Makefile.am 2008-03-24 17:49:33.000000000 +0300 ++++ dbmail-2.2.10.pam/modules/Makefile.am 2008-09-18 16:44:53.000000000 +0400 +@@ -60,7 +60,7 @@ + + # This one is always built. + libauth_sql_la_SOURCES = authsql.c +-libauth_sql_la_LIBADD = @CRYPTLIB@ ++libauth_sql_la_LIBADD = @CRYPTLIB@ @PAMLIBS@ + + if LDAP + libauth_ldap_la_SOURCES = authldap.c diff --git a/community-testing/dbmail/dbmail.conf.d b/community-testing/dbmail/dbmail.conf.d new file mode 100644 index 000000000..73309a4a2 --- /dev/null +++ b/community-testing/dbmail/dbmail.conf.d @@ -0,0 +1,9 @@ +# Parameters to be passed to dbmail +# +# +# Select the service you want started with dbmail +# +# Available options : +# dbmail-imapd dbmail-pop3d dbmail-lmtpd dbmail-timsieved +# +DBMAIL_DAEMONS="dbmail-imapd" diff --git a/community-testing/dbmail/dbmail.rc.d b/community-testing/dbmail/dbmail.rc.d new file mode 100644 index 000000000..92c34e5d2 --- /dev/null +++ b/community-testing/dbmail/dbmail.rc.d @@ -0,0 +1,41 @@ +#!/bin/bash + +[ -f /etc/conf.d/dbmail ] && . /etc/conf.d/dbmail + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + for daemon in $DBMAIL_DAEMONS; do + stat_busy "Starting DbMail ${daemon}" + /usr/sbin/${daemon} + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + done + add_daemon dbmail + ;; + stop) + for daemon in $DBMAIL_DAEMONS; do + stat_busy "Stopping DbMail ${daemon}" + pid=$(cat /var/run/${daemon}.pid) + kill $pid + sleep 4 + stat_done + done + rm_daemon dbmail + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac + +exit 0 diff --git a/community-testing/libzdb/PKGBUILD b/community-testing/libzdb/PKGBUILD new file mode 100644 index 000000000..9e03c87cf --- /dev/null +++ b/community-testing/libzdb/PKGBUILD @@ -0,0 +1,21 @@ +# $Id: PKGBUILD 62082 2012-01-15 19:15:26Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=libzdb +pkgver=2.10 +pkgrel=1 +pkgdesc="Zild Database Library" +arch=(i686 x86_64) +url="http://www.tildeslash.com/libzdb/" +license=('GPL') +depends=('postgresql-libs' 'sqlite3' 'libmysqlclient') +options=(!libtool) +source=(http://www.tildeslash.com/libzdb/dist/libzdb-$pkgver.tar.gz) +md5sums=('fdc04b4b7f33cdcdfc6b559ba9965825') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make + make DESTDIR="$pkgdir/" install +} diff --git a/community-testing/lilypond/PKGBUILD b/community-testing/lilypond/PKGBUILD new file mode 100644 index 000000000..5742b97cd --- /dev/null +++ b/community-testing/lilypond/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 62073 2012-01-15 17:13:34Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Maintainer: Geoffroy Carrier <geoffroy@archlinux.org> +# Contributor: William Rea <sillywilly@gmail.com> +# Contributor: Robert Emil Berge <filoktetes@linuxophic.org> + +pkgname=lilypond +pkgver=2.14.2 +pkgrel=4 +pkgdesc="An automated music engraving system" +arch=('i686' 'x86_64') +url="http://lilypond.org" +license=('GPL') +depends=('guile' 'python2' 'texlive-core' 'ghostscript' 'pango' 'fontconfig') +makedepends=('flex' 'bison' 'gettext' 'mftrace' 'texinfo' 'fontforge' 't1utils' + 'gsfonts' 'texi2html') +options=('emptydirs') +install=lilypond.install +source=(http://download.linuxaudio.org/lilypond/sources/v2.14/$pkgname-$pkgver.tar.gz + texlive-workaround.patch) +md5sums=('4053a19e03181021893981280feb9aaa' + 'ff32863f3eed67ac744e50bc4fc67a87') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # python2 fix + for file in $(find . -name '*.py' -print); do + sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file + sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file + done + + rm -rf python/out/ + patch -p1 <$srcdir/texlive-workaround.patch + + PYTHON=/usr/bin/python2 ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community-testing/lilypond/lilypond.install b/community-testing/lilypond/lilypond.install new file mode 100644 index 000000000..934e7b435 --- /dev/null +++ b/community-testing/lilypond/lilypond.install @@ -0,0 +1,48 @@ +infodir=usr/share/info +filelist=(music-glossary.info + lilypond-web.info + lilypond-contributor.info + lilypond-contributor.info-1 + lilypond-contributor.info-2 + lilypond-internals.info-1 + lilypond-internals.info-2 + lilypond-internals.info-3 + lilypond-internals.info-4 + lilypond-internals.info-5 + lilypond-notation.info-1 + lilypond-notation.info-2 + lilypond-notation.info-3 + lilypond-notation.info-4 + lilypond-notation.info-5 + lilypond-notation.info-6 + lilypond-usage.info + lilypond-learning.info + lilypond-web.info-1 + lilypond-web.info-2 + lilypond-internals.info + lilypond-essay.info + lilypond-notation.info + lilypond-learning.info-1 + lilypond-learning.info-2 + lilypond-extending.info + lilypond-changes.info) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: diff --git a/community-testing/lilypond/texlive-workaround.patch b/community-testing/lilypond/texlive-workaround.patch new file mode 100644 index 000000000..1eb262863 --- /dev/null +++ b/community-testing/lilypond/texlive-workaround.patch @@ -0,0 +1,88 @@ +diff --git a/mf/feta-autometric.mf b/mf/feta-autometric.mf +index d5cbb7f..b25c4bc 100644 +--- a/mf/feta-autometric.mf ++++ b/mf/feta-autometric.mf +@@ -149,7 +149,6 @@ def set_char_box (expr b_sharp, w_sharp, d_sharp, h_sharp) = + & to_bp (w) & " " + & to_bp (h); + special "% MF2PT1: font_size " & decimal designsize; +- special "% MF2PT1: font_slant " & decimal font_slant_; + + for fvar = "font_identifier", + "font_coding_scheme", +@@ -175,9 +174,6 @@ def set_char_box (expr b_sharp, w_sharp, d_sharp, h_sharp) = + fi; + endfor; + +- special "% MF2PT1: font_fixed_pitch " +- & (if font_fixed_pitch_: "1" else: "0" fi); +- + % this must come after the `font_size' special + special "% MF2PT1: charwd " & decimal charwd; + fi; +diff --git a/mf/mf2pt1.mp b/mf/mf2pt1.mp +index a8b45aa..c935628 100644 +--- a/mf/mf2pt1.mp ++++ b/mf/mf2pt1.mp +@@ -61,7 +61,6 @@ def beginchar(expr c,w_sharp,h_sharp,d_sharp) = + def to_bp (expr num) = decimal (ceiling (num*bp_per_pixel)) enddef; + special "% MF2PT1: glyph_dimensions 0 " & to_bp (-d) & " " & to_bp(w) & " " & to_bp(h); + special "% MF2PT1: font_size " & decimal designsize; +- special "% MF2PT1: font_slant " & decimal font_slant_; + special "% MF2PT1: charwd " & decimal charwd; % Must come after the |font_size| |special| + for fvar = "font_identifier", "font_coding_scheme", "font_version", + "font_comment", "font_family", "font_weight", "font_unique_id", +@@ -76,8 +75,6 @@ def beginchar(expr c,w_sharp,h_sharp,d_sharp) = + scantokens ("decimal " & fvar & "_"); + fi; + endfor; +- special "% MF2PT1: font_fixed_pitch " & +- (if font_fixed_pitch_: "1" else: "0" fi); + enddef; + + +@@ -91,19 +88,6 @@ enddef; + + + %% \begin{explaincode} +-%% Store the value of \mfcomment +-% |font_slant_|, so we can recall it at each |beginchar|. +-%% \end{explaincode} +- +-font_slant_ := 0; +- +-def font_slant expr x = +- font_slant_ := x; +- fontdimen 1: x +-enddef; +- +- +-%% \begin{explaincode} + %% Redefine \mfcomment + % |bpppix_|, the number of ``big'' points per pixel. \mfcomment + % This in turn redefines |mm|, |in|, |pt|, and other derived units. +@@ -141,11 +125,6 @@ forsuffixes fvar = font_underline_position, font_underline_thickness: + scantokens ("def " & str fvar & " expr x = " & str fvar & "_ := x enddef;"); + endfor; + +-boolean font_fixed_pitch_; +-font_fixed_pitch_ := false; +-def font_fixed_pitch expr x = font_fixed_pitch_ := x enddef; +- +- + %% \begin{explaincode} + %% We'd like to be able to use calligraphic pens. Normally, MetaPost's + %% output routine does all the work for us of converting these to filled +diff --git a/scripts/build/mf2pt1.pl b/scripts/build/mf2pt1.pl +index 95df0f8..20f410b 100644 +--- a/scripts/build/mf2pt1.pl ++++ b/scripts/build/mf2pt1.pl +@@ -427,7 +427,7 @@ ENDHEADER + sub get_bboxes ($) + { + execute_command 1, ("mpost", "-mem=mf2pt1", "-progname=mpost", +- "\\mode:=localfont; mag:=$mag; bpppix $bpppix; input $mffile"); ++ "\\mode:=localfont; mag:=$mag; bpppix:=$bpppix; input $mffile"); + opendir (CURDIR, ".") || die "${progname}: $! ($filedir)\n"; + @charfiles = sort + { ($a=~ /\.(\d+)$/)[0] <=> ($b=~ /\.(\d+)$/)[0] } diff --git a/community-testing/pinot/PKGBUILD b/community-testing/pinot/PKGBUILD new file mode 100644 index 000000000..8dd7c740a --- /dev/null +++ b/community-testing/pinot/PKGBUILD @@ -0,0 +1,50 @@ +# $Id: PKGBUILD 62017 2012-01-14 12:25:05Z ibiru $ +# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> +# Contributor: Alexander Fehr <pizzapunk gmail com> +# Contributor: William Rea <sillywilly@gmail.com> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> + +pkgname=pinot +pkgver=0.98 +pkgrel=2 +pkgdesc='Personal search and metasearch tool' +arch=('i686' 'x86_64') +url='http://pinot.berlios.de/' +license=('GPL') +depends=('gtkmm' 'xapian-core' 'libtextcat' 'sqlite3' 'libxml++' 'curl' + 'gmime' 'dbus-glib' 'shared-mime-info' 'libexif' 'taglib' + 'hicolor-icon-theme' 'cairo' 'exiv2') +makedepends=('boost' 'desktop-file-utils') +optdepends=('unzip: ZIP files extraction' + 'poppler: PDF to text conversion' + 'catdvi: DVI to text conversion' + 'djvulibre: DjVu text extraction' + 'unrtf: RTF to HTML conversion' + 'antiword: MS Word to text conversion' + 'catdoc: XLS and PPT to text conversion' + 'deskbar-applet: Pinot Deskbar-Applet module') +options=('!emptydirs') +install=$pkgname.install +changelog=$pkgname.changelog +source=(http://download.berlios.de/$pkgname/$pkgname-$pkgver.tar.gz) +sha256sums=('8a89a73a48344074aa8f4534ce68fd18e3d84553645cef864c137ab21d8d341c') + +build() { + cd ${srcdir}/$pkgname-$pkgver + sed -i 's|/usr/share/libtextcat/|/usr/share/libtextcat/LM/|' textcat_conf.txt + sed -i -e "s|.*russian$|/usr/share/libtextcat/LM/russian-iso8859_5.lm russian-iso8859_5\n\ +/usr/share/libtextcat/LM/russian-koi8_r.lm russian-koi8_r\n\ +/usr/share/libtextcat/LM/russian-windows1251.lm russian-windows1251|" textcat_conf.txt + + ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib + make +} + +package() { + cd ${srcdir}/$pkgname-$pkgver + + make DESTDIR=${pkgdir} install + + # Remove Deskbar-Applet handler + rm -rf ${pkgdir}/usr/lib/deskbar-applet/handlers +} diff --git a/community-testing/pinot/pinot.changelog b/community-testing/pinot/pinot.changelog new file mode 100644 index 000000000..7d899cdb0 --- /dev/null +++ b/community-testing/pinot/pinot.changelog @@ -0,0 +1,2 @@ +2011-12-18 Jaroslav Lichtblau <dragonlord@aur.archlinux.org> + * pinot 0.98-1 diff --git a/community-testing/pinot/pinot.install b/community-testing/pinot/pinot.install new file mode 100644 index 000000000..55ab40426 --- /dev/null +++ b/community-testing/pinot/pinot.install @@ -0,0 +1,15 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + echo "Starting with 0.63, the service is auto-started. " + echo "The file that enables this is located at " + echo "/etc/xdg/autostart/pinot-dbus-daemon.desktop" + echo "Delete this file if you don't want the auto-start." +} + +post_upgrade() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} |