Blob Blame Raw
%global  gnome_extensions_dir  %{_datadir}/gnome-shell/extensions/
%global  UUID                  historymanager-prefix-search@sustmidown.centrum.cz
%global  install_destination   %{buildroot}/%{gnome_extensions_dir}/%{UUID}

Name:       gnome-shell-extension-historymanager-prefix-search
Summary:    Use PageUp and PageDown to search for previous GNOME Shell commands
Version:    10
Release:    1%{?dist}
URL:        https://github.com/sustmi/gnome-shell-extension-historymanager-prefix-search
License:    GPLv3+
BuildArch:  noarch

# See the latest releases here:
# https://github.com/sustmi/gnome-shell-extension-historymanager-prefix-search/releases
Source0: https://github.com/sustmi/gnome-shell-extension-historymanager-prefix-search/archive/v%{version}.tar.gz

Requires: gnome-shell >= 3.8
Requires: gnome-shell-extension-common

BuildRequires: gettext

# (CentOS 7 build environment doesn't support Recommends tag.)
%if 0%{?fedora}
Recommends: gnome-tweak-tool
%endif

# CentOS 7 doesn't automatically do gschema compilation yet.
%if 0%{?rhel}
BuildRequires: glib2
%endif

Provides:  gnome-shell-extension-sustmi-historymanager-prefix-search = %{version}-%{release}
Obsoletes: gnome-shell-extension-sustmi-historymanager-prefix-search <= 3.0-17



%description
The GNOME Shell Run Command dialog (Alt-F2) and Looking Glass let you
cycle through the history of previous commands with the arrow keys, but
there's currently no built-in way to search or do autocompletion for
commands. With HistoryManager Prefix Search, you can type the beginning
of a command, and then hit the PageUp and PageDown keys to cycle through
previous commands which match the prefix you typed.

**NOTE:** After installing, each user that wants HistoryManager Prefix
Search must still enable the extension before it will take effect. You
can do so a few different ways:

* If you've already installed the GNOME Shell integration web browser
  plugin, go to <https://extensions.gnome.org/local/>, find the
  extension, and click the switch to "ON."
* Open GNOME Tweak Tool, go to the Extensions tab, find the extension,
  and click the switch to "ON."
* Open a terminal or the desktop's command dialog and run:
  gnome-shell-extension-tool --enable historymanager-prefix-search@sustmidown.centrum.cz

You may also need to restart GNOME Shell (open the command dialog with
Alt-F2, type `r`, and hit enter), or log out and log back in.



%prep
%autosetup -n %{name}-%{version}



%build
# Nothing to build.



%install
mkdir -p %{install_destination}
cp --recursive --preserve=mode,timestamps  ./*  %{install_destination}/
# Remove duplicate copies of license and README.
rm  %{install_destination}/README.md  %{install_destination}/COPYING
# Makefile is only used in upstream's builds for the GNOME Extensions website.
rm %{install_destination}/Makefile

# historymanager doesn't have any schemas (for now?).
# historymanager doesn't have any translations because it has no visible text.



%files
%license COPYING
%doc README.md
%{gnome_extensions_dir}/%{UUID}/





%changelog
* Wed Oct 25 2017 Andrew Toskin <andrew@tosk.in> - 10-1
- Split HistoryManager Prefix Search into its own package.