Summary:   	CheckInstall installations tracker
Summary(ja):	パッケージ作成、インストール援助ツール CheckInstall
Name:		checkinstall
Version:	1.6.2
Release:	3%{?_dist_release}
License:	GPL
Group:		Applications/Administration
URL:		http://www.asic-linux.com.mx/~izto/checkinstall/
Source0:	%{name}-%{version}.tar.gz
Source1:	checkinstall-vine-64x64.svg
Source2:	checkinstall-vine-info 
Patch0:		%{name}-%{version}-vine.patch
Patch2:		checkinstall-1.6.1-rpm-version-check.patch
Patch3:		checkinstall-fix-glibc-detection.patch
Patch4:   	checkinstall-rpm-set-buildroot.patch
Patch5:	  	21build-glibc-2.10.diff
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	gettext-devel
Requires:	rpm-build gettext

%description
CheckInstall  keeps  track of all the files created  or
modified  by your installation  script  ("make install"
"make install_modules",  "setup",   etc),   builds    a 
standard   binary   package and  installs  it  in  your 
system giving you the ability to uninstall it with your 
distribution's  standard package management  utilities. 
'

%description -l ja
CheckInstallは tar ball で配布されているソフトウェアを
ディストリビューションのパッケージ管理システムに則った
パッケージ形式に作成、インストールするユーティリティです。
オリジナルでは deb、tgz パッケージも作成可能ですが、
このパッケージでは Vine Linux に合わせてデフォルトで 
rpm パッケージを作成するようにしてあります。

%prep

%setup -q #-n %name-%version
%patch0 -p1 
%patch2 -p0
%patch3 -p0 
%patch4 -p1 
ln -s installwatch installwatch-0.7.0beta5
%patch5 -p1

%build
make

