-
Notifications
You must be signed in to change notification settings - Fork 491
/
PKGBUILD
62 lines (52 loc) · 1.91 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# $Id$
# Maintainer (MSYS2): Ray Donnelly <[email protected]>
# Maintainer (ArchLinux): Allan McRae <[email protected]>
pkgname=expect
pkgver=5.45.4
pkgrel=5
pkgdesc="A tool for automating interactive applications"
arch=('i686' 'x86_64')
url="https://www.nist.gov/el/msid/expect.cfm"
msys2_references=(
"cpe: cpe:/a:don_libes:expect"
)
license=('custom')
depends=('tcl')
makedepends=('autotools' 'gcc' 'tcl-devel')
source=(https://downloads.sourceforge.net/project/expect/Expect/${pkgver}/expect${pkgver}.tar.gz
config.guess
config.sub
5.45-openpty.patch
5.45-msysize.patch)
sha256sums=('49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34'
'5744cab7fda627ef53dbd0d8cb1fa08b30d3702e01a621e028c5a12deee7c21c'
'6ef568e79ee95214ecb8b187bf14f168bd0889575e922e5e866c455186cfb063'
'51767a9781b8844280265b290ac894fda176b7b92dad9b868f07b4e83b478207'
'4f0bd47194289969877b5c75f72e99db8120c430a063c99b1465179ac8cbb7b4')
prepare() {
cd ${srcdir}/expect${pkgver}
patch -p2 -i ${srcdir}/5.45-openpty.patch
patch -p1 -i ${srcdir}/5.45-msysize.patch
cp ${srcdir}/config.guess tclconfig/config.guess
cp ${srcdir}/config.sub tclconfig/config.sub
autoreconf -vfi
}
build() {
cd ${srcdir}/expect${pkgver}
./configure --prefix=/usr --mandir=/usr/share/man
make SHLIB_LD='$(CC) -shared -Wl,--out-implib,[email protected]'
}
check() {
cd ${srcdir}/expect${pkgver}
make test
}
package() {
cd ${srcdir}/expect${pkgver}
make DESTDIR=${pkgdir} install
mv ${pkgdir}/usr/lib/expect${pkgver}/libexpect${pkgver}.dll ${pkgdir}/usr/bin/libexpect${pkgver}.dll
# mkpasswd is provided by cygwin, so this would conflict
rm ${pkgdir}/usr/bin/mkpasswd
rm ${pkgdir}/usr/share/man/man1/mkpasswd.1
sed -i -e 's|\(\$dir\)|\1 .. .. bin|' ${pkgdir}/usr/lib/expect${pkgver}/pkgIndex.tcl
install -D -m644 README ${pkgdir}/usr/share/licenses/${pkgname}/README
}