Name:           giblib
Version:        1.2.4
Release:        2%{?_dist_release}
License:        MIT
Group:          System Environment/Libraries
URL:            http://freecode.com/projects/giblib
Source0:        http://linuxbrit.co.uk/downloads/giblib-%{version}.tar.gz
Patch0:         giblib-1.2.4-multilib.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       mkato
Summary:        Simple library and a wrapper for imlib2
Summary(ja):    imlib2 の為のシンプルなライブラリとラッパー

BuildRequires:  imlib2-devel, libX11-devel, zlib-devel

%description
giblib is a utility library used by many of the applications from
linuxbrit.co.uk. It incorporates doubly linked lists, some string
functions, and a wrapper for imlib2. The wrapper does two things.
It gives you access to fontstyles, which can be loaded from files,
saved to files or defined dynamically through the API. It also,
and more importantly, wraps imlib2's context API.              '

%package        devel
Summary:        Static library and header files for giblib
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       imlib2-devel, pkgconfig, libX11-devel, zlib-devel
BuildRequires: 	bzip2-devel

%description    devel
Install this package if you intend to develop using the giblib library.

%prep
%setup -q
%patch0 -p1

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


%install
%{__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 ChangeLog
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_bindir}/*-config
%{_includedir}/*
%exclude %{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Mon Jan  6 2014 TANAKA hiroaki <mosaicist@jcom.home.ne.jp> 1.2.4-2
- add BuildRequires:bzip2-devel

* Mon Feb  6 2012 KATO Masashi <mkato@par.odn.ne.jp> 
- initial build for Vine
 Linux
