File conkeror.spec of Package conkeror

# spec file for package conkeror
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define commit fe92781

Name:           conkeror
Version:        1.0.4
Release:        0
Summary:        Keyboard-oriented customizable and extensible web browser
License:        MPL-1.1 or GPL-2.0 or LGPL-2.1
Group:          Productivity/Networking/Web/Browsers
Source1:        %{name}.svg
Patch0:         ctrl-click.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  hicolor-icon-theme
%if 0%{?suse_version}
BuildRequires:  update-desktop-files

Requires:       firefox

Conkeror is a keyboard-oriented, highly-customizable,
highly-extensible web browser based on Mozilla XULRunner, written
mainly in JavaScript, and inspired by exceptional software such as
Emacs and vi. Conkeror features a sophisticated keyboard system,
allowing users to run commands and interact with content in powerful
and novel ways. It is self-documenting, featuring a powerful
interactive help system.

%setup -q -n %{name}-%{version}-%{commit}
%patch0 -p1


make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}"

# install icon ...
install -m 0644 -D %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
# ... and fix desktop file accordingly
sed -i 's@Icon=browser@Icon=conkeror@' %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file conkeror

# fix the destdir in run script
sed -i 's@/usr/local@/usr@g' %{buildroot}%{_bindir}/%{name}

# these files are copied manually to different place
rm -rf %{buildroot}%{_datadir}/doc/%{name}

%doc CREDITS COPYING contrib/config/common.js

openSUSE Build Service is sponsored by