libidn/libidn.spec

191 lines
4.3 KiB
RPMSpec
Raw Normal View History

2022-02-15 18:16:27 +08:00
# Build with Emacs support
%bcond_without libidn_enables_emacs
%bcond_with java
2019-09-30 10:56:38 -04:00
Name: libidn
2022-02-08 09:49:14 +08:00
Version: 1.38
2022-02-15 18:16:27 +08:00
Release: 2
2019-09-30 10:56:38 -04:00
Summary: GNU IDN Library - Libidn
License: LGPLv2+ and GPLv3+ and GFDL
URL: http://www.gnu.org/software/libidn/
Source0: http://ftp.gnu.org/gnu/libidn/libidn-%{version}.tar.gz
2022-02-15 18:16:27 +08:00
# Allow disabling Emacs support
Patch0: libidn-emacsopt.patch
2019-09-30 10:56:38 -04:00
BuildRequires: autoconf autoconf-archive automake libtool texinfo
2022-02-15 18:16:27 +08:00
BuildRequires: gcc gettext gettext-devel pkgconfig help2man
2022-02-08 09:49:14 +08:00
BuildRequires: gtk-doc
2022-02-15 18:16:27 +08:00
%if %{with libidn_enables_emacs}
BuildRequires: emacs
%endif
2019-09-30 10:56:38 -04:00
Provides: bundled(gnulib)
2022-02-15 18:16:27 +08:00
%if %{with libidn_enables_emacs}
2019-09-30 10:56:38 -04:00
Obsoletes: emacs-libidn < 1.30-4
Provides: emacs-libidn < 1.30-4
Requires: emacs-filesystem >= %{_emacs_version}
2022-02-15 18:16:27 +08:00
%endif
2019-09-30 10:56:38 -04:00
%description
GNU Libidn is a fully documented implementation of the Stringprep, Punycode and IDNA 2003 specifications.
Libidn's purpose is to encode and decode internationalized domain names.
%package devel
Summary: Development files for the libidn library
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package includes header files and libraries necessary for
developing programs which use the GNU libidn library.
2019-11-06 19:38:53 +08:00
%if %{with java}
2019-09-30 10:56:38 -04:00
%package java
Summary: Java port of the GNU Libidn library
BuildRequires: java-devel javapackages-local
BuildRequires: mvn(com.google.code.findbugs:annotations)
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(junit:junit)
BuildArch: noarch
%description java
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.
2019-11-06 19:38:53 +08:00
%endif
2019-09-30 10:56:38 -04:00
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
autoreconf -vif
touch src/idn_cmd.c src/idn_cmd.h
%build
2022-02-15 18:16:27 +08:00
%configure --disable-csharp \
%if %{with libidn_enables_emacs}
--enable-emacs \
--with-lispdir=%{_emacs_sitelispdir}/%{name} \
%else
--disable-emacs \
%endif
2019-11-06 19:38:53 +08:00
%if %{with java}
--enable-java
%else
--disable-java
%endif
2019-09-30 10:56:38 -04:00
2019-12-25 15:53:26 +08:00
%disable_rpath
export LD_LIBRARY_PATH=$(pwd)/lib/.libs
2019-09-30 10:56:38 -04:00
2019-12-25 15:53:26 +08:00
%make_build
2019-09-30 10:56:38 -04:00
%install
%make_install
rm -rf %{buildroot}%{_datadir}/info/dir
rm -rf %{buildroot}%{_libdir}/*.la \
%{buildroot}%{_datadir}/info/*.png
2022-02-15 18:16:27 +08:00
%if %{with libidn_enables_emacs}
2019-12-25 15:53:26 +08:00
%{_emacs_bytecompile} $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}/*.el
2022-02-15 18:16:27 +08:00
%endif
2019-12-25 15:53:26 +08:00
2019-11-06 19:38:53 +08:00
%if %{with java}
2019-09-30 10:56:38 -04:00
rm -rf doc/java/*
%javadoc -source 1.6 -d doc/java $(find java/src/main/java -name "*.java")
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
2019-11-06 19:38:53 +08:00
%endif
2019-09-30 10:56:38 -04:00
%find_lang %{name}
%ldconfig_scriptlets
%files -f %{name}.lang
%license COPYING*
%doc AUTHORS NEWS FAQ THANKS README
%{_bindir}/idn
%{_libdir}/libidn.so.12*
2022-02-15 18:16:27 +08:00
%if %{with libidn_enables_emacs}
2019-12-25 15:53:26 +08:00
%{_emacs_sitelispdir}/%{name}
2022-02-15 18:16:27 +08:00
%endif
2019-09-30 10:56:38 -04:00
%files devel
%{_libdir}/libidn.so
%{_libdir}/*.a
%{_includedir}/*.h
%{_libdir}/pkgconfig/*.pc
2019-11-06 19:38:53 +08:00
%if %{with java}
2019-09-30 10:56:38 -04:00
%files java -f .mfiles
%license COPYING* java/LICENSE-2.0.txt
%files javadoc -f .mfiles-javadoc
%license COPYING* java/LICENSE-2.0.txt
2019-11-06 19:38:53 +08:00
%endif
2019-09-30 10:56:38 -04:00
%files help
%{_mandir}/man1/idn.1*
%{_mandir}/man3/*
%{_infodir}/%{name}.info.gz
%changelog
2022-02-15 18:16:27 +08:00
* Tue Feb 15 2022 fuanan <fuanan3@h-partners.com> - 1.38-2
- Add build-conditions disabling Emacs
2022-02-08 09:49:14 +08:00
* Tue Feb 8 2022 fuanan <fuanan3@h-partners.com> - 1.38-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update version to 1.38
2020-07-28 19:37:04 +08:00
* Tue Jul 28 2020 yang_zhuang_zhuang <yangzhuangzhuang1@huawei.com> - 1.36-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update version to 1.36
2020-01-08 11:19:03 +08:00
* Wed Jan 8 2020 chengquan <chengquan3@huawei.com> - 1.35-9
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove useless patch
2019-12-25 15:53:26 +08:00
* Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.35-8
- Type:NA
- ID:NA
- SUG:NA
- DESC:change the directory of lispdir and remove rpath
2019-11-06 19:38:53 +08:00
* Thu Oct 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.35-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add bcondwith java
* Thu Oct 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.35-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add libidn_enables_java
* Mon Sep 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.35-3
2019-09-30 10:56:38 -04:00
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix build failure in csharp
2019-11-06 19:38:53 +08:00
* Mon Sep 2 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.35-1
2019-09-30 10:56:38 -04:00
- Package init