core/pcre/PKGBUILD

54 lines
1.3 KiB
Bash
Raw Normal View History

2017-01-03 09:27:44 +08:00
# maintainer (x86_64): AlmAck <almack[at]chakralinux[dot]org>
2010-03-13 23:25:19 +08:00
pkgname=pcre
pkgver=8.41
2018-01-19 04:54:25 +08:00
pkgrel=2
2010-03-13 23:25:19 +08:00
pkgdesc="A library that implements Perl 5-style regular expressions"
arch=('x86_64')
2010-03-13 23:25:19 +08:00
url="http://www.pcre.org/"
license=('BSD')
2014-07-03 06:20:07 +08:00
depends=('gcc-libs' 'readline' 'zlib' 'bzip2')
2015-06-06 06:26:05 +08:00
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel
source=("https://ftp.pcre.org/pub/pcre/$pkgname-$pkgver.tar.bz2"{,.sig})
md5sums=('c160d22723b1670447341b08c58981c1'
2017-01-03 09:27:44 +08:00
'SKIP')
prepare() {
2017-01-03 09:27:44 +08:00
cd $pkgname-$pkgver
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
fi
done
:
}
2010-03-13 23:25:19 +08:00
build() {
2014-07-03 06:20:07 +08:00
cd ${pkgname}-${pkgver}
2014-02-10 06:14:56 +08:00
./configure --prefix=/usr \
--enable-unicode-properties \
--enable-utf8 \
2014-07-03 06:20:07 +08:00
--enable-pcre16 \
--enable-pcre32 \
2014-02-10 06:14:56 +08:00
--enable-jit \
--enable-pcregrep-libz \
--enable-pcregrep-libbz2 \
--enable-pcretest-libreadline
2011-01-16 07:39:26 +08:00
make
2010-03-13 23:25:19 +08:00
}
2011-01-16 07:39:26 +08:00
check() {
2014-07-03 06:20:07 +08:00
cd ${pkgname}-${pkgver}
2014-02-10 06:14:56 +08:00
make -j1 check
}
2011-01-16 07:39:26 +08:00
package() {
2014-07-03 06:20:07 +08:00
cd ${pkgname}-${pkgver}
2011-01-16 07:39:26 +08:00
make DESTDIR="${pkgdir}" install
install -Dm644 LICENCE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}