build java libidn library

epel9
gil 10 years ago
parent 3df0c9d5b9
commit 6a840e30b3

@ -1,7 +1,7 @@
Summary: Internationalized Domain Name support library
Name: libidn
Version: 1.30
Release: 1%{?dist}
Release: 2%{?dist}
URL: http://www.gnu.org/software/libidn/
License: LGPLv2+ and GPLv3+ and GFDL
Source0: http://ftp.gnu.org/gnu/libidn/libidn-%{version}.tar.gz
@ -40,9 +40,39 @@ BuildArch: noarch
%description -n emacs-%{name}
This package includes libidn support files for GNU Emacs.
%package java
Summary: Java port of the GNU Libidn library
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: mvn(com.google.code.findbugs:annotations)
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(junit:junit)
BuildArch: noarch
%description java
GNU Libidn is a fully documented implementation of the Stringprep,
Punycode and IDNA specifications. Libidn's purpose is to encode
and decode internationalized domain names.
This package contains the native Java port of the library.
%package javadoc
Summary: Javadoc for %{name}-java
BuildArch: noarch
%description javadoc
This package contains javadoc for %{name}-java.
%prep
%setup -q
# Cleanup
find . -name '*.jar' -print -delete
find . -name '*.class' -print -delete
# Not available test dep
%pom_remove_dep com.google.caliper:caliper java/pom.xml.in
# Name directory sections consistently in the info file, #209491
sed -i '/^INFO-DIR-SECTION/{s/GNU Libraries/Libraries/;s/GNU utilities/Utilities/;}' doc/libidn.info
@ -50,7 +80,7 @@ iconv -f ISO-8859-1 -t UTF-8 doc/libidn.info > iconv.tmp
mv iconv.tmp doc/libidn.info
%build
%configure --disable-csharp --disable-static --with-lispdir=%{_emacs_sitelispdir}/%{name}
%configure --disable-csharp --disable-static --with-lispdir=%{_emacs_sitelispdir}/%{name} --enable-java
# remove RPATH hardcoding
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -64,7 +94,7 @@ export LD_LIBRARY_PATH=$(pwd)/lib/.libs
make %{?_smp_mflags} -C tests check VALGRIND=env
%install
make install DESTDIR=$RPM_BUILD_ROOT pkgconfigdir=%{_libdir}/pkgconfig
make install DESTDIR=$RPM_BUILD_ROOT pkgconfigdir=%{_libdir}/pkgconfig libidn_jardir=%{_javadir}
# provide more examples
make %{?_smp_mflags} -C examples distclean
@ -81,6 +111,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la \
%{_emacs_bytecompile} $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}/*.el
# regenerate java documentation
rm -rf doc/java/*
%javadoc -source 1.6 -d doc/java $(find java/src/main/java -name "*.java")
# generate maven depmap
rm -rf $RPM_BUILD_ROOT%{_javadir}/libidn*.jar
%mvn_artifact java/pom.xml java/libidn-%{version}.jar
%mvn_file org.gnu.inet:libidn libidn
%mvn_install -J doc/java
%find_lang %{name}
%post
@ -113,7 +152,16 @@ fi
%files -n emacs-%{name}
%{_emacs_sitelispdir}/%{name}
%files java -f .mfiles
%license COPYING* java/LICENSE-2.0.txt
%files javadoc -f .mfiles-javadoc
%license COPYING* java/LICENSE-2.0.txt
%changelog
* Tue Mar 31 2015 gil cattaneo <puntogil@libero.it> 1.30-2
- build java libidn library
* Mon Mar 02 2015 Miroslav Lichvar <mlichvar@redhat.com> - 1.30-1
- update to 1.30

Loading…
Cancel
Save