void-packages/srcpkgs/readline/template
2016-11-20 06:00:46 +00:00

54 lines
1.5 KiB
Bash

# Template build file for 'readline'.
pkgname=readline
_dist_ver=7.0
_patch_ver=000
version=${_dist_ver}.${_patch_ver}
revision=1
wrksrc=${pkgname}-${_dist_ver}
build_style=gnu-configure
configure_args="--with-curses --enable-multibyte"
makedepends="ncurses-devel"
short_desc="The GNU Readline Library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
license="GPL-3"
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${_dist_ver}.tar.gz"
checksum=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
pre_configure() {
local url="${GNU_SITE}/$pkgname/$pkgname-${_dist_ver}-patches"
cd ${XBPS_SRCDISTDIR}/${pkgname}-${version}
if [ "${_patch_ver}" -gt 000 ]; then
for p in $(seq -w 001 ${_patch_ver}); do
if [ -f readline63-${p} ]; then
continue
fi
msg_normal " Fetching $url/readline63-$p ...\n"
$XBPS_FETCH_CMD ${url}/readline63-$p
done
fi
cd ${wrksrc}
for p in $(seq -w 001 ${_patch_ver}); do
patch -s -Np0 -i ${XBPS_SRCDISTDIR}/${pkgname}-${version}/readline63-${p}
msg_normal " Applying patch readline63-$p.\n"
done
sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf
}
do_build() {
make ${makejobs} LDFLAGS="-lncurses" SHLIB_LIBS="-lncurses"
}
do_install() {
make DESTDIR=${DESTDIR} LDFLAGS="-lncurses" SHLIB_LIBS="-lncurses" install
}
readline-devel_package() {
depends="ncurses-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/share
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}