pkgname=readline pkgver=8.2.13 pkgrel=1 pkgdesc="GNU readline library" arch=('x86_64') url="https://tiswww.case.edu/php/chet/readline/rltop.html" license=('GPL-3.0-only') depends=('glibc' 'ncurses') backup=(etc/inputrc) options=('!emptydirs') source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz inputrc) sha256sums=(0e5be4d2937e8bd9b7cd60d46721ce79f88a33415dd68c2d738fb5924638f656 36e9611f935ee108d161587b0615f9c390192ef4bbff6dc59b58671261029901) prepare() { cd ${pkgname}-${pkgver} sed -i '/MV.*old/d' Makefile.in sed -i '/{OLDSUFF}/c:' support/shlib-install sed -i 's/-Wl,-rpath,[^ ]*//' support/shobj-conf } build() { cd ${pkgname}-${pkgver} CFLAGS="${CFLAGS} -fPIC" local configure_args=( --disable-static --with-curses --docdir=/usr/share/doc/${pkgname}-${pkgver} ${configure_options} ) ./configure ${configure_args[@]} make SHLIB_LIBS="-lncursesw" } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} SHLIB_LIBS="-lncursesw" install install -v -m644 doc/*.{ps,pdf,html,dvi} ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} install -vDm644 ${srcdir}/inputrc ${pkgdir}/etc/inputrc }