summaryrefslogtreecommitdiff
path: root/community/pyzy
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/pyzy
parentc973e7aa43bb6c3bb4e25503eea40ddee63fcefd (diff)
Tue Nov 6 02:09:19 PST 2012
Diffstat (limited to 'community/pyzy')
-rw-r--r--community/pyzy/PKGBUILD49
1 files changed, 49 insertions, 0 deletions
diff --git a/community/pyzy/PKGBUILD b/community/pyzy/PKGBUILD
new file mode 100644
index 000000000..ec57c7f84
--- /dev/null
+++ b/community/pyzy/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Contributor: Kerrick Staley <mail@kerrickstaley.com>
+
+pkgname=pyzy
+pkgver=1.0
+_commit="d7747466562cb8b4bc2934708e29b7643c7bedbc"
+pkgrel=1
+pkgdesc='The Chinese PinYin and Bopomofo conversion library'
+arch=('i686' 'x86_64')
+url='https://github.com/pyzy/pyzy'
+license=('LGPL')
+depends=('glib2' 'sqlite' 'util-linux')
+makedepends=('git' 'doxygen' 'gnome-common' 'python2')
+options=('!libtool')
+
+__gitroot=git://github.com/pyzy/pyzy.git
+__gitname=$pkgname
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $__gitname ] ; then
+ cd $__gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $__gitroot
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$__gitname-build"
+ git clone "$srcdir/$__gitname" "$srcdir/$__gitname-build"
+ cd "$srcdir/$__gitname-build"
+ git checkout "$_commit"
+
+ # replace python with python2; see https://github.com/hsumita/libpyzy/issues/1
+ find . -name '*.py' -exec sed -ri '1s#(bin/|env )python#\1python2#' '{}' \;
+
+ ./autogen.sh --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$__gitname-build"
+
+ make DESTDIR="$pkgdir" install
+}