SPECS: mysql-connector-j.spec - build package

glen glen at pld-linux.org
Wed Sep 20 01:01:11 CEST 2006


Author: glen                         Date: Tue Sep 19 23:01:11 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build package

---- Files affected:
SPECS:
   mysql-connector-j.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/mysql-connector-j.spec
diff -u SPECS/mysql-connector-j.spec:1.5 SPECS/mysql-connector-j.spec:1.6
--- SPECS/mysql-connector-j.spec:1.5	Sat Sep  9 00:41:48 2006
+++ SPECS/mysql-connector-j.spec	Wed Sep 20 01:01:06 2006
@@ -1,19 +1,18 @@
 # $Revision$, $Date$
-#
-# Conditional build:
-%bcond_without	bindist		# don't use binary distribution (not finished)
-#
 Summary:	MySQL Connector/J - JDBC driver for MySQL
 Summary(pl):	MySQL Connector/J - sterownik JDBC dla MySQL-a
 Name:		mysql-connector-j
 Version:	3.1.13
-Release:	0.1
+Release:	0.2
 License:	GPL v2+ + MySQL FLOSS Exception
 Group:		Libraries
 Source0:	http://mysql.tonnikala.org/Downloads/Connector-J/%{name}ava-%{version}.tar.gz
 # Source0-md5:	b2fc8cc8990d85629b183f284a8f46d8
 URL:		http://www.mysql.com/products/connector/j/
-%{!?with_bindist:BuildRequires:	ant >= 1.5}
+BuildRequires:	ant >= 1.5
+BuildRequires:	jaxp_parser_impl
+BuildRequires:	jpackage-utils
+BuildRequires:	rpmbuild(macros) >= 1.300
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -53,20 +52,22 @@
 %prep
 %setup -q -n %{name}ava-%{version}
 rm -f docs/README # duplicate
+# don't package it with docs
+mv docs/release-test-output .
 
 %build
-%{!?with_bindist:ant}
+export JAVA_HOME="%{java_home}"
+required_jars='jaxp_parser_impl'
+export CLASSPATH="$(%{_bindir}/build-classpath $required_jars)"
+%ant
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_javadir},%{_examplesdir},%{_javadocdir}/%{name}-%{version}}
 
-%if %{with bindist}
-install -d $RPM_BUILD_ROOT%{_javadir}
-install mysql-connector-java-%{version}-bin.jar $RPM_BUILD_ROOT%{_javadir}/mysql-connector-java-%{version}.jar
-ln -s mysql-connector-java-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/mysql-connector-java.jar
-%else
-%{error:not finished}
-%endif
+install build/mysql-connector-java-%{version}/mysql-connector-java-%{version}-bin.jar \
+	$RPM_BUILD_ROOT%{_javadir}/mysql-connector-java-%{version}.jar
+ln -sf mysql-connector-java-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/mysql-connector-java.jar
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -86,6 +87,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2006/09/19 23:01:06  glen
+- build package
+
 Revision 1.5  2006/09/08 22:41:48  glen
 - 3.1.13 (still needs finishing)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mysql-connector-j.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list