84 lines
2.4 KiB
Bash
84 lines
2.4 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgbase=hyphen
|
|
pkgname=('hyphen' 'hyphen-en')
|
|
pkgver=2.8.8
|
|
_debver=2.8.8
|
|
_debrel=7
|
|
pkgrel=2
|
|
arch=('i686' 'x86_64')
|
|
url="http://hunspell.github.io/"
|
|
license=('LGPL-2.1')
|
|
makedepends=('glibc' 'perl' 'quilt')
|
|
source=(https://downloads.sourceforge.net/hunspell/${pkgname}-${pkgver}.tar.gz
|
|
https://deb.debian.org/debian/pool/main/h/hyphen/hyphen_$_debver-$_debrel.debian.tar.xz)
|
|
sha512sums=('ee514952be56869840b70fb74f60eba14dc4de246733ff8705492367e8cf00c485f8778a9d5a7ba374c988d4ac9fedbe75826dc559e1b62465dbfba21f6ce7de'
|
|
'd442529363fb1702ff990e3db9ea9d8add2614aa7bca5fc7faac7267ecc464fbf559ef8090f029d4ddfc342a072e123ed6db291e0deb4ec7616c794d5dbc27fd')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
# Doesn't apply and seems unimportant
|
|
rm -v debian/patches/01_hyphen_tex_from_TeXLive || true
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
./configure --prefix=/usr --disable-static
|
|
make
|
|
}
|
|
|
|
package_hyphen() {
|
|
pkgdesc="library for high quality hyphenation and justification"
|
|
depends=('glibc' 'perl')
|
|
|
|
cd $pkgbase-$pkgver
|
|
make DESTDIR="$pkgdir/" install-libLTLIBRARIES
|
|
make DESTDIR="$pkgdir/" install-binSCRIPTS
|
|
make DESTDIR="$pkgdir/" install-includeHEADERS
|
|
|
|
# license
|
|
for i in COPYING{,.LGPL}; do
|
|
install -D -m644 ${i} "${pkgdir}"/usr/share/licenses/${pkgname}/${i}
|
|
done
|
|
}
|
|
|
|
package_hyphen-en() {
|
|
pkgdesc="English hyphenation rules"
|
|
# arch=('any')
|
|
optdepends=('hyphen: offers hyphenation library functions')
|
|
|
|
cd $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
|
|
|
|
# license
|
|
for i in COPYING{,.LGPL}; do
|
|
install -D -m644 ${i} "${pkgdir}"/usr/share/licenses/${pkgname}/${i}
|
|
done
|
|
}
|