%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

Name:           pixman
Version:        0.21.4
Release:        1%{?_dist_release}
Summary:        Pixel manipulation library
Summary(ja):    ピクセル操作ライブラリ

Group:          System Environment/Libraries
License:        MIT
URL:            http://xorg.freedesktop.org/archive/individual/lib/
Source0:        pixman-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

Obsoletes:	libpixman <= 0.1.6

%description
Pixman is a pixel manipulation library for X and cairo.

%package devel
Summary: Pixel manipulation library development package
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Obsoletes: libpixman-devel <= 0.1.6

%description devel
Development library for pixman.

# compat32
%package -n compat32-%{name}
Summary:        Pixel manipulation library
Summary(ja):    ピクセル操作ライブラリ
Group:          System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description -n compat32-%{name}
Pixman is a pixel manipulation library for X and cairo.

%package -n compat32-%{name}-devel
Summary: Pixel manipulation library development package
Group: Development/Libraries
Requires: compat32-%{name} = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}

%description -n compat32-%{name}-devel
Development library for pixman.

%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%post -n compat32-%{name} -p /sbin/ldconfig
%postun -n compat32-%{name} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/libpixman-1*.so.*

%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/pixman-1
%{_includedir}/pixman-1/pixman.h
%{_includedir}/pixman-1/pixman-version.h
%{_libdir}/libpixman-1*.so
%{_libdir}/pkgconfig/pixman-1.pc

# compat32
%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root,-)
%{_libdir}/libpixman-1*.so.*

%files -n compat32-%{name}-devel
%defattr(-,root,root,-)
%{_libdir}/libpixman-1*.so
%{_libdir}/pkgconfig/pixman-1.pc
%endif

%changelog
* Sun Jan 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.21.4-1
- new upstream release

* Sat Dec 18 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.21.2-1
- new upstream release

* Sun Nov 07 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.20.0-1
- new upstream release

* Sat Oct 02 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.19.4-1
- new upstream release

* Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.18.2-3
- rebuild with rpm-4.8.1 for pkg-config file agein

* Tue Sep 21 2010 IWAI, Masaharu <iwai@alib.jp> 0.18.2-2
- build with rpm-4.8.1-1 for pkg-config file

* Fri Jul 30 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.18.2-1
- new upstream release

* Fri Apr 02 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.18.0-1
- new upstream release

* Mon Mar 29 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.17.14-1
- new upstream release

* Sun Mar 14 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.17.10-1
- new upstream release

* Wed Feb 17 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.17.4-1
- new upstream release

* Wed Nov 18 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.16.2-1
- new upstream release

* Thu Jul 23 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.18-1
- new upstream release

* Tue Jun 30 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.14-2
- add Patch1 to fix notification icon

* Mon Jun 29 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.14-1
- new upstream release

* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 0.15.4-2
- added compat32 subpackage for x86_64 arch support again.

* Wed May 20 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.4-1
- new upstream release

* Sat May 02 2009 NAKAMURA Kenta <kenta@vinelinux.org> 0.15.2-2
- added compat32 subpackage for x86_64 arch support.

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.15.2-1
- new upstream release

* Fri Mar 20 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.14.0-1
- new upstream release

* Sat Sep 20 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.12.0-1
- new upstream release

* Sun Sep 07 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.11.10-1
- new upstream release

* Mon Aug 18 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.11.8-1
- new upstream release

* Fri Jul 04 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.11.6-1
- new upstream release

* Thu May  1 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.10.0-1vl5
- Initial build for Vine Linux

* Thu Apr  3 2008 Soren Sandmann <sandmann@redhat.com> 0.10.0-1
- Update to 0.10.0

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.6-4
- Autorebuild for GCC 4.3

* Wed Oct 31 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.9.6-3
- Third time's the charm.

* Wed Oct 31 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.9.6-2
- Second try.

* Wed Oct 31 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.9.6-1
- Update to 0.9.6 release.

* Wed Sep 05 2007 Adam Jackson <ajax@redhat.com> 0.9.5-1
- Update to 0.9.5 release.

* Mon Aug 27 2007 Adam Jackson <ajax@redhat.com> 0.9.0-7.20070827
- New snapshot

* Fri Aug 24 2007 Adam Jackson <ajax@redhat.com> 0.9.0-4.20070824
- New snapshot

* Wed Jul 25 2007 Jeremy Katz <katzj@redhat.com> - 0.9.0-3.20070724
- rebuild for toolchain bug

* Tue Jul 24 2007 Adam Jackson <ajax@redhat.com> 0.9.0-2.20070724
- Re-add it, %%dir is not the same as adding a dir whole.

* Tue Jul 24 2007 Adam Jackson <ajax@redhat.com> 0.9.0-1.20070724
- Remove redundant header from %%files devel.

* Fri May 18 2007 Adam Jackson <ajax@redhat.com> 0.9.0-0.20070724
- git build so I can build git X.
