Blame SPECS/tiger-types.spec

4909a9
%{?scl:%scl_package tiger-types}
4909a9
%{!?scl:%global pkg_name %{name}}
4909a9
%{?java_common_find_provides_and_requires}
4909a9
4909a9
Name:          %{?scl_prefix}tiger-types
4909a9
Version:       1.4
4909a9
Release:       8.1%{?dist}
4909a9
Summary:       Type arithmetic library for Java5
4909a9
License:       CDDL or GPLv2 with exceptions
4909a9
Url:           http://java.net/projects/tiger-types
4909a9
# svn export https://svn.java.net/svn/tiger-types~svn/tags/tiger-types-1.4
4909a9
# tar czf tiger-types-1.4-src-svn.tar.gz tiger-types-1.4
4909a9
Source0:       %{pkg_name}-%{version}-src-svn.tar.gz
4909a9
# wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt
4909a9
# tiger-types package don't include the license file
4909a9
Source1:       glassfish-LICENSE.txt
4909a9
4909a9
BuildRequires:  %{?scl_prefix_java_common}maven-local
4909a9
BuildRequires:  %{?scl_prefix_java_common}mvn(junit:junit)
4909a9
BuildRequires:  %{?scl_prefix_maven}mvn(net.java:jvnet-parent:pom:)
4909a9
BuildRequires:  %{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin)
4909a9
4909a9
BuildArch:     noarch
4909a9
4909a9
%description
4909a9
Tiger-types is a type arithmetic library for Java5.
4909a9
4909a9
%package javadoc
4909a9
Summary:       Javadoc for %{pkg_name}
4909a9
4909a9
%description javadoc
4909a9
This package contains javadoc for %{pkg_name}.
4909a9
4909a9
%prep
4909a9
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
4909a9
%setup -n %{pkg_name}-%{version} -q
4909a9
# add OSGi support required by glassfish hk2
4909a9
%pom_add_plugin org.apache.felix:maven-bundle-plugin . '
4909a9
<configuration>
4909a9
  <instructions>
4909a9
      <Embed-Dependency>*;scope=provided;inline=true</Embed-Dependency>
4909a9
      <Export-Package>org.jvnet.tiger_types.*</Export-Package>
4909a9
  </instructions>
4909a9
  <unpackBundle>true</unpackBundle>
4909a9
</configuration>
4909a9
<executions>
4909a9
  <execution>
4909a9
      <id>osgi-bundle</id>
4909a9
      <phase>package</phase>
4909a9
      <goals>
4909a9
          <goal>bundle</goal>
4909a9
      </goals>
4909a9
  </execution>
4909a9
</executions>'
4909a9
# removed some warning
4909a9
%pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId ='maven-compiler-plugin']" "
4909a9
  <groupId>org.apache.maven.plugins</groupId>
4909a9
  <version>any</version>"
4909a9
%pom_xpath_inject "pom:reporting/pom:plugins/pom:plugin[pom:artifactId ='maven-javadoc-plugin']" "
4909a9
  <groupId>org.apache.maven.plugins</groupId>
4909a9
  <version>any</version>"
4909a9
4909a9
# Unneeded
4909a9
%pom_remove_plugin :maven-idea-plugin
4909a9
%pom_remove_plugin :maven-release-plugin
4909a9
4909a9
%mvn_file :%{pkg_name} %{pkg_name}
4909a9
4909a9
cp -p %{SOURCE1} LICENSE.txt
4909a9
sed -i 's/\r//' LICENSE.txt
4909a9
%{?scl:EOF}
4909a9
4909a9
4909a9
%build
4909a9
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
4909a9
4909a9
%mvn_build
4909a9
%{?scl:EOF}
4909a9
4909a9
4909a9
%install
4909a9
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
4909a9
%mvn_install
4909a9
%{?scl:EOF}
4909a9
4909a9
4909a9
%files -f .mfiles
4909a9
%doc LICENSE.txt
4909a9
4909a9
%files javadoc -f .mfiles-javadoc
4909a9
%doc LICENSE.txt
4909a9
4909a9
%changelog
4909a9
* Tue Jun 30 2015 Mat Booth <mat.booth@redhat.com> - 1.4-8.1
4909a9
- Import latest from Fedora
4909a9
4909a9
* Tue Jun 30 2015 Michal Srb <msrb@redhat.com> - 1.4-8
4909a9
- Fix BR/R
4909a9
4909a9
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-7
4909a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4909a9
4909a9
* Thu Feb 12 2015 gil cattaneo <puntogil@libero.it> 1.4-6
4909a9
- introduce license macro
4909a9
4909a9
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
4909a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4909a9
4909a9
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.4-4
4909a9
- Use Requires: java-headless rebuild (#1067528)
4909a9
4909a9
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
4909a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4909a9
4909a9
* Mon Jul 01 2013 gil cattaneo <puntogil@libero.it> 1.4-2
4909a9
- switch to XMvn, minor changes to adapt to current guideline
4909a9
4909a9
* Sat Aug 25 2012 gil cattaneo <puntogil@libero.it> 1.4-1
4909a9
- initial rpm