Summary:	rpm package installer
Summary(ja): 	RPM パッケージのインストーラ
Name:		rpminstall
Version:	1.0.3
Release: 	3%{?_dist_release}
Source0:	%{name}-%{version}.tar.bz2
License:	GPL
Group:		Applications/Administration
#URL:		

Requires: 	gambas2-runtime >= 1.9.48
Requires:	gambas2-gb-gui >= 1.9.48
Requires:	gambas2-gb-form >= 1.9.48
Requires:	gambas2-gb-gtk >= 1.9.48
Requires:	gksu, xdg-utils
BuildRequires:	gambas2-ide >= 1.9.48
#BuildArch:	noarch
AutoReqProv:	no

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Packager:	kazutaka

%description
RPM Install is a symple GUI tool to install RPM packages.

This program is developed with Gambas.

If you are using KDE, install gambas2-gb-qt sub package and then
this program switch to use Qt toolkit.

%description -l ja
RPM Install は RPM パッケージのインストール用のシンプルな GUI
ツールです。 

このプログラムは Gambas で開発されています。

KDE を使っている場合は、gambas2-gb-qt サブパッケージをインス
トールすると、ツールキットに Qt が使用されるようになります。

%prep

%setup -q -n rpminstall

%build
pushd src/%{name}
%{_bindir}/gbc2 -a -t -p 
%{_bindir}/gba2
popd

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__install} -d ${RPM_BUILD_ROOT}/%{_bindir}
%{__install} -d ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpminstall
%{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/pixmaps
%{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/applications

%{__install} -m 755 src/%{name}/rpminstall.gambas ${RPM_BUILD_ROOT}/%{_bindir}/rpminstall
%{__install} -m 755 apt.sh ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpminstall/apt.sh
%{__install} -m 644 src/%{name}/rpminstall.png ${RPM_BUILD_ROOT}/%{_datadir}/pixmaps/rpminstall.png
%{__install} -m 644 rpminstall.desktop ${RPM_BUILD_ROOT}%{_datadir}/applications/rpminstall.desktop



%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc AUTHORS COPYING README ChangeLog help
%{_bindir}/rpminstall
%{_prefix}/lib/rpminstall
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop


%changelog
* Mon Jan 18 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.0.3-3
- change %%{_libdir} to %%{_prefix}/lib (to use same directory on x86_64) 

* Mon Jan 18 2010 Kazutaka HARADA <kazutaka@vinelinux.org> 1.0.3-2
- remove BuildArch: noarch (<BTS:VineLinux:883>)

* Sun Jul 26 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.3-1
- source update
- change source archive structure
- add documents

* Sun Jul 19 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.2-1
- source update: fixes for <BTS:VineLinux:0725>
  - allow to install ix86.rpm on x86_64 system
  - quote installation file path to handle space-contained filenames 
  - update Source1: run apt-get command with eval 

* Thu May 07 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.1-1
- source update
- add Packager tag

* Sat May 02 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.0-1
- source update
- add html help file 
- add Requires: xdg-utils

* Sat Mar 21 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.4.0-1
- source update.

* Sat Jun 21 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.3.2-1
- source update.

* Sat May 17 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.3.1-1
- source update.

* Thu May 15 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.3.0-1
- source update.
- add Source1 to Source3
  (don't include in source archive to minimize executable file size)

* Fri May 02 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.2.2-1
- source update.

* Sat Apr 26 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.2.1-1
- source update.
- add Requires: gksu

* Tue Apr 15 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.2.0-1
- source update.

* Tue Apr 15 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.4-1
- source update.
- add %%{_libdir}/rpminstall/rpm.sh

* Sun Apr 13 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.3-1
- source update.

* Sun Apr 13 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.2-1
- source update.

* Sat Apr 05 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.1-1
- initial build for Vine Linux

