diff options
author | Caleb Maclennan | 2020-08-20 12:57:23 +0300 |
---|---|---|
committer | Caleb Maclennan | 2020-08-20 12:57:23 +0300 |
commit | 7f8f94c7aa118d4ef0033a224a150bf08c3c125c (patch) | |
tree | 40a879c6bbeb02e962ea2581a5a9880cef13b5e8 | |
download | aur-7f8f94c7aa118d4ef0033a224a150bf08c3c125c.tar.gz |
Initial upload: zerobrane-studio-git 1.90.r17.ge7bf45d-1
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | user.lua | 16 | ||||
-rw-r--r-- | zbstudio.patch | 13 |
4 files changed, 132 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..362588ac0629 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = zerobrane-studio-git + pkgdesc = A lightweight Lua-based IDE for Lua + pkgver = 1.90.r17.ge7bf45d + pkgrel = 1 + url = https://studio.zerobrane.com/ + arch = any + license = MIT + makedepends = cmake + depends = hicolor-icon-theme + depends = lua + depends = lua-copas + depends = lua-filesystem + depends = lua-lpeg + depends = lua-sec + depends = lua-socket + depends = wxlua-git + optdepends = lua-busted: to debug busted test specs + optdepends = gsl-shell: te debug GNU Scientific Library shell programs + optdepends = love: to debug löve programs + optdepends = lua51: to debug lua51 programs + optdepends = lua52: to debug lua52 programs + optdepends = lua53: to debug lua53 programs + provides = zerobrane-studio + conflicts = zerobrane-studio + source = git+https://github.com/pkulchenko/ZeroBraneStudio.git + source = zbstudio.patch + source = user.lua + sha256sums = SKIP + sha256sums = 44f3a18f169a571bace71c67c398917ea0ff1c163c7d22bec49aed7585bcb9b2 + sha256sums = 812ec8aaa691b91f0054d97e1004475b6d2d4ef7b0b846615a8e3c3e4dd119c3 + +pkgname = zerobrane-studio-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a1c231d83d02 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintener: Caleb Maclennan <caleb@alerque.com> +# Contributor: Popolon <popolon@popolon.org> +# Contributor: Michael Gerhaeuser <michael.gerhaeuser@gmail.com> +# Contributor: Harley Laue <losinggeneration@gmail.com> + +pkgname=zerobrane-studio-git +_pkgname=ZeroBraneStudio +pkgver=1.90.r17.ge7bf45d +pkgrel=1 +pkgdesc="A lightweight Lua-based IDE for Lua" +arch=('any') +url='https://studio.zerobrane.com/' +license=('MIT') +_lua_deps=('copas' + 'filesystem' + 'lpeg' + 'sec' + 'socket') +depends=('hicolor-icon-theme' + 'lua' + "${_lua_deps[@]/#/lua-}" + 'wxlua-git') +makedepends=('cmake') +optdepends=('lua-busted: to debug busted test specs' + 'gsl-shell: te debug GNU Scientific Library shell programs' + 'love: to debug löve programs' + 'lua51: to debug lua51 programs' + 'lua52: to debug lua52 programs' + 'lua53: to debug lua53 programs') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +backups=("etc/${pkgname%-git}/user.lua") +source=("git+https://github.com/pkulchenko/$_pkgname.git" + 'zbstudio.patch' + 'user.lua') +sha256sums=('SKIP' + '44f3a18f169a571bace71c67c398917ea0ff1c163c7d22bec49aed7585bcb9b2' + '812ec8aaa691b91f0054d97e1004475b6d2d4ef7b0b846615a8e3c3e4dd119c3') + +pkgver() { + cd "$_pkgname" + git describe --long --tags --abbrev=7 HEAD | + sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$_pkgname" + patch -p1 < "$srcdir/zbstudio.patch" +} + +build() { + cd "$_pkgname" + cmake -S build -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release + make -C build +} + +package() { + cd "$_pkgname" + make -C build DESTDIR="$pkgdir" install + install -Dm644 -t "$pkgdir/etc/$pkgname/" "$srcdir/user.lua" + install -dm644 "$pkgdir/usr/share/zbstudio/cfg" + ln -sf "/etc/$pkgname/user.lua" "$pkgdir/usr/share/zbstudio/cfg" + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE + cp -a lualibs "$pkgdir/usr/share/zbstudio/" + # drop Lua deps we have the system providing + pushd "$pkgdir/usr/share/zbstudio/" + rm -rf lualibs/{ltn12,mime,re,socket,ssl}.lua lualibs/{copas,coxpcall,socket,ssl} +} diff --git a/user.lua b/user.lua new file mode 100644 index 000000000000..c63c149701d0 --- /dev/null +++ b/user.lua @@ -0,0 +1,16 @@ +--[[-- This file shows examples of settings you can adjust. + +Configuration files with preferences are loaded in the following order: +1. cfg/user.lua (system-wide configuration) +2. HOME/.zbstudio/user.lua (per-user configuration) +3. -cfg <lua code fragment|filename> (command line configuration) + +See [configuration](http://studio.zerobrane.com/doc-configuration.html) page for information about location of configuration files. + +--]]-- + +-- to specify full path to lua interpreter if you need to use your own version +path.lua = '/usr/bin/lua' +path.lua53 = '/usr/bin/lua5.3' +path.lua52 = '/usr/bin/lua5.2' +path.lua51 = '/usr/bin/lua5.1' diff --git a/zbstudio.patch b/zbstudio.patch new file mode 100644 index 000000000000..531206b36079 --- /dev/null +++ b/zbstudio.patch @@ -0,0 +1,13 @@ +--- a/zbstudio/zbstudio.in ++++ b/zbstudio/zbstudio.in +@@ -1,6 +1,4 @@ +-#!/bin/bash +- +-if [[ "$(uname -m)" == "x86_64" ]]; then ARCH="x64"; else ARCH="x86"; fi +-CWD="$PWD" # save the current directory, as it's going to change +- +-(cd "@IDE_DATADIR@"; bin/linux/$ARCH/lua src/main.lua zbstudio -cwd "$CWD" "$@" 2>/dev/null) & ++#!/usr/bin/env sh ++CWD=$(pwd) ++cd "@IDE_DATADIR@" ++exec @LUA_EXECUTABLE@ src/main.lua zbstudio -cwd "$CWD" "$@" |