This commit is contained in:
parent
1afb489a09
commit
c5187a5205
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 07:20:13 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build the jar file as an eclipse bundle
|
||||
- Build and package the javadoc again
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 25 17:24:33 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
37
jzlib.spec
37
jzlib.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package jzlib
|
||||
#
|
||||
# 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
|
||||
@ -22,14 +22,13 @@ Release: 0
|
||||
Summary: Re-implementation of zlib in pure Java
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
Url: http://www.jcraft.com/jzlib/
|
||||
URL: http://www.jcraft.com/jzlib/
|
||||
Source0: https://github.com/ymnk/jzlib/archive/%{version}.tar.gz
|
||||
Source1: %{name}_build.xml
|
||||
BuildRequires: ant >= 1.6
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-local
|
||||
Obsoletes: %{name}-javadoc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -46,6 +45,13 @@ Group: Development/Libraries/Java
|
||||
%description demo
|
||||
Demo files for %{summary}.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
cp %{SOURCE1} build.xml
|
||||
@ -55,13 +61,11 @@ cp %{SOURCE1} build.xml
|
||||
rm misc/mindtermsrc-v121-compression.patch
|
||||
|
||||
%build
|
||||
ant \
|
||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
||||
dist
|
||||
%{ant} jar javadoc
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -Dpm 644 dist/lib/%{name}.jar \
|
||||
install -Dpm 644 target/%{name}-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
|
||||
# pom
|
||||
@ -72,16 +76,23 @@ install -Dpm 644 pom.xml \
|
||||
# examples
|
||||
install -dm 755 %{buildroot}%{_datadir}/%{name}-%{version}
|
||||
cp -pr example/* %{buildroot}%{_datadir}/%{name}-%{version}
|
||||
%fdupes -s %{buildroot}%{_datadir}/%{name}-%{version}
|
||||
|
||||
%files
|
||||
# javadoc
|
||||
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -r target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
%files -f .mfiles
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_mavenpomdir}/%{name}.pom
|
||||
%{_datadir}/maven-metadata/%{name}.xml
|
||||
%doc LICENSE.txt
|
||||
%license LICENSE.txt
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_datadir}/%{name}-%{version}
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%license LICENSE.txt
|
||||
|
||||
%changelog
|
||||
|
144
jzlib_build.xml
144
jzlib_build.xml
@ -1,51 +1,113 @@
|
||||
<project name="Jzlib" default="dist" basedir=".">
|
||||
<description>
|
||||
JZlib is a re-implementation of zlib in pure Java.
|
||||
The first and final aim for hacking this stuff is
|
||||
to add the packet compression support to pure Java SSH systems.
|
||||
</description>
|
||||
<!-- set global properties for this build -->
|
||||
<property name="src" location="src/main/java"/>
|
||||
<property name="build" location="build"/>
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="javadoc" location="javadoc"/>
|
||||
<property name="javac.debug" value="false"/>
|
||||
<path id="project.cp">
|
||||
<pathelement location="${build}"/>
|
||||
</path>
|
||||
<target name="init">
|
||||
<!-- Create the build directory structure used by compile -->
|
||||
<mkdir dir="${build}"/>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="jzlib" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="project.groupId" value="com.jcraft"/>
|
||||
<property name="project.artifactId" value="jzlib"/>
|
||||
<property name="project.version" value="1.1.3"/>
|
||||
|
||||
<property name="compiler.source" value="1.6"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac srcdir="${src}" destdir="${build}" debug="${javac.debug}">
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="true"
|
||||
deprecation="true"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
</javac>
|
||||
</target>
|
||||
<target name="dist" depends="compile"
|
||||
description="generate the distribution" >
|
||||
<!-- Create the distribution directory -->
|
||||
<mkdir dir="${dist}/lib"/>
|
||||
|
||||
<!-- Put everything in ${build} into the jar file -->
|
||||
<jar jarfile="${dist}/lib/jzlib.jar" basedir="${build}"/>
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
verbose="false"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
source="${compiler.source}"
|
||||
linksource="false"
|
||||
breakiterator="false"/>
|
||||
</target>
|
||||
|
||||
<target name="clean"
|
||||
description="clean up" >
|
||||
<!-- Delete the ${build} and ${dist} directory trees -->
|
||||
<delete dir="${build}"/>
|
||||
<delete dir="${dist}"/>
|
||||
<delete dir="${javadoc}"/>
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
basedir="${build.outputDir}"
|
||||
excludes="**/package.html">
|
||||
<manifest>
|
||||
<attribute name="Bundle-Description" value="JZlib is a re-implementation of zlib in pure Java"/>
|
||||
<attribute name="Bundle-DocURL" value="http://www.jcraft.com/"/>
|
||||
<attribute name="Bundle-License" value="http://www.jcraft.com/jzlib/LICENSE.txt"/>
|
||||
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
<attribute name="Bundle-Name" value="JZlib"/>
|
||||
<attribute name="Bundle-SymbolicName" value="com.jcraft.jzlib"/>
|
||||
<attribute name="Bundle-Vendor" value="jcraft"/>
|
||||
<attribute name="Bundle-Version" value="${project.version}"/>
|
||||
<attribute name="Export-Package" value="com.jcraft.jzlib;version="${project.version}""/>
|
||||
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
|
||||
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
|
||||
<attribute name="JavaPackages-Version" value="${project.version}"/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="javadoc">
|
||||
<javadoc sourcepath="${src}"
|
||||
destdir="${javadoc}"
|
||||
>
|
||||
<packageset dir="${src}"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
<!-- ====================================================================== -->
|
||||
<!-- A dummy target for the package named after the type it creates -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user