summaryrefslogtreecommitdiff
path: root/community/stardict/PKGBUILD
blob: 5b58f5a77806643d3cbaf79e76ec8afde4b2f5f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# $Id: PKGBUILD 87021 2013-03-25 19:17:03Z bpiotrowski $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Neil Lin <neil@vip.url.com.tw>
# Contributor: Cravix < dr dot neemous at gmail dot com >

pkgbase=stardict
pkgname=(stardict stardict-lite)
pkgver=3.0.4
pkgrel=3
arch=('i686' 'x86_64' 'mips64el')
url='http://www.stardict.org/'
license=('GPL')
makedepends=('intltool' 'popt' 'gnome-doc-utils' 'gnome-common' 'libmariadbclient' 'enchant' 'gtk2' 'libsigc++' 'libsm' 'espeak' 'libgnome')
options=('!libtool' '!emptydirs')
source=("http://stardict-3.googlecode.com/files/${pkgbase}-${pkgver}.tar.bz2"
        'gcc46.patch'
        'glib2.patch'
        'zlib.patch')

build() {
  cd "${srcdir}/${pkgbase}-${pkgver}"

  patch -p1 -i ../gcc46.patch
  patch -p1 -i ../glib2.patch
  patch -p1 -i ../zlib.patch

  cp -r "${srcdir}/${pkgbase}-${pkgver}" "${srcdir}/${pkgbase}-${pkgver}-lite"

  cd "${srcdir}/${pkgbase}-${pkgver}"
  ./configure \
    PKG_CONFIG=/usr/bin/pkg-config \
    --prefix=/usr \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --disable-schemas-install \
    --disable-gucharmap \
    --disable-festival \
    --disable-updateinfo
  make

  cd "${srcdir}/${pkgbase}-${pkgver}-lite"
  LDFLAGS="$LDFLAGS -lgmodule-2.0"
  ./configure \
    PKG_CONFIG=/usr/bin/pkg-config \
    --prefix=/usr \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --disable-gnome-support \
    --disable-schemas-install \
    --disable-espeak \
    --disable-gucharmap \
    --disable-festival \
    --disable-updateinfo
  make
}

package_stardict() {
  pkgdesc='International dictionary software'
  depends=('enchant' 'gtk2' 'libsigc++' 'libsm' 'espeak' 'libgnome')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}

package_stardict-lite() {
  pkgdesc='International dictionary software - lite version without gnome and espeak support'
  depends=('enchant' 'gtk2' 'libsigc++' 'libsm')
  provides=(stardict)
  conflicts=(stardict)

  cd "${srcdir}/${pkgbase}-${pkgver}-lite"
  make DESTDIR="${pkgdir}" install
}

md5sums=('0a9abf1936c43a3ee255802c75267f1a'
         '52ff47441c503de07add4b7688510bc5'
         'b2f216897c9053c7e4666c3d78705cf1'
         'ee26dce70fc83b3ce86e5100fede7fad')