summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d20d745ba3f93f4f599f938beb44a0948284bd00 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Maintainer: John Regan <john@jrjrtech.com>
pkgname=('libvgm-player-git' 'libvgm-emu-git' 'libvgm-utils-git' 'libvgm-audio-git' 'libvgm-common-git' 'vgm2wav-git' 'vgmplayer-git')
pkgbase=libvgm-git
pkgver=r385.32ffc85
pkgrel=1
pkgdesc="Library for decoding and playing VGM files"
arch=(x86_64 i686)
url="https://github.com/ValleyBell/libvgm"
license=('GPL')
makedepends=('zlib' 'alsa-lib' 'libpulse' 'libao' 'git' 'cmake')

source=('git+https://github.com/ValleyBell/libvgm.git'
'libvgm-use-shared-libs.patch')

md5sums=('SKIP'
'4761dda54c46003dddd487255fcfe424')

pkgver() {
	cd "$srcdir/${pkgbase%-git}"

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

prepare() {
	cd "$srcdir/${pkgbase%-git}"
	patch -p1 -i "$srcdir/${pkgbase%-git}-use-shared-libs.patch"
}

build() {
	cd "$srcdir/${pkgbase%-git}"
    mkdir build
    cd build
    cmake -DCMAKE_SKIP_BUILD_RPATH=TRUE -DCMAKE_INSTALL_PREFIX=/usr ..
	make
}

package_libvgm-common-git() {
    pkgdesc="libvgm common headers"
	cd "$srcdir/${pkgbase%-git}/build"
	make DESTDIR="$pkgdir/" install

    rm -rf "$pkgdir/usr/lib/libvgm-audio"*
    rm -rf "$pkgdir/usr/lib/libvgm-emu"*
    rm -rf "$pkgdir/usr/lib/libvgm-player"*
    rm -rf "$pkgdir/usr/lib/libvgm-utils"*

    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-audio.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-emu.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-player.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-utils.pc"

    rm -rf "$pkgdir/usr/include/vgm/audio"
    rm -rf "$pkgdir/usr/include/vgm/emu"
    rm -rf "$pkgdir/usr/include/vgm/player"
    rm -rf "$pkgdir/usr/include/vgm/utils"
}

package_libvgm-audio-git() {
    pkgdesc="libvgm audio playing library"
    depends=('libvgm-common-git' 'alsa-lib' 'libpulse' 'libao')
	cd "$srcdir/${pkgbase%-git}/build"
	make DESTDIR="$pkgdir/" install

    rm -rf "$pkgdir/usr/lib/libvgm-emu"*
    rm -rf "$pkgdir/usr/lib/libvgm-player"*
    rm -rf "$pkgdir/usr/lib/libvgm-utils"*

    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-emu.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-player.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-utils.pc"

    rm -rf "$pkgdir/usr/include/vgm/emu"
    rm -rf "$pkgdir/usr/include/vgm/player"
    rm -rf "$pkgdir/usr/include/vgm/utils"

    rm "$pkgdir/usr/include/vgm/common_def.h"
    rm "$pkgdir/usr/include/vgm/stdbool.h"
    rm "$pkgdir/usr/include/vgm/stdtype.h"

}

package_libvgm-emu-git() {
    pkgdesc="libvgm emulation library"
    depends=('libvgm-common-git')
	cd "$srcdir/${pkgbase%-git}/build"
	make DESTDIR="$pkgdir/" install

    rm -rf "$pkgdir/usr/lib/libvgm-audio"*
    rm -rf "$pkgdir/usr/lib/libvgm-player"*
    rm -rf "$pkgdir/usr/lib/libvgm-utils"*

    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-audio.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-player.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-utils.pc"

    rm -rf "$pkgdir/usr/include/vgm/audio"
    rm -rf "$pkgdir/usr/include/vgm/player"
    rm -rf "$pkgdir/usr/include/vgm/utils"

    rm "$pkgdir/usr/include/vgm/common_def.h"
    rm "$pkgdir/usr/include/vgm/stdbool.h"
    rm "$pkgdir/usr/include/vgm/stdtype.h"
}

package_libvgm-player-git() {
    pkgdesc="libvgm player library"
    depends=('libvgm-common-git' 'libvgm-emu-git' 'libvgm-utils-git')
	cd "$srcdir/${pkgbase%-git}/build"
	make DESTDIR="$pkgdir/" install

    rm -rf "$pkgdir/usr/lib/libvgm-audio"*
    rm -rf "$pkgdir/usr/lib/libvgm-emu"*
    rm -rf "$pkgdir/usr/lib/libvgm-utils"*

    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-audio.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-emu.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-utils.pc"

    rm -rf "$pkgdir/usr/include/vgm/audio"
    rm -rf "$pkgdir/usr/include/vgm/emu"
    rm -rf "$pkgdir/usr/include/vgm/utils"

    rm "$pkgdir/usr/include/vgm/common_def.h"
    rm "$pkgdir/usr/include/vgm/stdbool.h"
    rm "$pkgdir/usr/include/vgm/stdtype.h"
}

package_libvgm-utils-git() {
    pkgdesc="libvgm utility library"
    depends=('libvgm-common-git' 'zlib')
	cd "$srcdir/${pkgbase%-git}/build"
	make DESTDIR="$pkgdir/" install

    rm -rf "$pkgdir/usr/lib/libvgm-audio"*
    rm -rf "$pkgdir/usr/lib/libvgm-emu"*
    rm -rf "$pkgdir/usr/lib/libvgm-player"*

    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-audio.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-emu.pc"
    rm -rf "$pkgdir/usr/lib/pkgconfig/vgm-player.pc"

    rm -rf "$pkgdir/usr/include/vgm/audio"
    rm -rf "$pkgdir/usr/include/vgm/emu"
    rm -rf "$pkgdir/usr/include/vgm/player"

    rm "$pkgdir/usr/include/vgm/common_def.h"
    rm "$pkgdir/usr/include/vgm/stdbool.h"
    rm "$pkgdir/usr/include/vgm/stdtype.h"
}

package_vgm2wav-git() {
    pkgdesc="VGM to WAVE utility"
    depends=('libvgm-utils-git' 'libvgm-player-git')
	cd "$srcdir/${pkgbase%-git}/build"
    install -d -m755 "$pkgdir/usr/bin"
    install -m755 bin/vgm2wav "$pkgdir/usr/bin/vgm2wav"
}

package_vgmplayer-git() {
    pkgdesc="Interactive VGM player"
    depends=('libvgm-utils-git' 'libvgm-player-git' 'libvgm-audio-git')
	cd "$srcdir/${pkgbase%-git}/build"
    install -d -m755 "$pkgdir/usr/bin"
    install -m755 bin/player "$pkgdir/usr/bin/vgmplayer"
}