core/hyphen/PKGBUILD

60 lines
1.6 KiB
Bash
Raw Normal View History

2013-06-04 16:44:53 +08:00
# maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
2011-04-25 00:08:20 +08:00
pkgbase=hyphen
pkgname=('hyphen' 'hyphen-en')
2013-06-04 16:44:53 +08:00
pkgver=2.8.6
2011-04-25 00:08:20 +08:00
pkgrel=1
2013-06-04 16:44:53 +08:00
arch=('x86_64')
2011-04-25 00:08:20 +08:00
url="http://hunspell.sf.net"
license=('GPL' 'LGPL' 'MPL')
makedepends=('glibc' 'perl')
options=('!libtool')
source=(http://downloads.sourceforge.net/hunspell/${pkgname}-${pkgver}.tar.gz)
2013-06-04 16:44:53 +08:00
md5sums=('ee527b48ef1a7e95ee803a1f7c283c56')
2011-04-25 00:08:20 +08:00
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/$pkgname-$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')
2013-06-04 16:44:53 +08:00
cd "$srcdir/${pkgbase}-${pkgver}"
2011-04-25 00:08:20 +08:00
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
}