blob: 4134671138bbe906cc14ed039cd06e4ac7e92ff2 (
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
|
# Maintainer: Philip Johansson <philipphuket at gmail dotcom>
pkgname=solitty-git
_pkgname=solitty
pkgver=r32.39c72b3
pkgrel=1
pkgdesc="Play solitaire in the console"
arch=('x86_64')
url="https://github.com/flyingpeakock/solitty"
license=('MIT')
depends=(ncurses git)
makedepends=(gcc)
provides=("solitty")
source=("git+https://github.com/flyingpeakock/solitty.git")
noextract=("${source[@]##*/}")
md5sums=('SKIP')
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
# This package provides a mechanism to edit the file
# config.h before installation.
if [ -e "$BUILDDIR/Config.h" ]
then
msg='Configuration found in build directory. '
msg+='Applying custom configuration.'
warning "$msg"
cp "$BUILDDIR/Config.h" "$srcdir/solitty/src/Config.h"
if [ -e "$srcdir/solitty-bin" ]
then
rm "$srcdir/solitty-bin"
fi
else
msg='This package can be configured by editing config.h '
msg+='Documentation can be found in the comments.'
msg+='Sometimes changes are made to the config that '
msg+='are required for building. If a build fails remove the '
msg+='old config.h file.'
warning "$msg"
cp "$_pkgname/src/Config.h" "$BUILDDIR/"
fi
}
build() {
cd "$srcdir"
g++ -O2 -pthread ./solitty/src/*.cpp -lncursesw -o solitty-bin
}
package() {
cd "$srcdir"
install -Dm755 solitty-bin $pkgdir/usr/bin/solitty
install -Dm644 ./solitty/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
|