# ---------------------------------------------------------------------- copyright and license --- # # file: tapper.spec, generated from: etc/tapper.spec.in # # Copyright © 2014, 2016—2017, 2019, 2020 Van de Bugger. # # This file is a part of Tapper. # # Tapper is free software: you can redistribute it and/or modify it under the terms of the GNU # General Public License as published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # Tapper is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along with Tapper. If not, # see . # # SPDX-License-Identifier: GPL-3.0-or-later # # ---------------------------------------------------------------------- copyright and license --- # In OpenSuse documentation files are expected to be in `/usr/share/doc/packages/${name}`, while # `make` by default installs documents to `/usr/share/doc/${name}`. `rpmbuild` fails because it # can't find files it expected location. # # I would expect OpenSuse's `$configure` macro passes `--docdir` option to `configure` command, # bit it does not. Let's fix it: # %if 0%{?suse_version} %global configure %{configure} --docdir=%{_docdir}/%{name} %endif %global appid io.sourceforge.kbd-tapper %global ver 0.4.4 %global rel 0.vdb.1 # Mageia does not have pandoc program. I can sacrifice man page on Mageia. # TODO: How to detect Mageia? Name: tapper Version: %{ver} Release: %{rel}%{?dist} Summary: Keyboard layout selector for Gnome Shell, X Window System and Wayland License: GPLv3+ URL: https://kbd-tapper.sourceforge.io/ Source0: https://sourceforge.net/projects/kbd-tapper/files/0.4.4/%{name}-%{ver}-%{rel}.tar.gz # Fedora packaging guidelines say dependency on coreutils, gzip, shadow-utils should not be # declared. BuildRequires: make BuildRequires: pandoc BuildRequires: pkgconfig BuildRequires: gcc-c++ >= 4.8 # Need -std=c++11. BuildRequires: m4 %if 0%{?fedora} BuildRequires: perl-interpreter %endif %if 0%{?suse_version} BuildRequires: perl-base %endif BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(giomm-2.4) >= 2.54 BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libinput) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xtst) # Packager tag is not used intentionally, accordingly Fedora packaging guidelines. # Packager should be specified in `.rpmmacros'. %description Tapper is a keyboard layout selector for Gnome Shell, X Window System and Wayland. Tapper runs in background, when an assigned key is tapped, Tapper activates the corresponding keyboard layout. Tapper unique feature is using modifier keys for activating keyboard layouts without losing modifier's functionality. %prep %setup -q -n %{name}-%{ver}-%{rel} %{__mkdir} _build %{__ln_s} ../conf''igure _build/conf''igure # rpmlint complains "configure-without-libdir-spec". Let's hide configure from rpmlint. %build cd _build %{configure} \ --enable-libinput \ --enable-man \ --disable-rpm \ --disable-html \ --disable-dependency-tracking \ --srcdir=.. \ userunitdir=%{_userunitdir} \ CHGRP=true %{make_build} %install cd _build %{make_install} %if 0%{?fedora} %{__rm} %{buildroot}%{_docdir}/%{name}/LICENSE.md %{__rm} %{buildroot}%{_docdir}/%{name}/GPLv3.txt %endif %files %defattr( -, root, root, - ) %attr( -, -, input ) %{_bindir}/%{name} %{_datadir}/applications/%{appid}.desktop %{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml %{_mandir}/man1/%{name}.1.gz %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/* %if 0%{?fedora} %license LICENSE.md %license GPLv3.txt %endif %changelog * Wed May 06 2020 Van de Bugger 0.4.4-0.vdb.1 - Updated to 0.4.4. * Tue Mar 10 2020 Van de Bugger 0.4.3-0.vdb.1 - Updated to 0.4.3. * Wed Nov 13 2019 Van de Bugger 0.4.2-0.vdb.2 - Workarounded build problem on OpenSuse. - giomm-2.4 >= 2.54 required. - license is Fedora-specific macro. * Wed Aug 14 2019 Van de Bugger 0.4.2-0.vdb.1 - Updated to 0.4.2. * Tue Aug 06 2019 Van de Bugger 0.4.1-0.vdb.1 - Updated to 0.4.1. * Mon Jul 29 2019 Van de Bugger 0.4.0-0.vdb.1 - Updated to 0.4.0. - rpm macros used instead of plain commands. - Appropriate BuildRequires tags added. - BuildRequires tags use pkgconfig instead of devel rpms. - Full Source0 specified. - License files installed into licenses directory. * Fri Mar 10 2017 Van de Bugger 0.3.1-1.vdb - Updated to 0.3.1. * Thu Jan 19 2017 Van de Bugger 0.3.0-1.vdb - Updated to 0.3.0. - New dependencies added: gcc-c++ 4.8, glib2-devel, json-glib-devel. * Fri Dec 02 2016 Van de Bugger 0.2.2-1.vdb - Updated to 0.2.2. * Sun Jan 31 2016 Van de Bugger 0.2.1-1.vdb - Updated to 0.2.1. - Pandoc added to build requirements (its required to build man page). - configure run with --enable-man option. - CPPFLAGS dropped — it is not required any more because debug log is not enabled by default. - Man page added to the package. * Sat Jan 16 2016 Van de Bugger 0.2-1.vdb - Updated to 0.2. - Dropped dependency on glib2 (because of dropped Gnome support). - Updated description. - configure run with --disable-rpm --disable-html options. - configure run with --libdir option to make rpmlint happy. - clean action dropped accordingly to Fedora guidelines. * Wed Jul 23 2014 Van de Bugger 0.1-1.vdb - Initial revision. # end of file #