6
0
forked from pool/cpptasks

Accepting request 526942 from Java:packages

Fix build with jdk9

OBS-URL: https://build.opensuse.org/request/show/526942
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cpptasks?expand=0&rev=3
This commit is contained in:
2017-09-20 15:08:18 +00:00
committed by Git OBS Bridge
2 changed files with 15 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Sep 18 06:44:19 UTC 2017 - fstrba@suse.com
- Specify java source and target version 1.6 in order to allow
building with jdk9
- Fix rpmlint errors
- Clean spec file
-------------------------------------------------------------------
Fri Sep 14 17:53:00 UTC 2012 - dmitry_r@opensuse.org

View File

@@ -1,7 +1,7 @@
#
# spec file for package cpptasks
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,17 +24,14 @@ License: Apache-2.0
Group: Development/Libraries/Java
Url: http://ant-contrib.sourceforge.net/
Source0: http://downloads.sourceforge.net/ant-contrib/%{name}-%{version}.tar.gz
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: jpackage-utils
BuildRequires: junit
Requires: ant
Requires: java
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This ant task can compile various source languages and produce
@@ -50,13 +47,15 @@ Group: Documentation/Other
Javadoc documentation for %{summary}.
%prep
%setup -q -n %{name}-%{version}
%setup -q
find . -name '*.jar' -type f -delete -print
%build
export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=""
%ant jars javadocs
%{ant} \
-Djavac.source=1.6 -Djavac.target=1.6 \
jars javadocs
%install
# jars
@@ -65,14 +64,13 @@ ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr target/javadocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink
%files
%defattr(-,root,root,-)
%{_javadir}/*.jar
%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}