-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50864d3
commit fa8a2e9
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]+\))' |