diff --git a/c3p0-0.9.5.4.tar.gz b/c3p0-0.9.5.4.tar.gz new file mode 100644 index 0000000..8633f7b Binary files /dev/null and b/c3p0-0.9.5.4.tar.gz differ diff --git a/c3p0.spec b/c3p0.spec new file mode 100644 index 0000000..22a44cd --- /dev/null +++ b/c3p0.spec @@ -0,0 +1,60 @@ +Name: c3p0 +Version: 0.9.5.4 +Release: 2 +Summary: This is the JDBC DataSources/Resource Pools +License: LGPLv2 or EPL +URL: https://github.com/swaldman/c3p0 +Source0: https://github.com/swaldman/c3p0/archive/c3p0-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: javapackages-local ant mchange-commons >= 0.2.7 +Requires: mchange-commons >= 0.2.7 + +%description +c3p0 is a JDBC driver for extending traditional libraries (DriverManager-based libraries) with JNDI +bindable data sources (including data sources), as described in the jdbc3 specification and jdbc2 +standard extensions. They implement connections and statement pools. + +%package help +Summary: API documentation for c3p0 +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + +%description help +API documentation for c3p0. + +%prep +%autosetup -n %{name}-%{name}-%{version} -p1 + +find -name '*.class' -exec rm -f '{}' \; +find -name '*.jar' -exec rm -f '{}' \; + +sed -i -e "/Class-Path/d" build.xml + +%build +ant -Dbuild.sysclasspath=first \ + -Dmchange-commons-java.jar.file=$(build-classpath mchange-commons-java) jar javadoc + +sed -i -e "s|@c3p0.version.maven@|%{version}|g" -e \ +"s|@mchange-commons-java.version.maven@|0.2.7|g" src/maven/pom.xml + +%mvn_artifact src/maven/pom.xml build/c3p0-%{version}.jar +%mvn_alias : c3p0:c3p0 + +%install +%mvn_install + +install -d -m 755 %{buildroot}%{_javadocdir}/c3p0 +cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/c3p0 + +%files -f .mfiles +%doc src/dist-static/{LICENSE*,RELEASE*,CHANGELOG,README} src/doc/index.html +%dir %{_javadir}/c3p0 + +%files help +%{_javadocdir}/c3p0 + +%changelog +* Sat Dec 21 2019 duyeyu - 0.9.5.4-2 +- Package init +