summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeposite Pirate2018-08-28 20:54:31 +0200
committerDeposite Pirate2018-08-28 20:54:31 +0200
commit4e3eabb42798cd2c4ef73288873dbc871a45f2e8 (patch)
tree37b150287b8121451fd64337dd126cf8c93a62fc
downloadaur-4e3eabb42798cd2c4ef73288873dbc871a45f2e8.tar.gz
Initial commit.
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD48
-rw-r--r--my_basic-makefile.patch22
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..747deec9019b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = my_basic-git
+ pkgdesc = BASIC interpreter
+ pkgver = r1035.g685d352
+ pkgrel = 1
+ url = https://paladin-t.github.io/my_basic
+ arch = i686
+ arch = x86_64
+ license = MIT
+ source = my_basic-git::git+https://github.com/paladin-t/my_basic
+ source = my_basic-makefile.patch
+ sha256sums = SKIP
+ sha256sums = 3ef06138e5403c16260897dcb7522cb3caea4ca182d65e0a1acf50693a6a8cf5
+
+pkgname = my_basic-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..005a2f6b3f3a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Christoph J. Thompson <thompsonc at protonmail dot ch>
+
+_pkgname=my_basic
+pkgname=$_pkgname-git
+pkgver=r1035.g685d352
+pkgrel=1
+pkgdesc="BASIC interpreter"
+arch=('i686' 'x86_64')
+url="https://paladin-t.github.io/my_basic"
+license=('MIT')
+source=("$pkgname::git+https://github.com/paladin-t/$_pkgname"
+ "$_pkgname-makefile.patch")
+sha256sums=('SKIP'
+ '3ef06138e5403c16260897dcb7522cb3caea4ca182d65e0a1acf50693a6a8cf5')
+
+pkgver() {
+ cd "${pkgname}"
+ printf "r%s.g%s" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${pkgname}"
+
+ # Patch CFLAGS
+ patch -p1 -i "${srcdir}/${_pkgname}-makefile.patch"
+}
+
+build() {
+ cd "${pkgname}"
+ make CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd "${pkgname}"
+
+ install -Dm755 output/my_basic_bin "${pkgdir}/usr/bin/${_pkgname}"
+
+ install -dm755 "${pkgdir}/usr/share/doc/${_pkgname}/sample/yard"
+
+ install -m644 HISTORY *.{pdf,html} \
+ "${pkgdir}/usr/share/doc/${_pkgname}"
+ install -m644 sample/{README*,*.bas} \
+ "${pkgdir}/usr/share/doc/${_pkgname}/sample"
+ install -m644 sample/yard/{README*,*.bas} \
+ "${pkgdir}/usr/share/doc/${_pkgname}/sample/yard"
+}
diff --git a/my_basic-makefile.patch b/my_basic-makefile.patch
new file mode 100644
index 000000000000..235077549a04
--- /dev/null
+++ b/my_basic-makefile.patch
@@ -0,0 +1,22 @@
+diff -u -r -N my_basic/makefile my_basic-makefile/makefile
+--- my_basic/makefile 2018-08-28 20:17:25.725132293 +0200
++++ my_basic-makefile/makefile 2018-08-28 20:32:42.807023449 +0200
+@@ -1,3 +1,5 @@
++CFLAGS=-Os
++
+ OS := $(shell uname -s)
+ IS_APPLE := $(shell echo $(OS)|grep -i darwin)
+
+@@ -10,10 +12,10 @@
+ endif
+
+ main.o : shell/main.c core/my_basic.h
+- cc -Os -c shell/main.c -Wno-unused-result
++ cc $(CFLAGS) -c shell/main.c -Wno-unused-result
+
+ my_basic.o : core/my_basic.c core/my_basic.h
+- cc -Os -c core/my_basic.c -Wno-multichar -Wno-overflow -Wno-unused-result
++ cc $(CFLAGS) -c core/my_basic.c -Wno-multichar -Wno-overflow -Wno-unused-result
+
+ clean :
+ rm -f main.o my_basic.o output/my_basic_bin output/my_basic_bin.exe