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

Summary:	X Window System font support for Pango
Name:		pangox-compat
Version:	0.0.2
Release:	2%{?_dist_release}
Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.0//%{name}-%{version}.tar.xz
License:	GPLv2
Group:		System Environment/Libraries 
URL:		http://ftp.gnome.org/pub/GNOME/sources/pangox-compat/

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

BuildRequires:	pango-devel
BuildRequires:	glib2-devel
BuildRequires:	libSM-devel

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
This is a compatibility library providing the obsolete pangox library
that is not shipped by Pango itself anymore.  If you are still using
pangox, well, really, get a life...


%package	devel
Summary:        Development tools for %{name}
Summary(ja):    %{name} の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
%{name}.


# compat32
%package -n compat32-%{name}
Summary:	Double-Array Trie Library
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}

%description -n compat32-%{name}
This is an implementation of double-array structure for representing trie, 
as proposed by Junichi Aoe.

Trie is a kind of digital search tree, an efficient indexing method with 
O(1) time complexity for searching. Comparably as efficient as hashing,
trie also provides flexibility on incremental matching and key spelling
manipulation. This makes it ideal for lexical analyzers, as well as spelling
dictionaries.


%package -n compat32-%{name}-devel
Summary:        Development tools for %{name}
Summary(ja):    %{name} の開発環境
Group:          Development/Libraries
Requires:       compat32-%{name} = %{version}-%{release}
Requires:       pkgconfig

%description -n compat32-%{name}-devel
Header files and libraries for building a extension library for the
%{name}.


%prep
%setup -q


%build
%configure \
	--disable-static

%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_sysconfdir}/pango/pangox.aliases
%{_libdir}/libpangox-1.0.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/pango-1.0
%{_libdir}/libpangox-1.0.so
%{_libdir}/pkgconfig/pangox.pc

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

%files -n compat32-%{name}-devel
%defattr(-, root, root,-)
%{_libdir}/libpangox-1.0.so
%endif


%changelog
* Mon Dec 30 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.0.2-2
- rebuild with VineSeed environment

* Thu Oct 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.0.2-1
- new upstream release
- add BuildRequires: libSM-devel

* Thu Sep 27 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.0.1-1
- initial build

