]> git.pld-linux.org Git - packages/libidn.git/blobdiff - libidn.spec
- updated to 0.6.10, updated pl.po-update patch
[packages/libidn.git] / libidn.spec
index 36d74b08ced53ce81a0f7deef70554efed650445..921bef80de663a43ad7d6cff368ab1b7da3af7b4 100644 (file)
@@ -1,25 +1,47 @@
 # TODO:
-# - prepare package with web-files from contrib
-# - // with emacs stuff
+# - prepare package with web-files and java from contrib
 #
+# Conditional build:
+%bcond_without dotnet  # don't build C# binding
+%bcond_without java    # don't build Java implementation
+%bcond_without python  # don't build python interface
+#
+%ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
+%undefine      with_dotnet
+%endif
+%ifarch i386
+%undefine      with_dotnet
+%endif
 Summary:       Internationalized string processing library
 Summary(pl):   Biblioteka do przetwarzania umiêdzynarodowionych ³añcuchów
 Name:          libidn
-Version:       0.3.6
+Version:       0.6.10
 Release:       1
 License:       LGPL v2.1
 Group:         Libraries
 Source0:       http://josefsson.org/libidn/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 26c3b27a1233a9d752006c2fe01d1fbb
+# Source0-md5: 443c25385059eb72e4588112af72c0c0
 Patch0:                %{name}-info.patch
+Patch1:                %{name}-python.patch
+Patch2:                %{name}-pl.po-update.patch
 URL:           http://www.gnu.org/software/libidn/
-BuildRequires: autoconf >= 2.57
-BuildRequires: automake >= 1.8
-BuildRequires: libtool
-BuildRequires: texinfo
+BuildRequires: autoconf >= 2.61
+BuildRequires: automake >= 1:1.10
+%{?with_java:BuildRequires:    gcc-java}
+BuildRequires: gettext-devel >= 0.16
+%{?with_java:BuildRequires:    gjdoc}
+BuildRequires: libtool >= 2:1.5
+%{?with_dotnet:BuildRequires:  mono}
+BuildRequires: perl-base
+%{?with_python:BuildRequires:  python-devel >= 1:2.3}
+%{?with_python:BuildRequires:  rpm-pythonprov}
+BuildRequires: texinfo >= 4.7
 Requires(post,postun): /sbin/ldconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# is it correct?
+%define                _emacs_lispdir  %{_datadir}/emacs/site-lisp
+
 %description
 GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
 specifications defined by the IETF Internationalized Domain Names
@@ -34,7 +56,7 @@ zdefiniowanych przez grup
 Summary:       Header files for libidn library
 Summary(pl):   Pliki nag³ówkowe biblioteki libidn
 Group:         Development/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Header files for libidn library.
@@ -46,7 +68,7 @@ Pliki nag
 Summary:       Static libidn library
 Summary(pl):   Statyczna biblioteka libidn
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static libidn library.
@@ -54,34 +76,100 @@ Static libidn library.
 %description static -l pl
 Statyczna biblioteka libidn.
 
+%package -n dotnet-libidn
+Summary:       C# binding for libidn
+Summary(pl):   Wi±zanie C# dla libidn
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description -n dotnet-libidn
+C# binding for libidn.
+
+%description -n dotnet-libidn -l pl
+Wi±zanie C# dla libidn.
+
+%package -n emacs-libidn-pkg
+Summary:       IDN support files for emacs
+Summary(pl):   Obs³uga IDN dla emacsa
+Group:         Applications/Editors/Emacs
+Requires:      %{name} = %{version}-%{release}
+
+%description -n emacs-libidn-pkg
+IDN support files for emacs.
+
+%description -n emacs-libidn-pkg -l pl
+Obs³uga IDN dla emacsa.
+
+%package -n java-libidn
+Summary:       Java implementation of libidn
+Summary(pl):   Implementacja libidn w Javie
+Group:         Libraries
+Requires:      jre
+
+%description -n java-libidn
+Java implementation of libidn (internationalized domain names
+library).
+
+%description -n java-libidn -l pl
+Implementacja libidn (biblioteki umiêdzynarodowionych nazw domen) w
+Javie.
+
+%package -n python-idn
+Summary:       Python interface to libidn
+Summary(pl):   Pythonowy interfejs do libidn
+Group:         Libraries/Python
+Requires:      %{name} = %{version}-%{release}
+%pyrequires_eq python-libs
+
+%description -n python-idn
+Python interface to libidn (internationalized domain names library).
+
+%description -n python-idn -l pl
+Pythonowy interfejs do libidn (biblioteki umiêdzynarodowionych nazw
+domen).
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
-# we don't have libtool 1.5a
-%{__perl} -pi -e 's/AC_LIBTOOL_TAGS//' configure.ac
-# we don't have cvs texinfo
-%{__perl} -pi -e 's/\@ordf\{\}/a/' doc/libidn.texi
-# incompatible with ksh
-rm -f m4/libtool.m4
+rm -f po/stamp-po
 
 %build
-# blegh, lt incompatible with ksh - must rebuild
+%{__gettextize}
 %{__libtoolize}
-%{__aclocal} -I m4
+%{__aclocal} -I m4 -I gl/m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+JAR=%{_bindir}/fastjar \
+%configure \
+       %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \
+       %{?with_java:--enable-java} \
+       --with-lispdir=%{_emacs_lispdir}
 
 %{__make}
 
+%if %{with python}
+%{__make} -C contrib/idn-python \
+       INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs"
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with python}
+install -D contrib/idn-python/idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so
+%endif
+
+%find_lang %{name}
+
+rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -93,9 +181,9 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/ldconfig
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc ChangeLog FAQ README THANKS TODO doc/libidn.html contrib
+%doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib
 %attr(755,root,root) %{_bindir}/idn
 %attr(755,root,root) %{_libdir}/libidn.so.*.*.*
 %{_mandir}/man1/idn.1*
@@ -112,3 +200,26 @@ rm -rf $RPM_BUILD_ROOT
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libidn.a
+
+%if %{with dotnet}
+%files -n dotnet-libidn
+%defattr(644,root,root,755)
+# why not in gac? does it work here?
+%{_libdir}/Libidn.dll
+%endif
+
+%files -n emacs-libidn-pkg
+%defattr(644,root,root,755)
+%{_emacs_lispdir}/*.el
+
+%if %{with java}
+%files -n java-libidn
+%defattr(644,root,root,755)
+%{_datadir}/java/libidn*.jar
+%endif
+
+%if %{with python}
+%files -n python-idn
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/idn.so
+%endif
This page took 0.105175 seconds and 4 git commands to generate.