Package Details: clibasic 1.1.1-1

Git Clone URL: https://aur.archlinux.org/clibasic.git (read-only, click to copy)
Package Base: clibasic
Description: A BASIC interpreter for the terminal, written in C
Upstream URL: https://github.com/PQCraft/CLIBASIC
Keywords: BASIC C Interpreter Terminal
Licenses: GPL3
Conflicts: clibasic-bin
Submitter: PQCraft
Maintainer: PQCraft
Last Packager: PQCraft
Votes: 1
Popularity: 0.000000
First Submitted: 2021-07-11 00:05 (UTC)
Last Updated: 2022-01-13 00:42 (UTC)

Required by (0)

Sources (1)

Latest Comments

PQCraft commented on 2021-08-31 13:38 (UTC)

I'm having trouble with pushing rn, git hangs when I try to push.

PQCraft commented on 2021-07-11 14:36 (UTC)

Fixed

PQCraft commented on 2021-07-11 14:33 (UTC)

Well atm im dealing with some trouble so give me a few hours, I can't push as I'm getting this error:

remote: error: The following error occurred when parsing commit
remote: error: ad264c42bc72f073dfd1377cfee5167edbbaac2a:
remote: error: missing source file: Makefile
remote: error: hook declined to update refs/heads/master

Its most likely going to take me a while to figure this out as this means absolutely nothing to me besides 'Makefile is missing' and its certainly not as I have it right here in my local directory.

PQCraft commented on 2021-07-11 14:13 (UTC)

@lmartinez-mirror These issue should be fixed now, also the reason I have it download individual files is because I only want it to download what is needed as downloading the entire source would also download some Windows libraries and documentation.

lmartinez-mirror commented on 2021-07-11 01:58 (UTC) (edited on 2021-07-11 02:15 (UTC) by lmartinez-mirror)

Couple of things here:

  • The PKGBUILD should just download the latest release's tarball for compilation, rather than the individual source files.
  • This package should not add itself to base-devel, since that's reserved for Arch build tools.
  • any arch is reserved for packages that do not compile into arch-dependent binaries; anything that uses gcc is inherently arch-dependent.
  • Empty variables and commented routines should be removed whenever possible

You can read more here.

EDIT: I put this patch together for your PKGBUILD to address the issues above, however the Makefile will need to be reworked to allow CFLAGS and LDFLAGS to apply, since this doesn't have PIE or RELRO enabled.

diff --git a/PKGBUILD b/PKGBUILD
index 93f6bd3..1581df4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,72 +1,25 @@
-# This is an example PKGBUILD file. Use this as a start to creating your own,
-# and remove these comments. For more information, see 'man PKGBUILD'.
-# NOTE: Please fill out the license field for your package! If it is unknown,
-# then please put 'unknown'.
-
 # Maintainer: PQCraft <0456523@gmail.com>
-pkgname="clibasic"
-pkgver="0.15.8"
-pkgrel=4
-epoch=
+# Contributor: Luis Martinez <luis dot martinez at tuta dot io>
+
+pkgname=clibasic
+pkgver=0.15.8
+pkgrel=5
 pkgdesc="A BASIC interpreter for the terminal written in C"
-arch=('any')
+arch=('x86_64')
 url="https://github.com/PQCraft/clibasic"
-license=('GPLv3')
-groups=('base-devel')
-depends=('readline' 'lib32-readline')
-makedepends=('glibc' 'make' 'readline' 'lib32-readline')
-checkdepends=()
-optdepends=()
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=()
-install=
-changelog=
-source=("Makefile"
-        "clibasic.c"
-        "commands.c"
-        "functions.c"
-        "logic.c")
-noextract=()
-sha256sums=('a00c4b01eb8d9838e8cdd6473309f1f98aa250740fce62e2664f1c8c384f622e'
-            '1a3c80a96d7444df8c75d3c84d6fe2ce06e8a74beec64446026337d8a91c0d3c'
-            '6e71e76b8943e5f7fcba9a30b56e6c52f307f034260390037b50885c7d62e119'
-            '50278d8801280c2d7eb7788db010487909ccb812e29b098c948bc1d520493211'
-            '9832e6065abebac396632ffdd6f5fcb34bc94045276c4661bdfd212a51fce64f')
-validpgpkeys=()
-
-prepare() {
-    #echo "prepare()"
-    #echo "srcdir: ${srcdir}"
-    #echo "pkgdir: ${pkgdir}"
-    cd ${srcdir}
-    make clean
-}
+license=('GPL3')
+depends=('readline')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha256sums=('c265e7d8283fb404f8b7d7e909d30e336e7570e041fd0c6d6042300c7ac1c004')
+validpgpkeys=('4AEE18F83AFDEB23')

 build() {
-    #echo "build()"
-    #echo "srcdir: ${srcdir}"
-    #echo "pkgdir: ${pkgdir}"
-    cd ${srcdir}
+    cd "$pkgname-$pkgver"
     make build
 }

-check() {
-    #echo "check()"
-    #echo "srcdir: ${srcdir}"
-    #echo "pkgdir: ${pkgdir}"
-    cd ${srcdir}
-    [ -f ./clibasic ]
-}
-
 package() {
-    #echo "package()"
-    #echo "srcdir: ${srcdir}"
-    #echo "pkgdir: ${pkgdir}"
-    cd ${pkgdir}
-    mkdir -p ./usr/bin/
-    mv ${srcdir}/clibasic ${pkgdir}/usr/bin/
+    cd "$pkgname-$pkgver"
+    install -Dm 755 clibasic -t "$pkgdir/usr/bin/"
+    install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
 }
-