[jinput] Replace @API_VERSION@ and @BUILD_NUMBER@ in net.java.games.input.Version.

Jerry James jjames at fedoraproject.org
Sun Mar 30 02:06:33 UTC 2014


commit abbc138e944d02fb0402007424a7ed7a4595a513
Author: Jerry James <loganjerry at gmail.com>
Date:   Sat Mar 29 20:06:27 2014 -0600

    Replace @API_VERSION@ and @BUILD_NUMBER@ in net.java.games.input.Version.

 jinput.spec |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/jinput.spec b/jinput.spec
index 719bca7..f9ca94b 100644
--- a/jinput.spec
+++ b/jinput.spec
@@ -1,6 +1,6 @@
 Name:           jinput
 Version:        2.0.6
-Release:        8.20130309svn%{?dist}
+Release:        9.20130309svn%{?dist}
 Summary:        Java Game Controller API
 
 Group:          Development/Libraries
@@ -75,13 +75,23 @@ This package contains the API documentation for %{name}.
 rm -f lib/*.jar
 build-jar-repository -s -p lib jutils
 
+fixtimestamp() {
+  touch -r $1.orig $1
+  rm -f $1.orig
+}
+
 # Fix the version string in the POMs
 for fil in jinput.pom jinput-platform.pom; do
   sed -i.orig 's/@VERSION@/%{version}/' $fil
-  touch -r $fil.orig $fil
-  rm -f $fil.orig
+  fixtimestamp $fil
 done
 
+# Fix the version string in net.java.games.input.Version
+%global buildnum %(cut -d. -f1 <<< %{release})
+sed -i.orig 's/@API_VERSION@/%{version}/;s/@BUILD_NUMBER@/%{buildnum}/' \
+    coreAPI/src/java/net/java/games/input/Version.java
+fixtimestamp coreAPI/src/java/net/java/games/input/Version.java
+
 # Use Fedora's CFLAGS and LDFLAGS
 sed -i "s/-O2 -Wall/$RPM_OPT_FLAGS/;s/-shared/& $RPM_LD_FLAGS/" \
     plugins/linux/src/native/build.xml
@@ -145,6 +155,9 @@ ant versiontest
 %{_javadocdir}/%{name}/
 
 %changelog
+* Sat Mar 29 2014 Jerry James <loganjerry at gmail.com> - 2.0.6-9.20130309svn
+- Replace @API_VERSION@ and @BUILD_NUMBER@ in net.java.games.input.Version
+
 * Mon Mar 17 2014 Jerry James <loganjerry at gmail.com> - 2.0.6-8.20130309svn
 - Fix 003_jinput_usesystemload.patch to always load the so correctly
 


More information about the scm-commits mailing list