Summary: UserUI tools for TuxOnIce
Summary(ja): TuxOnIce 用の UserUI ツール
Name: tuxonice-userui
Version: 1.0
Release: 6%{?_dist_release}
License: GPL
Group: Applications/System
URL: http://tuxonice.net/

Source0: http://tuxonice.net/downloads/all/tuxonice-userui-%{version}.tar.gz
Source1: TOI-Vine.tar.bz2
Patch10: suspend2-userui-0.6.4-no-chown.patch
Patch11: tuxonice-userui-1.0-disable-fbsplash.patch
Patch12: suspend2-userui-0.7.2-change-optimize-level.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glibc-static
BuildRequires: libpng-static, freetype2-static
BuildRequires: zlib-static, libmng-static, lcms-static
BuildRequires: usplash-devel
Obsoletes: suspend2-userui < 0.7.3

%description
The user interface for TuxOnIce, TuxOnIce-UserUI, is now a separate program
that runs in userspace - it no longer exists in the kernel. This allows for
greater flexibility in the user interface, and less potential for fatal issues
to arise in kernel-space. TuxOnIce-UserUI is an optional component of Suspend
2, however, it can make your suspending experience much more enjoyable.

%description -l ja
Suspend 2 用のユーザーインターフェースである Suspend2-UserUI は、現在では
ユーザー空間で実行される独立したプログラムになっています。その為 kernel に
は含まれていません。 これによりユーザーインターフェースの自由度が増し、また
カーネル空間で実行される場合に起こりうる致命的な問題の可能性も低減できます。
Suspend2-UserUI は Suspend 2 のオプショナルなコンポーネントですが、インスト
ールすればサスペンドがより楽しいものになります。

%package usplash
Summary: TuxOnIce UserUI tool for framebuffer console.
Summary(ja): フレームバッファ用 TuxOnIce UserUI ツール
Group: Applications/System
Requires: tuxonice-userui
Requires: usplash
Obsoletes: suspend2-userui-fbsplash < 0.7.3
Obsoletes: tunonice-userui-fbsplash < 1.0-5

%description usplash
This package includes the UserUI tool to display progress bar on the
framebuffer console. (using usplash feature)

%description usplash -l ja
このパッケージはフレームバッファコンソール上にプログレスバーを表示する
ための UserUI ツールを含んでいます。(usplash の機能を使用)


%prep
%setup -q
%patch10 -p1
%patch11 -p1
%patch12 -p1


%build
make clean
%__make all


%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/splash
mkdir -p $RPM_BUILD_ROOT/sbin
INSTDIR=$RPM_BUILD_ROOT/sbin make -e install

# creating symlinks - see the NOTE in the below changelog
pushd $RPM_BUILD_ROOT/sbin
ln -s tuxoniceui_text     suspend2ui_text
ln -s tuxoniceui_usplash suspend2ui_usplash
popd

# Install Vine themes
tar xjvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_sysconfdir}/splash

# creating symlinks - see the NOTE in the below changelog
pushd $RPM_BUILD_ROOT%{_sysconfdir}/splash
ln -s TOI-Vine suspend2
ln -s TOI-Vine tuxonice
popd


%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc ChangeLog KERNEL_API README TODO USERUI_API
/sbin/tuxoniceui_text
/sbin/suspend2ui_text


%files usplash
/sbin/tuxoniceui_usplash
/sbin/suspend2ui_usplash
%config %{_sysconfdir}/splash/tuxonice
%config %{_sysconfdir}/splash/suspend2
%{_sysconfdir}/splash/TOI-Vine


%changelog
* Sat May 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0-6
- add BR: glibc-static

* Sat Apr 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0-5
- update patch11 to disable fbsplash and enable usplash
- add BR:usplash-devel
- add -usplash subpackage, remove -fbsplash

* Sat Apr 11 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.0-3
- rebuild with lcms 1.18vl2

* Fri Apr 03 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0-2
- rebuild to add sign..

* Thu Apr 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0-1
- new upstream release
- rename /etc/splash/TuxOnIce to /etc/splash/tuxonice
- update Vine splash theme

* Fri Mar 27 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.3-1
- new upstream release
- spec in utf-8
- new versioning policy
- rename to tuxonice-userui
- add BuildRequires -static instead of -devel

* Fri Oct 19 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.7.2-0vl2
- updated to upstream release 0.7.2
- the upstream tarball contains unnecessary x86_64 binaries:
  removed from the original tarball (since 0vl2)
- added Patch11 (do not compile suspend2ui_usplash)
- added Patch12 (change from -O3 to -O2 for somewhat i-love-stability reason)
- NOTE: the whole suspend2 programs seem to be currently in transition
  to TuxOnIce: some codes (and even documents) still has suspend2/tuxonice
  name confusions. So here we have some symbolic links for compatibility
  until the upstream completely finishes the stable TuxOnIce release.
  I guess the name of the userui programs will be changed from
  suspend2-userui to tuxonice-userui or something like that.

* Sun Jan 28 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6.3-0vl3
- fix typo in spec <BTS:VineLinux:425>
- add japanese description

* Sat Sep 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.3-0vl2
- update suspend2 theme based on sky background image.

* Thu Mar 02 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6.3-0vl1
- initial build for Vine Linux