summaryrefslogtreecommitdiff
path: root/extra/hyphen/PKGBUILD
blob: c730328778a66a9b41f343d61d4314a292266726 (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
# $Id: PKGBUILD 162738 2012-06-29 10:59:41Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>

pkgbase=hyphen
pkgname=('hyphen' 'hyphen-en')
pkgver=2.8.4
pkgrel=1
arch=('i686' 'x86_64')
url="http://hunspell.sf.net"
license=('GPL' 'LGPL' 'MPL')
groups=()
makedepends=('glibc' 'perl')
options=('!libtool')
source=(http://downloads.sourceforge.net/hunspell/${pkgname}-${pkgver}.tar.gz)
md5sums=('a2f6010987e1c601274ab5d63b72c944')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  # libtool fix
#  autoreconf -vfi
  
  ./configure --prefix=/usr --disable-static
  make
}

package_hyphen() {
 pkgdesc="library for high quality hyphenation and justification"
 depends=('glibc' 'perl')

  cd "$srcdir/$pkgbase-$pkgver"
  make DESTDIR="$pkgdir/" install-libLTLIBRARIES
  make DESTDIR="$pkgdir/" install-binSCRIPTS
  make DESTDIR="$pkgdir/" install-includeHEADERS
  
  # license
  install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}

package_hyphen-en() {
 pkgdesc="English hyphenation rules"
 # arch=('any')
 optdepends=('hyphen: offers hyphenation library functions')

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

  pushd ${pkgdir}/usr/share/hyphen/
   en_US_aliases="en_AG en_AU en_BS en_BW en_BZ en_CA en_DK en_GB en_GH en_HK en_IE en_IN en_JM en_NA en_NZ en_PH en_SG en_TT en_ZA en_ZW"
   for lang in $en_US_aliases; do
        ln -s hyph_en_US.dic hyph_$lang.dic
   done
  popd
  
  # the symlinks
  install -dm755 ${pkgdir}/usr/share/myspell/dicts
  pushd $pkgdir/usr/share/myspell/dicts
    for file in $pkgdir/usr/share/hyphen/*; do
      ln -sv /usr/share/hyphen/$(basename $file) .
    done
  popd
}