Summary:	Userspace bootsplash utility
Summary(ja):	ユーザスペーススプラッシュユーティリティ
Name:		usplash
Version:	0.5.49
Release:        2%{?_dist_release}
License:	GPL
Group:		Applications/System
URL:		https://wiki.ubuntu.com/USplash

Source0:        http://ftp.debian.org/debian/pool/main/u/usplash/%{name}_%{version}.tar.gz
Patch1:         %{name}-0.5.49-install-path.patch

BuildRequires:	gd-devel >= 2.0.0
BuildRequires:	libpng-devel
Requires(post):	/sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

%description
Usplash is a userspace application that uses the Linux framebuffer
interface to draw a splash screen at boot. It has a companion utility
that is able to send commands to usplash, allowing information about
the bootup sequence to be displayed in a more attractive way.

%package devel
Summary:	Usplash header files
Summary(ja):	Usplash ヘッダファイル
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Usplash header files.

%prep
%setup -q -n %{name}
%patch1 -p1 -b .install-path

%build
%{__make} -C bogl
%{__make} 

%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} SYSLIBDIR=/%{_lib}

install -d $RPM_BUILD_ROOT%{_libdir}
ln -sf /%{_lib}/libusplash.so.0 $RPM_BUILD_ROOT%{_libdir}/libusplash.so

install -d $RPM_BUILD_ROOT/var/lib/usplash
mkfifo $RPM_BUILD_ROOT/var/lib/usplash/usplash_fifo
mkfifo $RPM_BUILD_ROOT/var/lib/usplash/usplash_outfifo

install -d $RPM_BUILD_ROOT%{_mandir}/man8
install -m644 *.8 $RPM_BUILD_ROOT%{_mandir}/man8/

install -d $RPM_BUILD_ROOT%{_libexecdir}/usplash

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig

%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc README
%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_syssbindir}/*
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) /%{_lib}/libusplash.so.0
%dir %{_libexecdir}/usplash
%dir /var/lib/usplash
/var/lib/usplash/usplash_fifo
/var/lib/usplash/usplash_outfifo
%{_mandir}/man8/*.8*

%files devel
%defattr(644,root,root,755)
%{_includedir}/*.h
%attr(755,root,root) %{_libdir}/libusplash.so

%changelog
* Sat Apr 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 	0.5.49-2
- fix typo

* Thu Apr 21 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 	0.5.49-1
- initial build for Vine Linux