%install
rm -rf %buildroot
install -D -m 755 checkinstall %buildroot/%{_bindir}/checkinstall
install -D -m 755 makepak %buildroot/%{_sbindir}/makepak
install -m 755 installwatch/installwatch %buildroot/%{_bindir}
install -D -m 755 installwatch/installwatch.so %buildroot/%{_libdir}/checkinstall/installwatch.so
install -m 755 checkinstallrc-dist %buildroot/%{_libdir}/checkinstall/checkinstallrc
install -D -m 644 locale/checkinstall-ja.mo %buildroot%_libdir/checkinstall/locale/ja/LC_MESSAGES/checkinstall.mo
perl -pi -e "s!#PREFIX#!%_prefix!" %buildroot%_bindir/installwatch
perl -pi -e "s!/lib/!/%_lib/!" %buildroot%_bindir/*
install -D -m 755  %{_sourcedir}/checkinstall-vine-info %buildroot/%{_bindir}/checkinstall-vine-info

# icons
%__mkdir_p %{buildroot}%{_datadir}/pixmaps
%__cp -a %{_sourcedir}/checkinstall-vine-64x64.svg %{buildroot}%{_datadir}/pixmaps

# desktop menu entry
%__mkdir -p %{buildroot}%{_datadir}/applications
%__cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Name=Ceckinstall Information
Name[ja]=Checkinstall について
Comment=about Ceckinstall 
Comment[ja]=Checkinstall の説明ダイアログ
Exec=/usr/bin/checkinstall-vine-info
Icon=/usr/share/pixmaps/checkinstall-vine-64x64.svg
Terminal=false
MultipleArgs=false
Type=Application
Categories=Application;Development;
EOF

%files
%defattr(-,root,root,755)
%doc README INSTALL RELNOTES BUGS TODO CREDITS COPYING
%{_bindir}/installwatch
%{_bindir}/checkinstall
%{_bindir}/checkinstall-vine-info
%{_sbindir}/makepak
%dir %{_libdir}/checkinstall/
%{_libdir}/checkinstall/checkinstallrc
%{_libdir}/checkinstall/installwatch.so
%lang(ja) %{_libdir}/checkinstall/locale/ja
%dir %{_libdir}/checkinstall/locale/
%{_datadir}/pixmaps/checkinstall-vine-64x64.svg
%{_datadir}/applications/checkinstall.desktop 

%changelog
* Wed Mar 3 2010 TANAKA hiroaki <mosaicist@par.odn.ne.jp> 1.6.2-3
- debug wrong icon-name

* Tue Mar 2 2010 TANAKA hiroaki <mosaicist@par.odn.ne.jp> 1.6.2-2
- add gnome application entry
- add unofficial icon svg

* Tue Feb 27 2010 TANAKA hiroaki <mosaicist@par.odn.ne.jp> 1.6.2-1
- new source version 1.6.2
- drop old patches all
- add patch2,3,4,5 from mandriva pkg 1.6.2.16-1mdv2010.1

* Mon Jul  6 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.6.1-4vl5
- add patch1 to fix x86_64 env. (/usr/lib -> /usr/lib64)
- renumber patch1 -> patch2
- change BR: gettext -> gettext-devel

* Thu Oct 23 2008 Shu KONNO <owa@bg.wakwak.com> 1.6.1-3vl5
- added checkinstall-1.6.1-readlink.patch

* Sun Oct 12 2008 Tanaka hiroaki<mosaicist@par.odn.ne.jp>
- convert spec.file to utf-8 without BOM format 

* Mon Sep 22 2008 Tanaka hiroaki<mosaicist@par.odn.ne.jp>
- update spec file to follow Vine Linux guide line

* Mon Nov  6 2006 Tanaka hiroaki<mosaicist@par.odn.ne.jp> 1.6.1
- update the patch

* Fri Dec 10 2005 Tanaka hiroaki<mosaicist@par.odn.ne.jp> 1.6.0-1.1
- fix bug

* Thu Aug 25 2005 Tanaka hiroaki<mosaicist@par.odn.ne.jp> 1.6.0-1.
- new version

* Sat Feb 12 2005 Tanaka hiroaki<mosaicist@par.odn.ne.jp> 1.6.0-beta4.1.
- require rpm-build
- update the patch 0

* Mon May  3 2004 Gz Waschk <waschk@linux-mandrake.com> 1.6.0-0.beta3.1mdk
- rediff patch
- new version

* Thu Aug 28 2003 Gz Waschk <waschk@linux-mandrake.com> 1.6.0-0.beta2.1mdk
- fix installation
- rediff the patch
- 1.6.0beta2

* Mon Jul 28 2003 Gz Waschk <waschk@linux-mandrake.com> 1.5.3-5mdk
- own %{_libdir}/checkinstall/

* Fri Jul 25 2003 Gz Waschk <waschk@linux-mandrake.com> 1.5.3-4mdk
- move makepak to %_sbindir as configured in checkinstall

* Fri Jul 25 2003 Gz Waschk <waschk@linux-mandrake.com> 1.5.3-3mdk
- move the preload library to %{_libdir}/checkinstall/
- merge all patches into one

* Fri Jul 25 2003 Gz Waschk <waschk@linux-mandrake.com> 1.5.3-2mdk
- remove library package, no soname
- can't be noarch, there's a shared library
- patch2: docdir is /usr/share/doc, default release is 1mdk

* Wed Sep 11 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.5.3-1mdk
- 1.5.3
- url

* Mon Jun 17 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.5.2-1mdk
- 1.5.2

* Wed Apr 10 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.5.1-3mdk
- patch1: fixes PREFIX in installwatch ( we don't use make install in %%install )

* Sat Jan 12 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.5.1-2mdk
- %name-paths.patch : fix paths in scripts ( thx Rainer Koschnick ) 

* Fri Jan 11 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.5.1-1mdk
- apply changes from Jorg Pitts <jorgp@bartnet.net> (thx! )
	- new release 1.5.1
	- split package and make rpmlint happier

* Thu Apr 12 2001 Gregory Letoquart <gletoquart@mandrakesoft.com> 1.4.1-1mdk
- First package