summaryrefslogtreecommitdiff
path: root/community/libaccounts-glib
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-06 02:13:31 -0800
committerroot <root@rshg054.dnsready.net>2012-11-06 02:13:31 -0800
commit85e0e667660650d70269432a90401d4288776d9d (patch)
tree7d6e665bf13e57be14c60b14512dd322c97874e8 /community/libaccounts-glib
parentc973e7aa43bb6c3bb4e25503eea40ddee63fcefd (diff)
Tue Nov 6 02:09:19 PST 2012
Diffstat (limited to 'community/libaccounts-glib')
-rw-r--r--community/libaccounts-glib/PKGBUILD50
-rw-r--r--community/libaccounts-glib/fix-docdir.patch12
-rw-r--r--community/libaccounts-glib/make-tests-optional.patch68
3 files changed, 130 insertions, 0 deletions
diff --git a/community/libaccounts-glib/PKGBUILD b/community/libaccounts-glib/PKGBUILD
new file mode 100644
index 000000000..191a1ccf5
--- /dev/null
+++ b/community/libaccounts-glib/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 79487 2012-11-06 04:11:07Z bgyorgy $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+
+pkgname=libaccounts-glib
+pkgver=1.3
+pkgrel=1
+pkgdesc="Glib-based client library for accessing the online accounts database"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/accounts-sso/"
+license=('LGPL')
+depends=('dbus-glib' 'libxml2' 'sqlite3')
+makedepends=('python2-gobject')
+options=('!libtool')
+source=(http://accounts-sso.googlecode.com/files/$pkgname-$pkgver.tar.gz
+ fix-docdir.patch
+ make-tests-optional.patch)
+sha1sums=('a2bd07082e9e9235103051f6574b154182745aee'
+ '94291a58dbbd36f524538adbf6d0c5a55024a34c'
+ '35732dc134c32af6ad1684d6388bad8ffe3f4dcc')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Use the standard docdir location
+ # http://code.google.com/p/accounts-sso/issues/detail?id=123
+ patch -Np1 -i "$srcdir/fix-docdir.patch"
+
+ # Build tests optionally
+ # http://code.google.com/p/accounts-sso/issues/detail?id=124
+ patch -Np1 -i "$srcdir/make-tests-optional.patch"
+
+ autoreconf -fi
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --disable-static \
+ PYTHON=python2
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ # Install GI overrides for python 3 as well
+ install -dm755 "$pkgdir/usr/lib/python3.3/site-packages/gi/overrides"
+ ln -s ../../../../python2.7/site-packages/gi/overrides/Accounts.py "$pkgdir/usr/lib/python3.3/site-packages/gi/overrides/Accounts.py"
+
+ # We don't have Backup Framework on Arch Linux
+ rm -r "$pkgdir/usr/share/backup-framework"
+}
diff --git a/community/libaccounts-glib/fix-docdir.patch b/community/libaccounts-glib/fix-docdir.patch
new file mode 100644
index 000000000..a535000ec
--- /dev/null
+++ b/community/libaccounts-glib/fix-docdir.patch
@@ -0,0 +1,12 @@
+diff -Naur -i libaccounts-glib-1.3.orig/Makefile.am libaccounts-glib-1.3/Makefile.am
+--- libaccounts-glib-1.3.orig/Makefile.am 2012-03-13 15:18:32.000000000 +0100
++++ libaccounts-glib-1.3/Makefile.am 2012-10-16 21:38:42.156352344 +0200
+@@ -12,7 +12,7 @@
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libaccounts-glib.pc
+
+-libaccountsdocdir = ${prefix}/doc/reference
++libaccountsdocdir = ${docdir}
+ libaccountsdoc_DATA= README COPYING AUTHORS ChangeLog INSTALL NEWS
+
+ backupconfdir = ${prefix}/share/backup-framework/applications
diff --git a/community/libaccounts-glib/make-tests-optional.patch b/community/libaccounts-glib/make-tests-optional.patch
new file mode 100644
index 000000000..a5c3d1ba5
--- /dev/null
+++ b/community/libaccounts-glib/make-tests-optional.patch
@@ -0,0 +1,68 @@
+commit c34f64423776d214fc5a24b76c7c606119988d7e
+Author: David King <david.king@canonical.com>
+Date: Mon Oct 22 08:12:40 2012 +0100
+
+ Make tests optional at configure time
+
+ http://code.google.com/p/accounts-sso/issues/detail?id=124
+
+diff --git a/Makefile.am b/Makefile.am
+index 97979a6..358a923 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,10 @@
+-SUBDIRS = libaccounts-glib docs tests tools
++SUBDIRS = libaccounts-glib docs tools
+ if ENABLE_PYTHON
+ SUBDIRS += pygobject
+ endif
++if ENABLE_TESTS
++SUBDIRS += tests
++endif
+
+ ACLOCAL_AMFLAGS = -I m4
+
+diff --git a/configure.ac b/configure.ac
+index cbaf8d5..50b95ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,25 @@ PKG_CHECK_MODULES(
+ AC_SUBST(LIBACCOUNTS_CFLAGS)
+ AC_SUBST(LIBACCOUNTS_LIBS)
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
++# Build tests.
++
++CHECK_REQUIRED="check >= 0.9.4"
++
++AC_ARG_ENABLE([tests],
++ [AS_HELP_STRING([--disable-tests], [build with testing support disabled])])
++
++AS_IF([test "x$enable_tests" != "xno"],
++ [PKG_CHECK_EXISTS([$CHECK_REQUIRED], [have_check=yes], [have_check=no])],
++ [have_check=no])
++
++AS_IF([test "x$have_check" = "xyes"],
++ [PKG_CHECK_MODULES([CHECK], [$CHECK_REQUIRED])
++ AC_SUBST([CHECK_CFLAGS])
++ AC_SUBST([CHECK_LIBS])],
++ [AS_IF([test "x$enable_tests" = "xyes"],
++ [AC_MSG_ERROR([tests enabled but required dependencies were not found])])])
++
++AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index db5aa3f..f6c8dbf 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -7,7 +7,7 @@ dist_check_SCRIPTS = \
+ check_SCRIPTS = accounts-glib-test.sh
+
+ accounts_glib_testsuite_SOURCES = check_ag.c
+-accounts_glib_testsuite_CFLAGS = $(CHECK_FLAGS) -I$(top_srcdir)
++accounts_glib_testsuite_CFLAGS = $(CHECK_CFLAGS) -I$(top_srcdir)
+ accounts_glib_testsuite_LDADD = \
+ $(CHECK_LIBS) \
+ $(LIBACCOUNTS_LIBS) \