aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 14:24:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 14:26:01 -0700
commitbcc026d8a264212722a6b6a110cad5cf0522fc42 (patch)
tree0ebabe7268f77eccfd2d7cb119048ad43885c3b6
parent74d3ee838199bf294a4795940be5c2105d4a673c (diff)
downloadgrv-bcc026d8a264212722a6b6a110cad5cf0522fc42.tar.gz
grv-bcc026d8a264212722a6b6a110cad5cf0522fc42.tar.xz
grv-bcc026d8a264212722a6b6a110cad5cf0522fc42.zip
Auto-generate version number in packing files
-rw-r--r--Info.plist.in (renamed from Info.plist)4
-rw-r--r--grv.spec.in (renamed from grv.spec)4
-rwxr-xr-xmkrel11
3 files changed, 15 insertions, 4 deletions
diff --git a/Info.plist b/Info.plist.in
index fc6fd74..f498998 100644
--- a/Info.plist
+++ b/Info.plist.in
@@ -9,7 +9,7 @@
<key>CFBundleIdentifier</key>
<string>com.zytor.Grv</string>
<key>CFBundleVersion</key>
- <string>2018.0.1</string>
+ <string>@@VERSION@@.1</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
@@ -17,7 +17,7 @@
<key>CFBundleExecutable</key>
<string>grv</string>
<key>CFBundleShortVersionString</key>
- <string>2018.0.1</string>
+ <string>@@VERSION@@.1</string>
<key>LSMinimumSystemVersion</key>
<string>10.4.0</string>
<key>NSHumanReadableCopyright</key>
diff --git a/grv.spec b/grv.spec.in
index e0decdf..fb116e9 100644
--- a/grv.spec
+++ b/grv.spec.in
@@ -1,6 +1,6 @@
Summary: "Grävning" - a port of an old game with sucky graphics
Name: grv
-Version: 2018.0
+Version: @@VERSION@@
Release: 1
Group: Games
License: GPLv2
@@ -30,6 +30,7 @@ make
%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
install -m 755 grv $RPM_BUILD_ROOT/%{_bindir}
+install -m 755 grvscored $RPM_BUILD_ROOT/%{_sbindir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -38,3 +39,4 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%doc README COPYING
%attr(755,root,root) %{_bindir}/grv
+%attr(755,root,root) %{_sbindir}/grvscored
diff --git a/mkrel b/mkrel
index 308bce6..f9d1a3e 100755
--- a/mkrel
+++ b/mkrel
@@ -1,7 +1,12 @@
#!/bin/bash -xe
project=grv
-pv="$(git describe --abbrev=4)"
+ver="$(git describe --abbrev=4 2>/dev/null | sed -e "s/^$project-//")"
+if [ -z "$ver" ]; then
+ ver="$(cat version)"
+fi
+pv="$project-$ver"
+
windll='SDL.dll libwinpthread-1.dll'
rm -rf rel/"$pv"
@@ -11,7 +16,11 @@ cd rel/"$pv"
( cd ../.. && git archive --format=tar --prefix="$pv"/ HEAD ) | \
tar xvvf -
cd "$pv"
+echo "$ver" > version
./autogen.sh
+for f in Info.plist grv.spec; do
+ sed -e "s/@@VERSION@@/$ver/" "$f".in > "$f"
+done
cd ..
tar cvvf "$pv".tar "$pv"
xz -9ek "$pv".tar