diff --git a/dnsjava-2.0.6-java1.5.target.patch b/dnsjava-2.0.6-java1.5.target.patch new file mode 100644 index 0000000..7b803e9 --- /dev/null +++ b/dnsjava-2.0.6-java1.5.target.patch @@ -0,0 +1,70 @@ +--- build.xml.java1.5 2011-10-24 22:10:29.000000000 +0100 ++++ build.xml 2016-09-15 14:52:27.047032691 +0100 +@@ -17,14 +17,14 @@ + + + +- ++ + + + + + + +- ++ + + + +@@ -35,6 +35,7 @@ + basedir="${build_dir}" includes="**/*.class **/*.properties"> + + ++ + + + +@@ -46,21 +47,18 @@ + + + +- +- ++ + + Bundle-Version: ${version} + Bundle-Name: dnsjava is an implementation of DNS in Java + Bundle-SymbolicName: org.xbill.dns + Export-Package: org.xbill.DNS;version=${version},org.xbill.DNS.spi;version=${version},org.xbill.DNS.utils;version=${version},org.xbill.DNS.windows;version=${version} + Bundle-Vendor: dnsjava.org +- Bundle-RequiredExecutionEnvironment: J2SE-1.4 ++ Bundle-RequiredExecutionEnvironment: J2SE-1.5 + Import-Package: !org.xbill.DNS*,!sun.*,* + + + +@@ -77,7 +75,7 @@ + ++ windowtitle="dnsjava documentation" additionalparam="-Xdoclint:none"> + + + +@@ -107,7 +105,7 @@ + + + +- ++ + + + diff --git a/dnsjava-2.1.3.pom b/dnsjava-2.1.3.pom new file mode 100644 index 0000000..46be5b1 --- /dev/null +++ b/dnsjava-2.1.3.pom @@ -0,0 +1,6 @@ + + 4.0.0 + dnsjava + dnsjava + 2.1.3 + diff --git a/dnsjava-2.1.3.tar.gz b/dnsjava-2.1.3.tar.gz new file mode 100644 index 0000000..4355ef0 Binary files /dev/null and b/dnsjava-2.1.3.tar.gz differ diff --git a/dnsjava.spec b/dnsjava.spec new file mode 100644 index 0000000..c378f07 --- /dev/null +++ b/dnsjava.spec @@ -0,0 +1,71 @@ +%global do_not_test 1 +Name: dnsjava +Version: 2.1.3 +Release: 1 +Summary: Java DNS implementation +License: BSD and MIT +URL: http://www.dnsjava.org/ +Source0: https://sourceforge.net/projects/dnsjava/files/dnsjava/2.1.3/%{name}-%{version}.tar.gz +Source1: %{name}-%{version}.pom +Patch0: dnsjava-2.0.6-java1.5.target.patch +BuildRequires: ant aqute-bnd javapackages-local ant-junit +BuildArch: noarch +%description +dnsjava is an implementation of DNS in Java. It supports all of the common +record types and the DNSSEC types. It can be used for queries, zone transfers, +and dynamic updates. It includes a cache which can be used by clients, and a +minimal implementation of a server. It supports TSIG authenticated messages, +partial DNSSEC verification, and EDNS0. +dnsjava provides functionality above and beyond that of the InetAddress class. +Since it is written in pure Java, dnsjava is fully threadable, and in many +cases is faster than using InetAddress. +dnsjava provides both high and low level access to DNS. The high level +functions perform queries for records of a given name, type, and class, and +return an array of records. There is also a clone of InetAddress, which is +even simpler. A cache is used to reduce the number of DNS queries sent. The +low level functions allow direct manipulation of dns messages and records, as +well as allowing additional resolver properties to be set. +A 'dig' clone and a dynamic update program are included, as well as a +primary-only server. + +%package javadoc +Summary: Javadoc for %{name} +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q +rm -rf doc/ +find -name "*.class" -print -delete +find -name "*.jar" -print -delete +%patch0 -p0 -b .java1.5 +iconv -f iso8859-1 -t utf8 Changelog > Changelog.tmp +touch -r Changelog Changelog.tmp +mv -f Changelog.tmp Changelog +%mvn_file %{name}:%{name} %{name} + +%build +export CLASSPATH=%(build-classpath jce aqute-bnd) +ant -Dj2se.javadoc=%{_javadocdir}/java clean docsclean bundle docs +%mvn_artifact %{SOURCE1} org.xbill.dns_%{version}.jar + +%install +%mvn_install -J doc +%if ! 0%{?do_not_test} + +%check +export CLASSPATH='%(build-classpath junit):%{name}-%{version}.jar' +ant -Dj2se.javadoc=%{_javadocdir}/java compile_tests +ant -Dj2se.javadoc=%{_javadocdir}/java run_tests +%endif + +%files -f .mfiles +%license LICENSE +%doc Changelog README USAGE examples.html *.java + +%files javadoc -f .mfiles-javadoc +%license LICENSE + +%changelog +* Sat Aug 15 2020 yanan li - 2.1.3-1 +- Package init diff --git a/dnsjava.yaml b/dnsjava.yaml new file mode 100644 index 0000000..44204d5 --- /dev/null +++ b/dnsjava.yaml @@ -0,0 +1,5 @@ +git_url: http://github.com/dnsjava/dnsjava.git +version_control: github +src_repo: dnsjava/dnsjava +tag_prefix: "^v" +seperator: "."