Blame SPECS/mariadb-java-client.spec

fbd856
%{?scl:%scl_package mariadb-java-client}
fbd856
%{!?scl:%global pkg_name %{name}}
fbd856
fbd856
Name:		%{?scl_prefix}mariadb-java-client
fbd856
Version:	2.7.1
fbd856
Release:	1%{?dist}
fbd856
Summary:	Connects applications developed in Java to MariaDB and MySQL databases
fbd856
# added BSD license because of https://bugzilla.redhat.com/show_bug.cgi?id=1291558#c13
fbd856
License:	BSD and LGPLv2+
fbd856
URL:		https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/
fbd856
Source0:	https://github.com/MariaDB/mariadb-connector-j/archive/%{version}.tar.gz
fbd856
Source1:        artifact-jna.xml
fbd856
fbd856
# optional dependency not in Fedora
fbd856
Patch0:		remove_waffle-jna.patch
fbd856
Patch1:         remove-NamedPipeSocket.patch
fbd856
fbd856
BuildArch:	noarch
fbd856
BuildRequires:	%{?scl_prefix_maven}maven-local
fbd856
BuildRequires:	%{?scl_prefix_maven}mvn(com.google.code.maven-replacer-plugin:replacer)
fbd856
BuildRequires:	%{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin)
fbd856
BuildRequires:	%{?scl_prefix_maven}mvn(org.codehaus.mojo:build-helper-maven-plugin)
fbd856
BuildRequires:	%{?scl_prefix_maven}mvn(junit:junit)
fbd856
BuildRequires:	%{?scl_prefix_maven}mvn(org.slf4j:slf4j-api)
fbd856
BuildRequires:  %{?scl_prefix_maven}mvn(org.osgi:osgi.cmpn)
fbd856
BuildRequires:  %{?scl_prefix_maven}mvn(org.osgi:osgi.core)
fbd856
BuildRequires:	%{?scl_prefix}jna
fbd856
# jna-platform is not found by mvn macro
fbd856
#BuildRequires:	mvn(net.java.dev.jna:jna-platform)
fbd856
BuildRequires:	%{?scl_prefix}jna-contrib
fbd856
# since version 1.5.2 missing optional dependency (windows)
fbd856
#BuildRequires:	mvn(com.github.dblock.waffle:waffle-jna)
fbd856
fbd856
#Requires:	mariadb
fbd856
fbd856
%description
fbd856
MariaDB Connector/J is a Type 4 JDBC driver, also known as the Direct to
fbd856
Database Pure Java Driver. It was developed specifically as a lightweight
fbd856
JDBC connector for use with MySQL and MariaDB database servers.
fbd856
fbd856
%package javadoc
fbd856
Summary:	Javadoc for %{name}
fbd856
fbd856
%description javadoc
fbd856
This package contains the API documentation for %{name}.
fbd856
fbd856
%prep
fbd856
%setup -qn mariadb-connector-j-%{version}
fbd856
fbd856
# convert files from dos to unix line encoding
fbd856
for file in README.md documentation/*.creole; do
fbd856
 sed -i.orig 's|\r||g' $file
fbd856
 touch -r $file.orig $file
fbd856
 rm $file.orig
fbd856
done
fbd856
fbd856
# remove missing optional dependency waffle-jna
fbd856
%pom_remove_dep com.github.waffle:waffle-jna
fbd856
#%pom_remove_dep com.zaxxer:HikariCP
fbd856
%pom_remove_dep ch.qos.logback:logback-classic
fbd856
%pom_remove_dep junit:junit
fbd856
%pom_remove_dep com.amazonaws:aws-java-sdk-rds
fbd856
fbd856
# use latest OSGi implementation
fbd856
%pom_change_dep -r :org.osgi.core org.osgi:osgi.core
fbd856
%pom_change_dep -r :org.osgi.compendium org.osgi:osgi.cmpn
fbd856
fbd856
rm -r src/main/java/org/mariadb/jdbc/credential/aws
fbd856
fbd856
sed -i 's|org.osgi.compendium|osgi.cmpn|' pom.xml
fbd856
# also remove the file using the removed plugin
fbd856
rm -f src/main/java/org/mariadb/jdbc/internal/com/send/authentication/gssapi/WindowsNativeSspiAuthentication.java
fbd856
# patch the sources so that the missing file is not making trouble
fbd856
%patch0 -p1 -b .patch0
fbd856
# not required since we have sclized recent jna package
fbd856
#%%patch1 -p1
fbd856
fbd856
%mvn_file org.mariadb.jdbc:%{name} %{name}
fbd856
%mvn_alias org.mariadb.jdbc:%{name} mariadb:mariadb-connector-java
fbd856
fbd856
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
fbd856
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
fbd856
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
fbd856
%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin
fbd856
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
fbd856
%pom_remove_plugin com.coveo:fmt-maven-plugin
fbd856
fbd856
# remove preconfigured OSGi manifest file and generate OSGi manifest file
fbd856
# with maven-bundle-plugin instead of using maven-jar-plugin
fbd856
rm src/main/resources/META-INF/MANIFEST.MF
fbd856
%pom_xpath_set "pom:packaging" bundle
fbd856
%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'
fbd856
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestEntries"
fbd856
fbd856
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . '
fbd856
<extensions>true</extensions>
fbd856
<configuration>
fbd856
  <instructions>
fbd856
    <Bundle-SymbolicName>${project.groupId}</Bundle-SymbolicName>
fbd856
    <Bundle-Name>MariaDB JDBC Client</Bundle-Name>
fbd856
    <Bundle-Version>${project.version}.0</Bundle-Version>
fbd856
    <Export-Package>org.mariadb.jdbc.*</Export-Package>
fbd856
    <Import-Package>
fbd856
      !com.sun.jna.*,
fbd856
      javax.net;resolution:=optional,
fbd856
      javax.net.ssl;resolution:=optional,
fbd856
      javax.sql;resolution:=optional,
fbd856
      javax.transaction.xa;resolution:=optional
fbd856
    </Import-Package>
fbd856
  </instructions>
fbd856
</configuration>
fbd856
<executions>
fbd856
  <execution>
fbd856
    <id>bundle-manifest</id>
fbd856
    <phase>process-classes</phase>
fbd856
    <goals>
fbd856
      <goal>manifest</goal>
fbd856
    </goals>
fbd856
  </execution>
fbd856
</executions>'
fbd856
# not required since we have sclized recent jna package
fbd856
#%%mvn_config resolverSettings/metadataRepositories/repository %{SOURCE1}
fbd856
fbd856
%build
fbd856
# tests are skipped, while they require running application server
fbd856
%mvn_build -f
fbd856
fbd856
%install
fbd856
%mvn_install
fbd856
fbd856
%files -f .mfiles
fbd856
%doc documentation/* README.md
fbd856
%license LICENSE
fbd856
fbd856
%files javadoc -f .mfiles-javadoc
fbd856
%license LICENSE
fbd856
fbd856
%changelog
fbd856
* Thu Dec 10 2020 Honza Horak <hhorak@redhat.com> - 2.7.1-1
fbd856
- Rebase to 2.7.1
fbd856
fbd856
* Tue May 21 2019 Jakub Janco <jjanco@redhat.com> - 2.4.1-2
fbd856
- Rebuild against java fixed meta pkg
fbd856
fbd856
* Fri Apr 05 2019 Jakub Janco <jjanco@redhat.com> - 2.4.1-1
fbd856
- new version
fbd856
fbd856
* Fri Feb 22 2019 Jakub Janco <jjanco@redhat.com> - 2.4.0-1
fbd856
- new version
fbd856
fbd856
* Tue Jan 08 2019 Honza Horak <hhorak@redhat.com> - 2.3.0-2
fbd856
- Rebuild for buildroot change
fbd856
fbd856
* Tue Dec 18 2018 Jakub Janco <jjanco@redhat.com> - 2.3.0-1
fbd856
- new version
fbd856
fbd856
* Tue Dec 18 2018 Jakub Janco <jjanco@redhat.com> - 2.2.6-2
fbd856
- add missing build dependencies
fbd856
fbd856
* Fri Aug 10 2018 Jakub Janco <jjanco@redhat.com> - 2.2.6-1
fbd856
- new version and SCL-izing spec
fbd856
fbd856
* Thu Jun 14 2018 Jakub Janco <jjanco@redhat.com> - 2.2.5-1
fbd856
- update version
fbd856
fbd856
* Mon May 28 2018 Michael Simacek <msimacek@redhat.com> - 2.2.3-2
fbd856
- Remove BR on maven-javadoc-plugin
fbd856
fbd856
* Tue Mar 13 2018 Jakub Janco <jjanco@redhat.com> - 2.2.3-1
fbd856
- update version
fbd856
fbd856
* Mon Feb 26 2018 Jakub Janco <jjanco@redhat.com> - 2.2.2-1
fbd856
- update version
fbd856
fbd856
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
fbd856
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fbd856
fbd856
* Wed Jan 03 2018 Jakub Janco <jjanco@redhat.com> - 2.2.1-1
fbd856
- Update to 2.2.1
fbd856
fbd856
* Tue Nov 21 2017 Jakub Janco <jjanco@redhat.com> - 2.2.0-1
fbd856
- Update to 2.2.0
fbd856
fbd856
* Tue Aug 29 2017 Tomas Repik <trepik@redhat.com> - 2.1.0-1
fbd856
- Update to 2.1.0
fbd856
fbd856
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-2
fbd856
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
fbd856
fbd856
* Mon Jun 26 2017 Tomas Repik <trepik@redhat.com> - 2.0.2-1
fbd856
- version update
fbd856
fbd856
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-2
fbd856
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fbd856
fbd856
* Mon Nov 28 2016 Tomas Repik <trepik@redhat.com> - 1.5.5-1
fbd856
- version update
fbd856
fbd856
* Mon Oct 03 2016 Tomas Repik <trepik@redhat.com> - 1.5.3-1
fbd856
- version update
fbd856
fbd856
* Wed Sep 14 2016 Tomas Repik <trepik@redhat.com> - 1.5.2-1
fbd856
- version update
fbd856
fbd856
* Tue Jun 21 2016 Tomas Repik <trepik@redhat.com> - 1.4.6-1
fbd856
- version update
fbd856
fbd856
* Mon Apr 18 2016 Tomas Repik <trepik@redhat.com> - 1.4.2-1
fbd856
- version update
fbd856
fbd856
* Wed Mar 23 2016 Tomas Repik <trepik@redhat.com> - 1.3.7-1
fbd856
- version update
fbd856
- BSD license added
fbd856
- cosmetic updates in prep phase
fbd856
fbd856
* Thu Mar 10 2016 Tomas Repik <trepik@redhat.com> - 1.3.6-1
fbd856
- version update
fbd856
fbd856
* Mon Feb 15 2016 Tomas Repik <trepik@redhat.com> - 1.3.5-1
fbd856
- version update
fbd856
fbd856
* Wed Jan 20 2016 Tomáš Repík <trepik@redhat.com> - 1.3.3-3
fbd856
- generating OSGi manifest file with maven-bundle-plugin
fbd856
fbd856
* Wed Dec 16 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-2
fbd856
- installing LICENSE added
fbd856
- conversion from dos to unix line encoding revised
fbd856
- unnecessary tasks removed
fbd856
fbd856
* Wed Dec  9 2015 Tomáš Repík <trepik@redhat.com> - 1.3.3-1
fbd856
- Initial package