%define MAJOR %(echo %version | cut -d. -f -2) %define MINOR %(echo %version | cut -d. -f 3-) %define javahome %{_jvmdir}/jdk Name: postgresql-jdbc Version: 8.4.701 Release: 3mamba Summary: PostgreSQL JDBC Driver Group: Applications/Databases Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://jdbc.postgresql.org/ Source0: http://jdbc.postgresql.org/download/postgresql-jdbc-%{MAJOR}-%{MINOR}.src.tar.gz Source1: postgresql-jdbc.pom Patch0: postgresql-jdbc-8.4.701-bogus-import.patch License: BSD BuildRequires: apache-ant BuildRequires: apache-ant-junit BuildRequires: apache-ant-nodeps BuildRequires: apache-ant-trax BuildRequires: docbook-xsl BuildRequires: findutils BuildRequires: gettext BuildRequires: java-junit3 #BuildRequires: java-gcj-compat BuildRequires: jpackage-utils BuildRequires: xalan-j2 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description PostgreSQL is an advanced Object-Relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc PostgreSQL is an advanced Object-Relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database This package contains javadoc for %{name}. %package manual Group: Documentation Summary: Manual for %{name} %description manual PostgreSQL is an advanced Object-Relational database management system. The postgresql-jdbc package includes the .jar files needed for Java programs to access a PostgreSQL database This package contains manual for %{name}. %prep %setup -q -c -n %{name}-%{version} mv -f %{name}-%{MAJOR}-%{MINOR}.src/* . rm -f %{name}-%{MAJOR}-%{MINOR}.src/.cvsignore rmdir %{name}-%{MAJOR}-%{MINOR}.src for j in $(find . -name "*.jar"); do mv $j ${j}.no done for j in $(find . -name "*.class"); do rm -rf $j done %patch0 %build export JAVA_HOME=%javahome export CLASSPATH=$(build-classpath junit-3.8.2 ant/ant-junit) sh update-translations.sh ant jar runtest publicapi privateapi export CLASSPATH=$CLASSPATH:$(build-classpath xalan-j2 xalan-j2-serializer ant/ant-trax ant/ant-nodeps) ant \ -Ddocbook.stylesheet=%{_datadir}/sgml/docbook/xsl-stylesheets/html/chunk.xsl \ -Ddocbook.xsl=%{_datadir}/sgml/docbook/xsl-stylesheets \ doc %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} install -m 644 jars/postgresql.jar \ %{buildroot}%{_javadir}/postgresql-jdbc-%{version}.jar install -m 644 jars/postgresql-tests.jar \ %{buildroot}%{_javadir}/postgresql-tests-%{version}.jar mkdir -p %{buildroot}%{_datadir}/maven2/poms cp %{SOURCE1} JPP-postgresql-jdbc.pom sed -i "s|@POSTGRESQL_JDBC_VERSION@|%{MAJOR}-%{MINOR}|" JPP-postgresql-jdbc.pom install -m 644 JPP-postgresql-jdbc.pom %{buildroot}%{_datadir}/maven2/poms/JPP-postgresql-jdbc.pom %add_to_maven_depmap postgresql postgresql %{version} JPP postgresql-jdbc pushd %{buildroot}%{_javadir} ln -s postgresql-jdbc-%{version}.jar postgresql-jdbc.jar ln -s postgresql-tests-%{version}.jar postgresql-tests.jar ln -s postgresql-jdbc-%{version}.jar postgresql-jdbc2.jar ln -s postgresql-jdbc-%{version}.jar postgresql-jdbc2ee.jar ln -s postgresql-jdbc-%{version}.jar postgresql-jdbc3.jar ln -s postgresql-jdbc-%{version}.jar postgresql-jdbc4.jar popd mkdir -p %{buildroot}%{_javadocdir}/postgresql-jdbc-%{version}/publicapi cp -pr build/publicapi/* %{buildroot}%{_javadocdir}/postgresql-jdbc-%{version}/publicapi mkdir -p %{buildroot}%{_javadocdir}/postgresql-jdbc-%{version}/privateapi cp -pr build/privateapi/* %{buildroot}%{_javadocdir}/postgresql-jdbc-%{version}/privateapi ln -sf postgresql-jdbc-%{version} %{buildroot}%{_javadocdir}/postgresql-jdbc %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root) %{_javadir}/postgresql-jdbc-%{version}.jar %{_javadir}/postgresql-jdbc.jar %{_javadir}/postgresql-tests-%{version}.jar %{_javadir}/postgresql-tests.jar %{_javadir}/postgresql-jdbc2.jar %{_javadir}/postgresql-jdbc2ee.jar %{_javadir}/postgresql-jdbc3.jar %{_javadir}/postgresql-jdbc4.jar %{_datadir}/maven2/poms %{_mavendepmapfragdir} %doc LICENSE README %files javadoc %defattr(-,root,root) %{_javadocdir}/postgresql-jdbc-%{version} %{_javadocdir}/postgresql-jdbc %files manual %defattr(-,root,root) %doc build/doc/build/doc/* %changelog * Sat Mar 26 2011 gil 8.4.701-3mamba - rebuilt with java-openjdk support * Thu Nov 04 2010 gil 8.4.701-2mamba - rebuilt devel * Sat Sep 26 2009 gil 8.4.701-1mamba - update to 8.4.701 * Sat Apr 25 2009 gil 8.3.604-1mamba - package created by autospec