Skip to content

Commit

Permalink
New package: genie-1141
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrelliCopter committed Jan 28, 2021
1 parent 50864d3 commit fa8a2e9
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
35 changes: 35 additions & 0 deletions srcpkgs/genie/patches/no-git.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/scripts/release.lua b/scripts/release.lua
index d1173d5..a9d11d7 100644
--- a/scripts/release.lua
+++ b/scripts/release.lua
@@ -13,18 +13,18 @@ function dorelease()
end


- print("Updating version number...")
-
- local f = io.popen("git rev-list --count HEAD")
- local rev = string.match(f:read("*a"), ".*%S")
- f:close()
- f = io.popen("git log --format=format:%H -1")
- local sha1 = f:read("*a")
- f:close()
- io.output("src/host/version.h")
- io.write("#define VERSION " ..rev .. "\n")
- io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n")
- io.close()
+ --print("Updating version number...")
+
+ --local f = io.popen("git rev-list --count HEAD")
+ --local rev = string.match(f:read("*a"), ".*%S")
+ --f:close()
+ --f = io.popen("git log --format=format:%H -1")
+ --local sha1 = f:read("*a")
+ --f:close()
+ --io.output("src/host/version.h")
+ --io.write("#define VERSION " ..rev .. "\n")
+ --io.write("#define VERSION_STR \"version " ..rev .. " (commit " .. sha1 .. ")\"\n")
+ --io.close()


print("Updating embedded scripts...")
50 changes: 50 additions & 0 deletions srcpkgs/genie/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Template file for 'genie'
pkgname=genie
version=1141
revision=1
_githash=44918162588e56512ddac6264b08ca6ba4e67468
wrksrc="GENie-${_githash}"
short_desc="Project generator tool using Lua"
maintainer="a dinosaur <nick@a-dinosaur.com>"
license="BSD-3-Clause"
homepage="https://github.com/bkaradzic/GENie"
distfiles="https://github.com/bkaradzic/GENie/archive/${_githash}.tar.gz"
checksum=6dfc98dfeae0600c5c12a98156b2238effee5c1e2e09e8107477d9e5cfc7278d
patch_args="-Np1"

do_configure() {
case "$XBPS_MACHINE" in
x86_64*|ppc64*) # no changes needed
;;
*) # '-m64' only valid for x86_64, ppc64 and messes up 32-bit & ARM builds
# so remove it
vsed 's/-m64 //' -i build/gmake.linux/genie.make
;;
esac
make ${makejobs} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}"
case "$XBPS_TARGET_MACHINE" in
x86_64*|ppc64*) # no changes needed
;;
*) # same as before but fixes cross-builds
vsed 's/-m64//' -i scripts/genie.lua
;;
esac

# generate version.h without using Git
echo "#define VERSION ${version}" > src/host/version.h
echo "#define VERSION_STR \"version ${version} (commit ${_githash})\"" >> src/host/version.h

./bin/linux/genie release
make ${makejobs} -C build/gmake.linux clean
}

do_build() {
make ${makejobs} CC="${CC}" -C build/gmake.linux all
}

do_install() {
vbin bin/linux/genie
vdoc README.md
vdoc docs/scripting-reference.md
vlicense LICENSE
}
2 changes: 2 additions & 0 deletions srcpkgs/genie/update
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
site="https://github.com/bkaradzic/GENie"
pattern='<code>version \K[0-9]+(?= \(commit [0-9a-z]+\))'

0 comments on commit fa8a2e9

Please sign in to comment.