Name:           libplist
Summary:        Library for manipulating Apple Binary and XML Property Lists
SUmmary(ja):    AppleのバイナリおよびXMLプロパティリストを操作するライブラリ
Version:        1.10
Release:        1%{?_dist_release}

Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://www.libimobiledevice.org/

Source0:        http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libxml2-devel
BuildRequires: glib2-devel
BuildRequires: python-devel
BuildRequires: Cython
BuildRequires: swig
BuildRequires: cmake

%description
libplist is a library for manipulating Apple Binary and XML Property Lists

%package devel
Summary: Development package for libplist
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
%{name}, development headers and libraries.

%package python
Summary: Python package for libplist
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python

%description python
%{name}, python libraries and support

%prep
%setup -q

%build
export CMAKE_PREFIX_PATH=/usr
%{cmake} .

make %{?_smp_mflags} V=1

%install
export CMAKE_PREFIX_PATH=/usr
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING.LESSER README
%{_bindir}/plistutil
%{_bindir}/plistutil-%{version}
%{_libdir}/libplist.so.*
%{_libdir}/libplist++.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libplist.pc
%{_libdir}/pkgconfig/libplist++.pc
%{_libdir}/libplist.so
%{_libdir}/libplist++.so
%{_includedir}/plist

%files python
%defattr(-,root,root,-)
%{python_sitearch}/plist
%{python_sitearch}/plist.so

%changelog
* Thu Mar 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10-1
- new upstream release

* Sun Apr 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8-1
- new upstream release
- add BuildRequires: Cython

* Thu Feb 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4-2
- rebuild with python-2.7.2

* Fri Apr 15 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4-1
- new upstream release

* Tue Sep 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3-2
- rebuilt with rpm-4.8.1 for pkg-config

* Thu Apr 29 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3-1
- initial build for Vine Linux

* Tue Apr 20 2010 Peter Robinson <pbrobinson@gmail.com> 1.3-1
- Upstream stable 1.3 release

* Sat Jan 23 2010 Peter Robinson <pbrobinson@gmail.com> 1.2-1
- Upstream stable 1.2 release

* Sat Jan  9 2010 Peter Robinson <pbrobinson@gmail.com> 1.0.0-5
- Updated to the new python sysarch spec file reqs

* Mon Dec  7 2009 Peter Robinson <pbrobinson@gmail.com> 1.0.0-4
- and once more with feeling

* Mon Dec  7 2009 Peter Robinson <pbrobinson@gmail.com> 1.0.0-3
- Further updated fixes for the spec file

* Mon Dec  7 2009 Peter Robinson <pbrobinson@gmail.com> 1.0.0-2
- Drop upstreamed patch

* Mon Dec  7 2009 Peter Robinson <pbrobinson@gmail.com> 1.0.0-1
- Upstream stable 1.0.0 release

* Thu Oct 29 2009 Peter Robinson <pbrobinson@gmail.com> 0.16-3
- Actually add patch for python

* Thu Oct 29 2009 Peter Robinson <pbrobinson@gmail.com> 0.16-2
- Add python patch and c++ bindings

* Thu Oct 29 2009 Peter Robinson <pbrobinson@gmail.com> 0.16-1
- New upstream 0.16 release

* Tue Oct 20 2009 Peter Robinson <pbrobinson@gmail.com> 0.15-1
- New upstream 0.15 release

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 11 2009 Peter Robinson <pbrobinson@gmail.com> 0.13-1
- New upstream 0.13 release

* Mon May 11 2009 Peter Robinson <pbrobinson@gmail.com> 0.12-2
- Further review updates

* Sun May 10 2009 Peter Robinson <pbrobinson@gmail.com> 0.12-1
- Update to official tarball release, some review fixes

* Sun May 10 2009 Peter Robinson <pbrobinson@gmail.com> 0.12.0-0.1
- Initial package
