From 706d7d2d57e502d9b7f62c1104aee9ac0dba3fdb2e37052a7e4e578ef3ce2e7c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 27 Jan 2019 20:44:14 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/beust-jcommander?expand=0&rev=5 --- beust-jcommander-build.xml | 119 +++++++++++++++++++++++++++++++++++++ beust-jcommander.spec | 38 +++++------- 2 files changed, 133 insertions(+), 24 deletions(-) create mode 100644 beust-jcommander-build.xml diff --git a/beust-jcommander-build.xml b/beust-jcommander-build.xml new file mode 100644 index 0000000..cba22fd --- /dev/null +++ b/beust-jcommander-build.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/beust-jcommander.spec b/beust-jcommander.spec index 037a8d4..cf57c66 100644 --- a/beust-jcommander.spec +++ b/beust-jcommander.spec @@ -1,7 +1,7 @@ # # spec file for package beust-jcommander # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -28,9 +28,11 @@ URL: http://jcommander.org/ Source0: %{name}-%{version}.tar.gz # Adapted from earlier version that still shipped poms. It uses kobalt for building now Source1: %{name}.pom +Source2: %{name}-build.xml # Cleaned up bundled jars hose licensing cannot be easily verified -Source2: generate-tarball.sh +Source3: generate-tarball.sh Patch0: 0001-ParseValues-NullPointerException-patch.patch +BuildRequires: ant BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local @@ -57,44 +59,32 @@ This package contains the %{summary}. chmod -x license.txt cp -p %{SOURCE1} pom.xml -sed -i 's/@VERSION@/%{version}/g' pom.xml +cp -p %{SOURCE2} build.xml +sed -i 's/@VERSION@/%{version}/g' pom.xml build.xml + %build -mkdir -p build/classes -mkdir -p build/javadoc -javac -d build/classes -source 8 -target 8 $(find src/main/java -name *.java | xargs) -javadoc -d build/javadoc -notimestamp -source 8 $(find src/main/java -name *.java | xargs) -jar cf %{name}-%{version}.jar -C build/classes . +%{ant} jar javadoc %install # jars install -d -m 0755 %{buildroot}%{_javadir} -install -m 644 %{name}-%{version}.jar \ - %{buildroot}%{_javadir}/%{name}-%{version}.jar -(cd %{buildroot}%{_javadir} && ln -s %{name}-%{version}.jar %{name}.jar) -(cd %{buildroot}%{_javadir} && ln -s %{name}-%{version}.jar %{short_name}-%{version}.jar) -(cd %{buildroot}%{_javadir} && ln -s %{short_name}-%{version}.jar %{short_name}.jar) +install -m 644 target/%{short_name}-%{version}.jar \ + %{buildroot}%{_javadir}/%{name}.jar # pom install -d -m 755 %{buildroot}%{_mavenpomdir} -install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom -%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom +%add_maven_depmap %{name}.pom %{name}.jar # javadoc install -dm 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}/ +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ %fdupes -s %{buildroot}%{_javadocdir}/%{name}/ -%files +%files -f .mfiles %license license.txt %doc notice.md README.markdown -%{_javadir}/* -%{_mavenpomdir}/* -%if %{defined _maven_repository} -%{_mavendepmapfragdir}/%{name} -%else -%{_datadir}/maven-metadata/%{name}.xml* -%endif %files javadoc %license license.txt