summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 56d2c3adb212ec76eda8c7b1c5d797ff81a6e50a (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
# Maintainer: Denilson Sá <denilsonsa@gmail.com>

pkgname=xevil-git
pkgver=r28.9ca8505
pkgrel=1
pkgdesc="Side-view, single or network-multiplayer, fast-action, kill-everything, game."
# Note: building this package on ARM is untested, but it should work due to https://github.com/lvella/xevil/pull/2
#arch=('x86_64' 'armv7h' 'aarch64')
arch=('x86_64')
url="https://www.xevil.com/"
license=('GPL2')

# Notes about the `depends`
#
# `xevil` requires the `9x15` font available at the X server. The font itself
# is provided by `xorg-fonts-misc` package, but X won't be able to read it
# until it gets listed on `/usr/share/fonts/misc/fonts.dir` (i.e. index of font
# files in that directory).
#
# The package `xorg-mkfontscale` installs a hook to automatically keep that
# index file up-to-date: /usr/share/libalpm/hooks/xorg-mkfontscale.hook
# However, it is also possible to install X fonts without having the hook
# installed, as that package is not a dependency of the fonts packages.
# In such (relatively common) case, the fonts will be on the filesystem, but
# the X server wouldn't know about them.
#
# To simplify and streamline the end-user experience, I'm adding
# `xorg-mkfontdir` package (provided by `xorg-mkfontscale`) as a dependency of
# `xevil-git`. It's not a direct dependency, but it is required before the
# fonts are made available to the X server. The end-user will just need to
# either restart the computer, or log out and log in, or run `xset fp rehash`.
#
depends=('libx11' 'libxpm' 'xorg-fonts-misc' 'xorg-mkfontdir')

makedepends=('git')
source=('git+https://github.com/lvella/xevil.git#branch=master')
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	make
}

package() {
	cd "$srcdir/${pkgname%-git}"
	mkdir -p "$pkgdir/usr/bin"
	install -Dm755 x11/REDHAT_LINUX/xevil "$pkgdir/usr/bin/xevil"
	install -Dm755 x11/REDHAT_LINUX/serverping "$pkgdir/usr/bin/xevil-serverping"
	mkdir -p "$pkgdir/usr/share/doc/${pkgname%-git}"
	install -Dm644 instructions/* "$pkgdir/usr/share/doc/${pkgname%-git}/"
	install -Dm644 compiling.html readme.txt "$pkgdir/usr/share/doc/${pkgname%-git}/"
}