%define pkg_name    gmrun
%define pkg_version 0.9.2
%define pkg_release 4%{?_dist_release}

Summary: Small GTK based 'Run application'
Name:    %{pkg_name}
Version: %{pkg_version}
Release: %{pkg_release}

License: GPL2
Group:   User Interface/X
URL:     https://sourceforge.net/projects/gmrun/
# URL:     https://github.com/rtyler/gmrun

Source: %{name}-%{version}.tar.gz
Patch0: ci_string.h.patch
Patch1: prefs.cc.patch
Patch2: gtkcompletionline.cc.patch

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

BuildRequires:  gtk2-devel
BuildRequires:  popt-devel

Vendor: Project Vine
Distribution: Vine Linux
# Packager: Mihai Bazon <mishoo@infoiasi.ro>
Packager: ara_t


%description
Short GtkEntry for file autocompletion + main.cc that does the needed stuff
for running programs.  This is intended as a replacement to grun, which
(sorry) sucks.  The idea comes from the KDE Window Manager (ALT-F2 in KDE).
Though, GNOME is better :)


%prep
%{__rm} -rf ${RPM_BUILD_ROOT}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
%{configure}
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install-strip DESTDIR=${RPM_BUILD_ROOT}

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


%files
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL README NEWS ChangeLog
%{_bindir}/
%{_datadir}/


%changelog
* Sun May 15 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-4
- rebuild with gcc-5.4.0

* Sun Apr 10 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-3
- correct SPEC file

* Mon Feb 29 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-2
- change group to User Interface/X

* Sun Feb 28 2016 Toshiaki Ara <ara_t@384.jp> 0.23.1-1
- rebuild for Vine Linux
- patch the difference with Commits on Sep 12, 2013

* Sun Aug 03 2003 Mihai Bazon <mishoo@infoiasi.ro> 0.9-2
- fixed a parsing bug in the "run command" function

* Sun Jun 22 2003 Marius FERARU <altblue@n0i.net> 0.9-0.n0i
- version 0.9

* Sat Jun 14 2003 Marius FERARU <altblue@n0i.net> 0.8.1-1.n0i
- rebuild on RHL9

* Sat Aug 17 2002 Mihai Bazon <mishoo@infoiasi.ro>
- Some bugs fixed, specifically the behavior of END/HOME keys (or C-E, C-A),
  and the major one: you could not run a file that has an extension handler
  with some other program than the extension handler :)

* Fri Aug 16 2002 Mihai Bazon <mishoo@infoiasi.ro>
- Fixed bug: filenames can now contain white spaces (will be backslash-ed)
- New feature: can specify application handler per file extension, so you
  can directly type the name of some .cpp file and emacs will show up :)
  see config file for details.
- New feature: can automatically simulate a TAB press after some timeout.
  Check config file for details, key "TabTimeout" (0 to disable).
- New feature: you can now always use "system" for running programs
  (specify --enable-system at configure).

* Fri Oct 19 2001 Mihai Bazon <mishoo@infoiasi.ro>
- Fixed bug with sorting of completion list
- Fixed bug with URL handling
- New parameter: list of execs to be always run in terminal
- New feature: last history line appears directly in edit line, selected

* Wed Aug 01 2001 Mihai Bazon <mishoo@infoiasi.ro>
- Programs are now executed using execv.  We don't use system anymore, thus
  avoiding forking another shell.
- gmrun.spec gets now generated automagically, at ./configure.

* Sun Jul 22 2001 Mihai Bazon <mishoo@infoiasi.ro>
- added "!" history backward search; like in bash, it finds the last command
  which begins with the entered text.
- CTRL-R / CTRL-S don't show two identical consecutive records.

* Thu Jul 19 2001 Mihai Bazon <mishoo@infoiasi.ro>
- added history search capabilities (CTRL-R / CTRL-S, like in bash / Emacs)
- small bug fixes

* Fri Jun 29 2001 Mihai Bazon <mishoo@infoiasi.ro>
- history size configurable from config file
- window appears directly where it should (no more flicker)

* Wed May 14 2001 Mihai Bazon <mishoo@infoiasi.ro>
- added default configuration file (goes to /usr/share/gmrun)

* Wed May 07 2001 Marius Feraru <altblue@n0i.net>
- updated to version 0.5.3 and took over to 0.5.31

* Wed May 03 2001 Marius Feraru <altblue@n0i.net>
- updated to version 0.2.5 and took over to 0.2.51:
	* configuration file with 2 options for now:
		'Terminal' and 'Width'
	* added some more (and hopefully more useful) documentation:
		README.hints, README.gmrunrc and README.icewm

* Wed May 03 2001 Marius Feraru <altblue@n0i.net>
- updated to version 0.2.2:
	* Ctrl-Enter spawns a terminal

* Wed May 02 2001 Marius Feraru <altblue@n0i.net>
- initial RPM build
