forked from pool/jzlib
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>
|
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
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -22,14 +22,13 @@ Release: 0
|
|||||||
Summary: Re-implementation of zlib in pure Java
|
Summary: Re-implementation of zlib in pure Java
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/Java
|
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
|
Source0: https://github.com/ymnk/jzlib/archive/%{version}.tar.gz
|
||||||
Source1: %{name}_build.xml
|
Source1: %{name}_build.xml
|
||||||
BuildRequires: ant >= 1.6
|
BuildRequires: ant >= 1.6
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
Obsoletes: %{name}-javadoc
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -46,6 +45,13 @@ Group: Development/Libraries/Java
|
|||||||
%description demo
|
%description demo
|
||||||
Demo files for %{summary}.
|
Demo files for %{summary}.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: API documentation for %{name}
|
||||||
|
Group: Documentation/HTML
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
@ -55,13 +61,11 @@ cp %{SOURCE1} build.xml
|
|||||||
rm misc/mindtermsrc-v121-compression.patch
|
rm misc/mindtermsrc-v121-compression.patch
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ant \
|
%{ant} jar javadoc
|
||||||
-Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \
|
|
||||||
dist
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jar
|
# jar
|
||||||
install -Dpm 644 dist/lib/%{name}.jar \
|
install -Dpm 644 target/%{name}-%{version}.jar \
|
||||||
%{buildroot}%{_javadir}/%{name}.jar
|
%{buildroot}%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
# pom
|
# pom
|
||||||
@ -72,16 +76,23 @@ install -Dpm 644 pom.xml \
|
|||||||
# examples
|
# examples
|
||||||
install -dm 755 %{buildroot}%{_datadir}/%{name}-%{version}
|
install -dm 755 %{buildroot}%{_datadir}/%{name}-%{version}
|
||||||
cp -pr example/* %{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)
|
%defattr(0644,root,root,0755)
|
||||||
%{_javadir}/%{name}.jar
|
%license LICENSE.txt
|
||||||
%{_mavenpomdir}/%{name}.pom
|
|
||||||
%{_datadir}/maven-metadata/%{name}.xml
|
|
||||||
%doc LICENSE.txt
|
|
||||||
|
|
||||||
%files demo
|
%files demo
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc %{_datadir}/%{name}-%{version}
|
%doc %{_datadir}/%{name}-%{version}
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
%license LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
144
jzlib_build.xml
144
jzlib_build.xml
@ -1,51 +1,113 @@
|
|||||||
<project name="Jzlib" default="dist" basedir=".">
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<description>
|
|
||||||
JZlib is a re-implementation of zlib in pure Java.
|
<project name="jzlib" default="package" basedir=".">
|
||||||
The first and final aim for hacking this stuff is
|
|
||||||
to add the packet compression support to pure Java SSH systems.
|
<!-- ====================================================================== -->
|
||||||
</description>
|
<!-- Build environment properties -->
|
||||||
<!-- set global properties for this build -->
|
<!-- ====================================================================== -->
|
||||||
<property name="src" location="src/main/java"/>
|
|
||||||
<property name="build" location="build"/>
|
<property file="build.properties"/>
|
||||||
<property name="dist" location="dist"/>
|
|
||||||
<property name="javadoc" location="javadoc"/>
|
<property name="project.groupId" value="com.jcraft"/>
|
||||||
<property name="javac.debug" value="false"/>
|
<property name="project.artifactId" value="jzlib"/>
|
||||||
<path id="project.cp">
|
<property name="project.version" value="1.1.3"/>
|
||||||
<pathelement location="${build}"/>
|
|
||||||
</path>
|
<property name="compiler.source" value="1.6"/>
|
||||||
<target name="init">
|
<property name="compiler.target" value="${compiler.source}"/>
|
||||||
<!-- Create the build directory structure used by compile -->
|
|
||||||
<mkdir dir="${build}"/>
|
<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>
|
||||||
|
|
||||||
<target name="compile" depends="init"
|
<!-- ====================================================================== -->
|
||||||
description="compile the source " >
|
<!-- Compilation target -->
|
||||||
<!-- Compile the java code from ${src} into ${build} -->
|
<!-- ====================================================================== -->
|
||||||
<javac srcdir="${src}" destdir="${build}" debug="${javac.debug}">
|
|
||||||
|
<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>
|
</javac>
|
||||||
</target>
|
</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>
|
||||||
|
|
||||||
<target name="clean"
|
<!-- ====================================================================== -->
|
||||||
description="clean up" >
|
<!-- Package target -->
|
||||||
<!-- Delete the ${build} and ${dist} directory trees -->
|
<!-- ====================================================================== -->
|
||||||
<delete dir="${build}"/>
|
|
||||||
<delete dir="${dist}"/>
|
<target name="package" depends="compile" description="Package the application">
|
||||||
<delete dir="${javadoc}"/>
|
<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>
|
||||||
|
|
||||||
<target name="javadoc">
|
<!-- ====================================================================== -->
|
||||||
<javadoc sourcepath="${src}"
|
<!-- A dummy target for the package named after the type it creates -->
|
||||||
destdir="${javadoc}"
|
<!-- ====================================================================== -->
|
||||||
>
|
|
||||||
<packageset dir="${src}"/>
|
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||||
</javadoc>
|
|
||||||
</target>
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user