Blame SPECS/mariadb-java-client.spec

7a781e
Name:		mariadb-java-client
7a781e
Version:	2.2.5
ceeb78
Release:	3%{?dist}
7a781e
Summary:	Connects applications developed in Java to MariaDB and MySQL databases
7a781e
# added BSD license because of https://bugzilla.redhat.com/show_bug.cgi?id=1291558#c13
7a781e
License:	BSD and LGPLv2+
7a781e
URL:		https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
7a781e
Source0:	https://github.com/MariaDB/mariadb-connector-j/archive/%{version}.tar.gz
7a781e
7a781e
# optional dependency not in Fedora
7a781e
Patch0:		remove_waffle-jna.patch
7a781e
7a781e
BuildArch:	noarch
7a781e
BuildRequires:	maven-local
7a781e
BuildRequires:	mvn(net.java.dev.jna:jna)
7a781e
BuildRequires:	mvn(net.java.dev.jna:jna-platform)
7a781e
BuildRequires:	mvn(com.google.code.maven-replacer-plugin:replacer)
7a781e
# fedora 25
7a781e
BuildRequires:	mvn(org.apache.felix:maven-bundle-plugin)
7a781e
BuildRequires:	mvn(org.sonatype.oss:oss-parent:pom:)
7a781e
BuildRequires:	mvn(org.codehaus.mojo:build-helper-maven-plugin)
7a781e
# since version 1.5.2 missing optional dependency (windows)
7a781e
#BuildRequires:	mvn(com.github.dblock.waffle:waffle-jna)
7a781e
ceeb78
Suggests:	mariadb-server
7a781e
7a781e
%description
7a781e
MariaDB Connector/J is a Type 4 JDBC driver, also known as the Direct to
7a781e
Database Pure Java Driver. It was developed specifically as a lightweight
7a781e
JDBC connector for use with MySQL and MariaDB database servers.
7a781e
7a781e
%package javadoc
7a781e
Summary:	Javadoc for %{name}
7a781e
7a781e
%description javadoc
7a781e
This package contains the API documentation for %{name}.
7a781e
7a781e
%prep
7a781e
%setup -qn mariadb-connector-j-%{version}
7a781e
7a781e
# convert files from dos to unix line encoding
7a781e
for file in README.md documentation/*.creole; do
7a781e
 sed -i.orig 's|\r||g' $file
7a781e
 touch -r $file.orig $file
7a781e
 rm $file.orig
7a781e
done
7a781e
7a781e
# remove missing optional dependency waffle-jna
7a781e
%pom_remove_dep com.github.waffle:waffle-jna
7a781e
%pom_remove_dep com.zaxxer:HikariCP
7a781e
%pom_remove_dep ch.qos.logback:logback-classic
7a781e
# also remove the file using the removed plugin
7a781e
rm -f src/main/java/org/mariadb/jdbc/internal/com/send/gssapi/WindowsNativeSspiAuthentication.java
7a781e
# patch the sources so that the missing file is not making trouble
7a781e
%patch0 -p1
7a781e
7a781e
%mvn_file org.mariadb.jdbc:%{name} %{name}
7a781e
%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java
7a781e
7a781e
%pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin
7a781e
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
7a781e
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
7a781e
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
7a781e
%pom_remove_plugin pl.project13.maven:git-commit-id-plugin
7a781e
%pom_remove_plugin -r :maven-gpg-plugin
7a781e
7a781e
# remove preconfigured OSGi manifest file and generate OSGi manifest file
7a781e
# with maven-bundle-plugin instead of using maven-jar-plugin
7a781e
rm src/main/resources/META-INF/MANIFEST.MF
7a781e
%pom_xpath_set "pom:packaging" bundle
7a781e
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestFile" '${project.build.outputDirectory}/META-INF/MANIFEST.MF'
7a781e
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestEntries"
7a781e
7a781e
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . '
7a781e
<extensions>true</extensions>
7a781e
<configuration>
7a781e
  <instructions>
7a781e
    <Bundle-SymbolicName>${project.groupId}</Bundle-SymbolicName>
7a781e
    <Bundle-Name>MariaDB JDBC Client</Bundle-Name>
7a781e
    <Bundle-Version>${project.version}.0</Bundle-Version>
7a781e
    <Export-Package>org.mariadb.jdbc.*</Export-Package>
7a781e
    <Import-Package>
7a781e
      !com.sun.jna.*,
7a781e
      javax.net;resolution:=optional,
7a781e
      javax.net.ssl;resolution:=optional,
7a781e
      javax.sql;resolution:=optional,
7a781e
      javax.transaction.xa;resolution:=optional
7a781e
    </Import-Package>
7a781e
  </instructions>
7a781e
</configuration>
7a781e
<executions>
7a781e
  <execution>
7a781e
    <id>bundle-manifest</id>
7a781e
    <phase>process-classes</phase>
7a781e
    <goals>
7a781e
      <goal>manifest</goal>
7a781e
    </goals>
7a781e
  </execution>
7a781e
</executions>'
7a781e
7a781e
%build
7a781e
# tests are skipped, while they require running application server
7a781e
%mvn_build -- -Dmaven.test.skip
7a781e
7a781e
%install
7a781e
%mvn_install
7a781e
7a781e
%files -f .mfiles
7a781e
%doc documentation/* README.md
7a781e
%license LICENSE
7a781e
7a781e
%files javadoc -f .mfiles-javadoc
7a781e
%license LICENSE
7a781e
7a781e
%changelog
ceeb78
* Fri Jun 26 2020 Michal Schorm <mschorm@redhat.com> - 2.2.5-3
ceeb78
- Fix requirement on MariaDB
ceeb78
  Resolves: #1797057
ceeb78
7a781e
* Thu Jun 14 2018 Jakub Janco <jjanco@redhat.com> - 2.2.5-1
7a781e
- update version
7a781e
7a781e
* Mon May 28 2018 Michael Simacek <msimacek@redhat.com> - 2.2.3-2
7a781e
- Remove BR on maven-javadoc-plugin
7a781e
7a781e
* Tue Mar 13 2018 Jakub Janco <jjanco@redhat.com> - 2.2.3-1
7a781e
- update version
7a781e
7a781e
* Mon Feb 26 2018 Jakub Janco <jjanco@redhat.com> - 2.2.2-1
7a781e
- update version
7a781e
7a781e
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
7a781e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7a781e
7a781e
* Wed Jan 03 2018 Jakub Janco <jjanco@redhat.com> - 2.2.1-1
7a781e
- Update to 2.2.1
7a781e
7a781e
* Tue Nov 21 2017 Jakub Janco <jjanco@redhat.com> - 2.2.0-1
7a781e
- Update to 2.2.0
7a781e
7a781e
* Tue Aug 29 2017 Tomas Repik <trepik@redhat.com> - 2.1.0-1
7a781e
- Update to 2.1.0
7a781e
7a781e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
7a781e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7a781e
7a781e
* Mon Jun 26 2017 Tomas Repik <trepik@redhat.com> - 2.0.2-1
7a781e
- version update
7a781e
7a781e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-2
7a781e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7a781e
7a781e
* Mon Nov 28 2016 Tomas Repik <trepik@redhat.com> - 1.5.5-1
7a781e
- version update
7a781e
7a781e
* Mon Oct 03 2016 Tomas Repik <trepik@redhat.com> - 1.5.3-1
7a781e
- version update
7a781e
7a781e
* Wed Sep 14 2016 Tomas Repik <trepik@redhat.com> - 1.5.2-1
7a781e
- version update
7a781e
7a781e
* Tue Jun 21 2016 Tomas Repik <trepik@redhat.com> - 1.4.6-1
7a781e
- version update
7a781e
7a781e
* Mon Apr 18 2016 Tomas Repik <trepik@redhat.com> - 1.4.2-1
7a781e
- version update
7a781e
7a781e
* Wed Mar 23 2016 Tomas Repik <trepik@redhat.com> - 1.3.7-1
7a781e
- version update
7a781e
- BSD license added
7a781e
- cosmetic updates in prep phase
7a781e
7a781e
* Thu Mar 10 2016 Tomas Repik <trepik@redhat.com> - 1.3.6-1
7a781e
- version update
7a781e
7a781e
* Mon Feb 15 2016 Tomas Repik <trepik@redhat.com> - 1.3.5-1
7a781e
- version update
7a781e
7a781e
* Wed Jan 20 2016 Tomáš Repík <trepik@redhat.com> - 1.3.3-3
7a781e
- generating OSGi manifest file with maven-bundle-plugin
7a781e
7a781e
* Wed Dec 16 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-2
7a781e
- installing LICENSE added
7a781e
- conversion from dos to unix line encoding revised
7a781e
- unnecessary tasks removed
7a781e
7a781e
* Wed Dec  9 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-1
7a781e
- Initial package