archrelease: copy trunk to community-any
[ArchLinux/community.git] / simh / repos / community-x86_64 / PKGBUILD
blob3a19c921587eedd6e9860d0522460ffadd8c029a
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Contributor: waterbear <st92.at.freeshell.org>
4 pkgname=simh
5 pkgver=3.12.3
6 _pkgver=${pkgver//./-}
7 _pkgver=${_pkgver/-/.}
8 pkgrel=2
9 pkgdesc="simulator for assorted historical computers, from Altair to VAX"
10 arch=('x86_64')
11 url="http://simh.trailing-edge.com"
12 license=("BSD")
13 depends=("libpcap")
14 makedepends=("unzip" "linux-api-headers")
15 install=simh.install
16 source=("$pkgname-$pkgver.tar.gz::https://github.com/open-simh/simh/archive/v${_pkgver}.tar.gz"
17         "LICENSE"
18         build-fix.patch)
19 sha512sums=('ee473f30efcf2f63a6bd943d268adb32fa047ee30d97a250621a06db890ba6e96956268555e3f49e9dc758fa25c5c4f4070f2b05db0ab6625c072c7875b207cc'
20             '084faf8a66c95cb337bca19a6116c916aa04fc23ec5d57d5d8c2fc168231272123a705e83f8da2bf38f404da51727a69db68ffd87b36028e0cde52b54b92b2dd'
21             '663a5514333653352ad6134e42eca2a8c780f4d7c140dcc30063893c7470bdafe704703eee23ea89272d04acff2cdae013781b0345c2d9e9d86fcb42c50db530')
23 prepare() {
24   cd "$srcdir/$pkgname-${_pkgver}"
25   patch -p1 <../build-fix.patch
26   sed -i '/Retry your build without specifying USE_NETWORK/d' makefile
29 build() {
30   cd "$srcdir/$pkgname-${_pkgver}"
31   mkdir -p BIN
32   make USE_SHARED=1 USE_NETWORK=1 NETWORK_OPT='-DUSE_NETWORK -DHAVE_TAP_NETWORK'
35 package() {
36   cd "$srcdir/$pkgname-${_pkgver}/BIN"
37   rmdir buildtools || true
38   for i in *; do
39     install -D $i "$pkgdir/usr/bin/simh-$i"
40   done
42   cd "../VAX"
43   mkdir -p "$pkgdir/usr/lib/simh"
44   cp *.bin "$pkgdir/usr/lib/simh"
46   install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"