summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 93f3a7a8314a3ee88584ed305ecdff7c7fab7eda (plain)
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
63
# Maintainer: Mike Swanson <mikeonthecomputer@gmail.com>

# Based on the Arch Linux PKGBUILD by:
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
# Contributor: Bob Finch <w9ya@arrl.net>

pkgname=dosemu-git
pkgver=1.4.0.8.r753.18f6f5cd
pkgrel=1
epoch=2
pkgdesc="DOS emulator"
arch=('i686' 'x86_64')
url="http://www.dosemu.org/"
license=('GPL' 'custom')
depends=('gpm' 'slang' 'sdl' 'libsndfile' 'libxxf86vm')
makedepends=('git' 'xorg-mkfontdir' 'xorg-bdftopcf')
conflicts=('dosemu')
provides=('dosemu')
backup=('etc/dosemu/dosemu.conf'
        'etc/dosemu/dosemu.users'
        'etc/dosemu/global.conf')
source=('dosemu::git://git.code.sf.net/p/dosemu/code#branch=devel'
        https://chungy.keybase.pub/dosemu/dosemu-freedos-1.2-bin.tgz
        debianize.patch
        xdosemu.desktop)
sha512sums=('SKIP'
            '742343992ac32e2196fef56472f8734ff1314b930938d8ac2f916c612dc0046d1f9d4d3ede82e5a5513a6d2071a88a3803a91ea2789d67dc920b445c0e37a3ce'
            '173525b8c622315dfe3860c9fda62e48c19603bad84f16cbc4db723a2a4c80adc85069fc6a8696229253adc03d29ea35c79fdaf1ca911c4d8d96e5de9c38ff39'
            'ff3ccaebb84eca622484f98750f360de5470f169271eed7500b713dcfb705c32618af239494741ea3396c5e1d9d97f374aa4e6346bf171f158d645d10ba24de7')
noextract=('dosemu-freedos-1.2-bin.tgz')

pkgver() {
  cd "dosemu"

  printf %s "$(git describe --long | sed 's/^dosemu-//;s/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
  cd "dosemu"

  patch -p1 -i ../debianize.patch
  sed -ie '/yyget_leng/ s/int/size_t/' src/base/init/lexer.h
  sed -ie 's/((no_instrument_function/&,optimize("no-stack-protector")/' \
          src/arch/linux/async/sigsegv.c src/arch/linux/async/signal.c
}

build() {
  cd "dosemu"

  ./configure --prefix=/usr --with-fdtarball="$srcdir/dosemu-freedos-1.2-bin.tgz" --mandir=/usr/share/man
  make
}

package() {
  cd "dosemu"
  make DESTDIR="$pkgdir" install
  install -Dm 644 "$srcdir"/xdosemu.desktop "$pkgdir"/usr/share/applications/xdosemu.desktop
  install -Dm 644 etc/dosemu.xpm "$pkgdir"/usr/share/icons/dosemu.xpm
  install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
  install -Dm 644 COPYING.DOSEMU "$pkgdir"/usr/share/licenses/$pkgname/COPYING.DOSEMU
}