summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aafaabdebf64c8e0447a1c5b44f7b148b058a07a (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
64
65
66
# Maintainer: Tony Lambiris <tony@libpcap.net>

pkgname=wineasio-git
pkgver=r50.4b23797
pkgrel=2
pkgdesc='WineASIO provides an ASIO to JACK driver for WINE.'
arch=('i686' 'x86_64')
url='https://github.com/jhernberg/wineasio'
license=(LGPL)
depends=('wine' 'jack')
depends_x86_64+=('lib32-jack')
makedepends=('ed' 'steinberg-asio-sdk')
makedepends_x86_64+=('gcc-multilib' 'mingw-w64-headers')
conflicts=(wineasio)
provides=(wineasio)
install=wineasio.install
source=("${pkgname}::git+https://github.com/jhernberg/wineasio"
        "unicode.h")
sha256sums=('SKIP'
            'a552e487cba95883a15db612ae646df5d502a39afd7c4805b4ca0b549cc2f522')

pkgver() {
	cd "$srcdir/$pkgname"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "$srcdir/$pkgname"

	cp /usr/include/steinberg-asio/asio.h asio.h

	mkdir -p wine
	cp "${srcdir}/unicode.h" wine/unicode.h

	if [[ "$CARCH" == x86_64 ]]; then
		cp asio.h asio.h.i686
		./prepare_64bit_asio
	fi
}

build() {
	cd "$srcdir/$pkgname"

	if [[ "$CARCH" == x86_64 ]]; then
		make -f Makefile64
		mv wineasio.dll.so wineasio.dll.so.x86_64
		cp asio.h.i686 asio.h
		make clean
	fi

	make
}

package() {
	cd "$srcdir/$pkgname"

	if [[ "$CARCH" == x86_64 ]]; then
		install -D -m755 wineasio.dll.so.x86_64 "$pkgdir"/usr/lib/wine/wineasio.dll.so
		install -D -m755 wineasio.dll.so "$pkgdir"/usr/lib32/wine/wineasio.dll.so
	else
		install -D -m755 wineasio.dll.so "$pkgdir"/usr/lib/wine/wineasio.dll.so
	fi

	install -D -m644 README "$pkgdir"/usr/share/"$pkgname"/README
}