Summary:        An XML parser library designed for Jabber applications
Summary(ja):    Jabber アプリケーションのために設計された XML パーサ

Name:           iksemel
Version:        1.3
Release:        2%{?_dist_release}

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://code.google.com/p/iksemel/
Source0:        http://iksemel.googlecode.com/files/iksemel-%{version}.tar.gz
Patch0:         iksemel-gcrypt-sha.patch
Patch1:         iksemel-64bit.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gnutls-devel > 2
BuildRequires:  libgcrypt-devel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool > 2
BuildRequires:  texinfo

%description
An XML parser library designed for Jabber applications. It is coded in
ANSI C for POSIX compatible environments, thus highly portable.

%package devel
Summary:        Development files for iksemel
Summary(ja):    iksemel の開発ファイル
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       gnutls-devel
Requires:       pkgconfig

Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description devel
Development files for iksemel.

%package utils
Summary:        Utilities for iksemel
Summary(ja):    iksemel 用のユーティリティ
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description utils
Utlity programs for iksemel.

%prep
%setup0 -q
%patch0 -p1
%patch1 -p1

# force rebuilding of the info file
rm doc/iksemel

%build
# We need to re-run the autotools because the patch we apply modifies
# the configure.ac and src/Makefile.am
libtoolize --copy --force --automake
aclocal
autoheader
automake --add-missing --force-missing --gnu --include-deps
autoconf
%configure --disable-static --disable-rpath
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

rm -f %{buildroot}%{_libdir}/*.la

mv %{buildroot}%{_infodir}/iksemel %{buildroot}%{_infodir}/iksemel.info

%check
%ifnarch ppc
make check
%endif

%clean
rm -rf %{buildroot}

%postun -p /sbin/ldconfig

%post -p /sbin/ldconfig

%post devel
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%preun devel
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING HACKING NEWS README TODO

%{_libdir}/libiksemel.so.*

%files devel
%defattr(-,root,root,-)
%doc COPYING

%{_libdir}/libiksemel.so
%{_includedir}/iksemel.h
%{_libdir}/pkgconfig/iksemel.pc
%{_infodir}/iksemel.info*

%files utils
%defattr(-,root,root,-)
%doc COPYING

%{_bindir}/ikslint
%{_bindir}/iksperf
%{_bindir}/iksroster

%changelog
* Tue May 05 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3-2vl5
- rebuild with gnutls 2.6.6, libtool 2.2.6

* Sun Sep 28 2008 Shu KONNO <owa@bg.wakwak.com> 1.3-1vl5
- applied new versioning policy, spec in utf-8

* Wed Dec 12 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3-0vl1
- initial build for Vine Linux

* Sat Aug 25 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.3-2
- Disable "make check" on PPC again.

* Sat Aug 25 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.3-1
- Update to 1.3
- Don't need to BR pkgconfig because gnutls-devel now requires it properly.
- Update license.
- Run "make check" on PPC
- Update patches so that they apply to 1.3
- Update URLs

* Thu Nov 16 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-13
- ppp != ppc

* Thu Nov 16 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-12
- Don't run make check on PPC - tests failing.

* Thu Nov 16 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-11
- Add patch from Hans de Goede that fixes 64 bit issues
- Re-enable "make check".
- Remove tabs from specfile.

* Mon Aug 28 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-10
- Bump release and rebuild.

* Wed Aug  2 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-6
- Temporarily disable make check until problems with it can be figured out.

* Thu Jul 27 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-5
- Patch to use SHA1 hashing routines from libgcrypt rather than
  broken internal code.  This means that we need to BR autoools
  to regenerate comfigure script and makefiles.

* Mon Jun 26 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-4
- Don't re-run autotools, fix rpath in a different way.

* Mon Jun 26 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-3
- Add a %check section.
- Add BR for libtool.

* Tue May 30 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-2
- Add texinfo BR

* Mon May 29 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.2-1
- First version for Fedora Extras.

