SPECS: mm.mysql.jdbc.spec - dunno even 1.4 is too new

glen glen at pld-linux.org
Wed Dec 12 23:31:06 CET 2007


Author: glen                         Date: Wed Dec 12 22:31:06 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- dunno even 1.4 is too new

---- Files affected:
SPECS:
   mm.mysql.jdbc.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/mm.mysql.jdbc.spec
diff -u SPECS/mm.mysql.jdbc.spec:1.1 SPECS/mm.mysql.jdbc.spec:1.2
--- SPECS/mm.mysql.jdbc.spec:1.1	Wed Dec 12 23:27:24 2007
+++ SPECS/mm.mysql.jdbc.spec	Wed Dec 12 23:31:01 2007
@@ -1,15 +1,23 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_with	binary		# use binary jar instead of compiling
+
+%define java_version %(IFS=.; set -- $(%java -fullversion 2>&1 | grep -o '".*"' | xargs); echo "$1.$2")
+%if "%{java_version}" >= "1.4"
+%define	with_binary 1
+%endif
 %include	/usr/lib/rpm/macros.java
 Summary:	MM.MySQL is A Type IV JDBC driver for MySQL
 Name:		mm.mysql.jdbc
 Version:	1.2c
-Release:	0.1
+Release:	1
 License:	LGPL v2
 Group:		Development/Languages/Java
 URL:		http://mmmysql.sourceforge.net/oldDist.html
 Source0:	http://mmmysql.sourceforge.net/dist/%{name}-%{version}.tar.gz
 # Source0-md5:	b04aa7f3048c2ebb169ee88ce19a6a4c
-BuildRequires:	jdk
+%{!?with_binary:BuildRequires:	jdk < 1.4}
 BuildRequires:	jpackage-utils
 BuildRequires:	rpm-javaprov
 BuildRequires:	rpmbuild(macros) >= 1.300
@@ -27,10 +35,13 @@
 
 %prep
 %setup -q
+mv mysql_comp.jar %{name}.jar
 
+%if %{without binary}
 %build
 %javac -source 1.2 -target 1.2 org/gjt/mm/mysql/*.java
 %jar -cvf %{name}.jar org/gjt/mm/mysql/*.class
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -53,6 +64,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2007-12-12 22:31:01  glen
+- dunno even 1.4 is too new
+
 Revision 1.1  2007-12-12 22:27:24  glen
 - add here
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/mm.mysql.jdbc.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list