summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 21d2eae08a483672de19c0bdd6b264e801231ade (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
# Maintainer: kleintux <reg-archlinux AT klein DOT tuxli DOT ch> 
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: flu
# Contributor: Kevin MacMartin <prurigro at gmail dot com>

pkgname=vitetris
pkgver=0.59.1
pkgrel=3
pkgdesc="Virtual terminal *tris clone"
arch=('i686' 'x86_64')
url="http://victornils.net/tetris"
license=('BSD')
depends=('ncurses')
makedepends=('patch')
options=('!makeflags')
source=($pkgname-$pkgver.tar.gz::https://github.com/vicgeralds/$pkgname/archive/v$pkgver.tar.gz
        $pkgname-makefile.patch
	$pkgname-netplay.patch
        $pkgname.tmpfiles.conf)
sha256sums=('699443df03c8d4bf2051838c1015da72039bbbdd0ab0eede891c59c840bdf58d'
            '2a9e1ea8daf42b833719c2fa1098f9e9c6259b8e077ca387eecd9a2ee54cc8af'
            '1591b4b1e2c9cf9eedfb5abc139e535ac98cfc7092a4ccb1fbbbd071de9a9e94'
            '898c741a41defccd6b38fe3a5b97fb84d5656b2c9df05c79196ac1bf2151ba7d')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -Np1 -i "${srcdir}"/${pkgname}-makefile.patch
  patch -Np1 -i "${srcdir}"/${pkgname}-netplay.patch

# Change configuration file to a standard one:
  sed -i 's|#define CONFIG_FILENAME ".vitetris"|#define CONFIG_FILENAME ".config/vitetris"|' src/config2.h
  sed -i 's|ctime(&t)|"%s", &|' src/netw/gameserver.c
}

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix="${pkgdir}"/usr --docdir="${pkgdir}"/usr/share/${pkgname} --without-x --with-ncurses
  make
  make gameserver
}

package() {
  install -Dm644 ${pkgname}.tmpfiles.conf "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf

  cd ${pkgname}-${pkgver}
  make install
  install -Dm755 gameserver "${pkgdir}"/usr/bin/${pkgname}-gameserver

# License
  install -Dm644 licence.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}