PKGBUILDs/core/readline/PKGBUILD

61 lines
1.8 KiB
Bash
Raw Normal View History

# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=readline
_patchlevel=004 #prepare for some patches
pkgver=6.0.$_patchlevel
pkgrel=1
pkgdesc="GNU readline library"
arch=('arm')
url="http://tiswww.case.edu/php/chet/readline/rltop.html"
license=('GPL')
groups=('base')
depends=('glibc' 'ncurses')
backup=("etc/inputrc")
source=(http://ftp.gnu.org/gnu/readline/readline-6.0.tar.gz
inputrc)
if [ $_patchlevel -gt 00 ]; then
for p in $(seq -w 01 $_patchlevel); do
source=(${source[@]} http://ftp.gnu.org/gnu/readline/readline-6.0-patches/readline60-$p)
done
fi
md5sums=('b7f65a48add447693be6e86f04a63019'
'e5fc955f56d9fa5beb871f3279b8fa8b'
'85c01ea031ad38a179053c67186bafed'
'4fad2a4ce987e3101229d0c8dfb0cd80'
'80967f663864983a889af2eb53aea177'
'dd5dd5ff7f7229714bf1c2e274ad2ae9')
build() {
cd ${srcdir}/${pkgname}-6.0
for p in ../readline60-*; do
[ -e "$p" ] || continue
msg "applying patch ${p}"
patch -Np0 -i ${p} || return 1
done
# Remove RPATH from shared objects (FS#14366)
sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf
# build with -fPIC for x86_64 (FS#15634)
[ $CARCH == "x86_64" ] && CFLAGS="$CFLAGS -fPIC"
./configure --prefix=/usr --libdir=/lib \
--mandir=/usr/share/man --infodir=/usr/share/info
make SHLIB_LIBS=-lncurses || return 1
make DESTDIR=${pkgdir} install || return 1
mkdir -p ${pkgdir}/etc
install -m644 ../inputrc ${pkgdir}/etc/inputrc || return 1
#FHS recommends only shared libs in /lib
mkdir -p $pkgdir/usr/lib
mv $pkgdir/lib/*.a $pkgdir/usr/lib
# to make the linker find the shared lib and fix compile issues
cd ${pkgdir}/usr/lib
ln -sv /lib/libreadline.so .
ln -sv /lib/libhistory.so .
rm -f ${pkgdir}/usr/share/info/dir
}