Summary: An ASCII art library.
Summary(ja): ASCII アートライブラリ
Name: aalib
Version: 1.4
Release: 0.rc5.5%{?_dist_release}
Group: System Environment/Libraries
License: LGPL
URL: http://aa-project.sourceforge.net/aalib/
Source: http://prdownloads.sourceforge.net/aa-project/%{name}-%{version}rc5.tar.gz
Patch0:	%{name}-aclocal.patch
Patch1:	%{name}-config-rpath.patch
Patch2:	aalib-1.4rc5-bug149361.patch
Patch10: aalib-1.4.0-without-gpm.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: slang-devel 
BuildRequires: libX11-devel
BuildRequires: ncurses-devel

%description
AA-lib is a low level gfx library just as many other libraries are. The
main difference is that AA-lib does not require graphics device. In
fact, there is no graphical output possible. AA-lib replaces those
old-fashioned output methods with a powerful ASCII art renderer. The API
is designed to be similar to other graphics libraries.

%description -l ja
AA-lib は他のライブラリと同様な低レベルのグラフィックスライブラリです。
AA-lib の一番の特徴はグラフィックデバイスを必要としない点です。実際の所、
グラフィカルな出力先が無くても動作します。AA-lib はこれらの昔ながらの
出力方法をパワフルな ACSCII アートレンダラで置き換えます。この API は
その他のグラフィックライブラリと同じようにデザインされています。

%package devel
Summary: aalib development files
Summary(ja): aalib の開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: libX11-devel
Requires: slang-devel
Requires: ncurses-devel
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description devel
This package contains header files and other files needed to develop
with aalib.

%description devel -l ja
このパッケージには aalib を使用して開発するために必要なヘッダファイルや
その他のファイルが含まれています。


%prep
%setup -q -n %{name}-1.4.0

%patch0 -p0
%patch1 -p0
%patch2 -p1 -b .bug149361
%patch10 -p1 -b .without-gpm

%build
autoreconf -fi
%configure --with-x \
    --with-curses-driver=yes \
    --with-ncurses \
    --with-gpm-mouse=no
make LIBTOOL=/usr/bin/libtool

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall LIBTOOL=/usr/bin/libtool
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir || :
rm -f $RPM_BUILD_ROOT/%{_libdir}/libaa.{a,la} || :

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
if [ -e %{_infodir}/libaa.info.gz ]; then
	/sbin/install-info %{_infodir}/libaa.info.gz %{_infodir}/dir
fi

%preun devel
if [ -e %{_infodir}/libaa.info.gz ]; then
	/sbin/install-info --delete %{_infodir}/libaa.info.gz %{_infodir}/dir
fi

%files
%defattr(-, root, root)
%doc ANNOUNCE AUTHORS COPYING ChangeLog NEWS
%{_bindir}/aafire
%{_bindir}/aainfo
%{_bindir}/aasavefont
%{_bindir}/aatest
%{_libdir}/*.so.*
%{_mandir}/man1/*

%files devel
%defattr(-, root, root)
%{_bindir}/aalib-config
%{_libdir}/*.so
%{_includedir}/*.h
%{_datadir}/aclocal/*.m4
%{_infodir}/aalib.info*
%{_mandir}/man3/*

%changelog
* Tue Mar 22 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0.rc5.5
- rebuilt with new toolchains

* Wed May 27 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4-0.rc5.4
- remove static library
- build without gpm
  - add BuildConflicts: gpm-libs

* Mon Apr 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4-0.rc5.3
- spec in utf-8

* Thu Jun 26 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0.rc5.2
- rebuilt with slang 2.1.3, xorg-x11 7.3
- updated dependancies

* Sun Apr 13 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.4-0.rc5.1
- rebuild with new toolchain.
- apply new versioning policy.

* Mon Jun 18 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.4-0.rc5vl3
- rebuild with new toolchain.
- add japanese summary and description.
- delete libtool library (.la) files. <BTS:VineLinux:506>

* Sat Sep 02 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.4-0.rc5vl2
- add BuildRequires: ncurses-devel
- add Requires: ncurses-devel (devel package)

* Thu Sep 22 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0.rc5vl1
- new upstream release
- added Patch0,1,2 from Fedora
  * Fri Jul  1 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
  - fix missing return value (#149361)
  * Fri Jul 16 2004 Ville Skytt辰 <ville.skytta at iki.fi>
  - Fix underquoted definition in aalib.m4 to appease aclocal >= 1.8.
  - Avoid rpath in aalib-config.

* Sat Jan 11 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4-0vl0.rc4
- initial build