readline/PKGBUILD

55 lines
1.5 KiB
Bash
Raw Normal View History

2024-04-22 16:45:47 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=readline
pkgver=8.2
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
${pkgname}-${pkgver}-upstream_fixes-3.patch
inputrc)
sha256sums=(3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35
8a108b34c5bdf9d6a9d6c0bd4cf2da756ae5232c5de2ae55c5468e953bb8de62
a3aa8df347eed0730e73fc9309da6fb6033b25c4e0a8e27c24faa8a55391d7f3)
prepare() {
cd ${pkgname}-${pkgver}
sed -i '/MV.*old/d' Makefile.in
sed -i '/{OLDSUFF}/c:' support/shlib-install
patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-upstream_fixes-3.patch
}
build() {
cd ${pkgname}-${pkgver}
CFLAGS="${CFLAGS} -fPIC"
${CONFIGURE} \
--disable-static \
--with-curses \
--docdir=/usr/share/doc/${pkgname}-${pkgver}
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
}