Skip to content

Instantly share code, notes, and snippets.

@mspaulding06
Created September 24, 2020 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mspaulding06/70bf21c861b8c5e260f2c9c5b784d993 to your computer and use it in GitHub Desktop.
Save mspaulding06/70bf21c861b8c5e260f2c9c5b784d993 to your computer and use it in GitHub Desktop.
Patch for AUR package PKGBUILD gerbil-scheme-git
commit b8052e625f889eb023d2259602383871da237244
Author: Matt Spaulding <matt@mattops.io>
Date: Thu Sep 24 16:00:22 2020 -0700
* Update use of git to latest standards
* Support new Gerbil build system
* Fix profile file and include GERBIL_GSC
diff --git a/PKGBUILD b/PKGBUILD
index 08ce743..6e4a562 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,8 @@
# Maintainer: Peter <craven@gmx.net>
pkgname=gerbil-scheme-git
-pkgver=0.12
-pkgrel=4
+pkgver=0.16.r139.g41625f7b
+pkgrel=1
pkgdesc="Gerbil is an opinionated dialect of Scheme designed for Systems Programming, with a state of the art macro and module system on top of the Gambit runtime."
arch=(x86_64 i686)
url="https://github.com/vyzo/gerbil"
@@ -23,46 +23,27 @@ replaces=()
backup=()
options=()
install=
-source=()
-
+source=('gerbil::git+https://github.com/vyzo/gerbil.git#branch=master')
+md5sums=('SKIP')
noextract=()
#generate with 'makepkg -g'
-_gitroot=https://github.com/vyzo/gerbil.git
-_gitname=gerbil
+pkgver() {
+ cd gerbil
+ # cutting off 'v' prefix that presents in the git tag
+ git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
build() {
- cd "$srcdir"
- msg "Connecting to GIT server...."
-
- if [[ -d "$_gitname" ]]; then
- cd "$_gitname" && git pull origin
- msg "The local files are updated."
- else
- git clone "$_gitroot" "$_gitname"
- fi
-
- msg "GIT checkout done or server timeout"
- msg "Starting build..."
-
- rm -rf "$srcdir/$_gitname-build"
- git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
- cd "$srcdir/$_gitname-build"
-
- #
- # BUILD HERE
- #
- mkdir -p binx
- ln -s /usr/bin/gambitc binx/gsc
- export PATH=$(pwd)/binx:$PATH
- cd src/
- ./build.sh
+ cd "$srcdir/gerbil/src"
+ ./configure
+ GERBIL_GSC=/usr/bin/gsc-script ./build.sh
}
package() {
- cd "$srcdir/$_gitname-build"
+ cd "$srcdir/gerbil"
mkdir -p ${pkgdir}/opt/gerbil-scheme-git
cp -R bin ${pkgdir}/opt/gerbil-scheme-git/bin
cp -R doc ${pkgdir}/opt/gerbil-scheme-git/doc
@@ -73,8 +54,9 @@ package() {
mkdir -p ${pkgdir}/etc/profile.d/
cat <<EOF > ${pkgdir}/etc/profile.d/gerbil-scheme-git.sh
#!/bin/bash
+export GERBIL_GSC=/usr/bin/gsc-script
export GERBIL_HOME=/opt/gerbil-scheme-git
-export PATH=/opt/gerbil-scheme-git/bin:$PATH
+export PATH=/opt/gerbil-scheme-git/bin:\$PATH
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment