update: rename lfs-12.2 to lfs
This commit is contained in:
47
lfs/expect-5.45.4.PKGBUILD
Normal file
47
lfs/expect-5.45.4.PKGBUILD
Normal file
@@ -0,0 +1,47 @@
|
||||
pkgname=expect
|
||||
pkgver=5.45.4
|
||||
pkgdesc='A tool for automating interactive applications'
|
||||
homepage='https://www.nist.gov/el/msid/expect.cfm'
|
||||
license=(custom)
|
||||
sources=("${pkgname}${pkgver}.tar.gz"
|
||||
"expect-5.45.4-gcc14-1.patch"
|
||||
)
|
||||
urls=("https://prdownloads.sourceforge.net/expect/expect${pkgver}.tar.gz"
|
||||
"https://www.linuxfromscratch.org/patches/lfs/12.2/expect-5.45.4-gcc14-1.patch"
|
||||
)
|
||||
md5sums=("00fce8de158422f5ccd2666512329bd2"
|
||||
"0b8b5ac411d011263ad40b0664c669f0"
|
||||
)
|
||||
|
||||
|
||||
src_prepare() {
|
||||
if ! python3 -c 'from pty import spawn; spawn(["echo", "ok"])'; then
|
||||
leaf_error "PTY issue. Cannot build."
|
||||
fi
|
||||
tar -xf ${DIST_DIR}/${pkgname}-${pkgver}/${sources[0]} --strip-components=1
|
||||
patch -Np1 -i ${DIST_DIR}/${pkgname}-${pkgver}/${sources[1]}
|
||||
}
|
||||
|
||||
src_build() {
|
||||
./configure --prefix=/usr \
|
||||
--with-tcl=/usr/lib \
|
||||
--enable-shared \
|
||||
--disable-rpath \
|
||||
--mandir=/usr/share/man \
|
||||
--with-tclinclude=/usr/include
|
||||
make
|
||||
}
|
||||
|
||||
src_check() {
|
||||
make test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
ln -svf expect5.45.4/libexpect5.45.4.so "${pkgdir}/usr/lib"
|
||||
|
||||
install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/README"
|
||||
# avoid file conflict with the more powerful mkpasswd from the whois package
|
||||
mv -v "$pkgdir"/usr/bin/mkpasswd{,-expect}
|
||||
mv -v "$pkgdir"/usr/share/man/man1/mkpasswd{,-expect}.1
|
||||
}
|
||||
Reference in New Issue
Block a user