blob: 933ce862c702f86ff1dd9c08d2cd58ccb1ec8690 (
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
|
# Maintainer: 71e6fd52 <DAStudio.71e6fd52@gmail.com>
_base=awib
pkgname=(${_base}-git ${_base}-elf-git ${_base}-ruby-git ${_base}-tcl-git ${_base}-bash-git)
pkgver=r136.eaf1d79
pkgrel=1
pkgdesc='brainfuck compiler written in brainfuck'
arch=('any')
url='https://github.com/matslina/awib'
license=('GPL')
makedepends=('git' 'python')
source=("${_base}::git+https://github.com/matslina/awib.git")
sha256sums=('SKIP')
pkgver()
{
cd "${srcdir}/${_base}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build()
{
cd "${srcdir}/${_base}"
python util/bfpp.py --interpreter awib-skeleton.b > awib.b
cp awib.b awib.c
gcc awib.c -o awib.tmp
rm awib.c
}
package_awib-git()
{
depends+=("${_base}-elf=${pkgver}")
install -d "${pkgdir}/usr/bin"
ln -s "awib-elf" "${pkgdir}/usr/bin/awib"
}
package_awib-elf-git()
{
provides=("${_base}-elf=${pkgver}")
conflicts=("${_base}-elf")
arch=('x86_64' 'i686' 'aarch64' 'armv7h' 'armv6h' 'arm')
cd "${srcdir}/${_base}"
(echo "@lang_c"; cat awib.b) | ./awib.tmp > awib.c
gcc -O2 awib.c -o awib
install -d "${pkgdir}/usr/bin"
install -Dm755 "awib" "${pkgdir}/usr/bin/awib-elf"
}
package_awib-ruby-git()
{
depends+=('ruby')
provides=("${_base}-ruby=${pkgver}")
conflicts=("${_base}-ruby")
cd "${srcdir}/${_base}"
(echo "@lang_ruby"; cat awib.b) | ./awib.tmp > awib
install -d "${pkgdir}/usr/bin"
install -Dm755 "awib" "${pkgdir}/usr/bin/awib-ruby"
}
package_awib-tcl-git()
{
depends+=('tcl')
provides=("${_base}-tcl=${pkgver}")
conflicts=("${_base}-tcl")
cd "${srcdir}/${_base}"
(echo "@lang_tcl"; cat awib.b) | ./awib.tmp > awib
install -d "${pkgdir}/usr/bin"
install -Dm755 "awib" "${pkgdir}/usr/bin/awib-tcl"
}
package_awib-bash-git()
{
provides=("${_base}-bash=${pkgver}")
conflicts=("${_base}-bash")
cd "${srcdir}/${_base}"
(echo "#!/bin/bash"; cat awib.b) | > awib
install -d "${pkgdir}/usr/bin"
install -Dm755 "awib" "${pkgdir}/usr/bin/awib-bash"
}
|