SHA256
1
0
forked from pool/keybinder

Accepting request 810837 from home:michals

OBS-URL: https://build.opensuse.org/request/show/810837
OBS-URL: https://build.opensuse.org/package/show/X11:lxde/keybinder?expand=0&rev=1
This commit is contained in:
Michael Vetter 2020-06-02 12:39:00 +00:00 committed by Git OBS Bridge
commit 663f699180
7 changed files with 369 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

26
example_gi.py Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/python
"""
example.py
Created in 2010 by Ulrik Sverdrup <ulrik.sverdrup@gmail.com>
This work is placed in the public domain.
"""
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Keybinder', '3.0')
from gi.repository import Gtk
from gi.repository import Keybinder
def callback(keystr, user_data):
print("Handling", keystr, user_data)
print("Event time:", Keybinder.get_current_event_time())
Gtk.main_quit()
if __name__ == '__main__':
keystr = "<Ctrl>A"
Keybinder.init()
Keybinder.bind(keystr, callback, "Keystring %s (user data)" % keystr)
print("Press", keystr, "to handle keybinding and quit")
Gtk.main()

3
keybinder-0.3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6073bb5f626f75c4a6f25291b32673af02d47e735b56f9d471150d678ac0b5fa
size 31727

View File

@ -0,0 +1,11 @@
--- keybinder-0.3.1/docs/keybinder-docs.sgml 2015-11-06 16:08:46.000000000 +0100
+++ keybinder-0.3.1/docs/keybinder-docs.sgml 2020-05-27 23:08:53.420091878 +0200
@@ -23,7 +23,7 @@
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
- <xi:include href="xml/tree_index.sgml"/>
+ <xi:include href="xml/tree_index.sgml"><xi:fallback /></xi:include>
</chapter>
<index id="api-index-full">
<title>API Index</title>

105
keybinder.changes Normal file
View File

@ -0,0 +1,105 @@
-------------------------------------------------------------------
Tue Jun 2 12:14:21 UTC 2020 - Michal Suchanek <msuchanek@suse.com>
- Update URL - project moved to different github account.
-------------------------------------------------------------------
Fri May 29 08:44:19 UTC 2020 - Michal Suchanek <msuchanek@suse.com>
- Use %%license compatibility cruft.
-------------------------------------------------------------------
Wed May 27 21:11:24 UTC 2020 - Michal Suchanek <msuchanek@suse.de>
- Add doc index fallback to fix build on Tumbleweed.
* Add keybinder-doc-xml-fallback.patch
- Drop python2 bindings on Tumbleweed. Python bindings provided by gi.
-------------------------------------------------------------------
Sat Aug 19 10:33:02 UTC 2017 - seife+obs@b1-systems.com
- add specfile hack so that lua.h is still found in tumbleweed
- remove specfile conditions for old distributions
-------------------------------------------------------------------
Sun Dec 25 13:59:46 UTC 2016 - seife+obs@b1-systems.com
- update to version 0.3.1:
* Use ``XkbFreeKeyboard`` to fix memory leak
* Fix deprecated directives in build system
-------------------------------------------------------------------
Fri Feb 22 19:10:41 UTC 2013 - i@marguerite.su
- update version 0.3.0
* Patch Makefile.am to use ACLOCAL_AMFLAGS=-I m4
* Add two functions to fix gobject-introspection (gir) bindings
* Build a gobject-introspection ``.typelib`` file for libkeybinder
* Add a reference manual for libkeybinder using gtk-doc
-------------------------------------------------------------------
Mon Feb 4 14:32:26 UTC 2013 - coolo@suse.com
- update license to new format
-------------------------------------------------------------------
Tue Mar 27 12:57:01 UTC 2012 - gber@opensuse.org
- correct license
- correct build dependencies
- use upstream tarball
-------------------------------------------------------------------
Mon Feb 20 15:28:57 UTC 2012 - gber@opensuse.org
- ensure example scripts are not executable
-------------------------------------------------------------------
Mon Feb 20 13:30:06 UTC 2012 - gber@opensuse.org
- fixed build dependencies
-------------------------------------------------------------------
Sun Jan 8 16:10:41 UTC 2012 - gber@opensuse.org
- build against lua51 on > 12.1
- remove /usr/bin/env shebang from example scripts
-------------------------------------------------------------------
Sun Jan 30 12:38:42 UTC 2011 - gber@opensuse.org
- fix -devel subpackage dependencies
- minor cleanup
-------------------------------------------------------------------
Mon Jan 3 13:54:36 UTC 2011 - prusnak@opensuse.org
- split lua files into a separate -lua subpackage
-------------------------------------------------------------------
Fri Dec 24 10:10:24 UTC 2010 - gber@opensuse.org
- use proper categories
-------------------------------------------------------------------
Thu Dec 23 17:00:32 UTC 2010 - gber@opensuse.org
- rpmlint cleanup
- make -devel package depend on library
- do not put non-python libraries in Development/Libraries/Python
group
- depend on versioned python-base
- recompressed sources
- enable compiler output
- include code examples
-------------------------------------------------------------------
Thu Dec 2 15:21:40 UTC 2010 - prusnak@opensuse.org
- spec cleanup
-------------------------------------------------------------------
Sat Sep 11 20:38:16 UTC 2010 - malcolmlewis@opensuse.org
- Initial build

200
keybinder.spec Normal file
View File

@ -0,0 +1,200 @@
#
# spec file for package keybinder
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1500
%define do_python 0
%else
%define do_python 1
%endif
%define libname libkeybinder0
Name: keybinder
Version: 0.3.1
Release: 0
Summary: A Library for Registering Global Keyboard Shortcuts
License: GPL-2.0+ and MIT
Group: Development/Libraries/Other
Url: https://github.com/kupferlauncher
Source: https://github.com/kupferlauncher/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: example_gi.py
Patch: keybinder-doc-xml-fallback.patch
BuildRequires: ed
BuildRequires: fdupes
# For Documentation Directory Ownership
BuildRequires: glib2-devel
BuildRequires: gnome-common
BuildRequires: gobject-introspection-devel
BuildRequires: libtool
%if 0%{?do_python}
BuildRequires: python-devel
BuildRequires: python-gobject2-devel
BuildRequires: python-gtk-devel
%endif
BuildRequires: lua51-devel
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xrender)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Library for registering global keyboard shortcuts. Keybinder
works with GTK-based applications using the X Window System.
The library contains:
- A C library, libkeybinder
- Lua bindings, lua-keybinder
- Python bindings, python-keybinder
- An examples directory with programs in C, Lua, Python and Vala.
%package -n %{libname}
Summary: Library Package for Keybinder
Group: System/Libraries
%description -n %{libname}
Library for registering global keyboard shortcuts. Keybinder
works with GTK-based applications using the X Window System.
The library contains:
- A C library, libkeybinder
- Lua bindings, lua-keybinder
- Python bindings, python-keybinder
- An examples directory with programs in C, Lua, Python and Vala.
%package devel
Summary: Development Files for Keybinder
Group: Development/Libraries/Other
Requires: %{libname} = %{version}
%description devel
This package contains development files needed for developing applications
based on keybinder.
%package lua
Summary: Lua Files for Keybinder
Group: Development/Libraries/Other
Requires: %{libname} = %{version}
%description lua
This package contains Lua files for applications based on keybinder.
%package -n python-%{name}
Summary: Python Bindings for Keybinder
Group: Development/Libraries/Python
Requires: %{libname} = %{version}
Requires: python-base = %{py_ver}
Requires: python-gobject2
Requires: python-gtk
%description -n python-%{name}
This package contains python bindings for keybinder.
%package -n typelib-1_0-Keybinder-0_0
Summary: A Library for Registering Global Keyboard Shortcuts -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-Keybinder-0_0
Library for registering global keyboard shortcuts. Keybinder
works with GTK-based applications using the X Window System.
This package provides the GObject Introspection bindings for libkeybinder0.
# Compatibility cruft
# there is no %%license prior to SLE12
%if %{undefined _defaultlicensedir}
%define license %doc
%else
# filesystem before SLE12 SP3 lacks /usr/share/licenses
%if 0%(test ! -d %{_defaultlicensedir} && echo 1)
%define _defaultlicensedir %{_defaultdocdir}
%endif
%endif
# End of compatibility cruft
%prep
%setup -q
%patch -p1
cp -a %{SOURCE1} examples
find examples/ \( -name '*.py' -o -name '*.lua' \) -print -exec sh -c '
ed -s "$1" 2>/dev/null <<\EOF
,s/^#!\/usr\/bin\/env /#!\/usr\/bin\//
w
EOF
' {} {} \;
rm examples/.gitignore
%build
NOCONFIGURE=1 ./autogen.sh
export CPPFLAGS="`pkg-config --cflags lua5.1`"
%{configure}\
--enable-gtk-doc \
%if ! 0%{?do_python}
--disable-python \
%endif
--disable-static
make %{?_smp_mflags} V=1
%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -exec rm -f {} +
find examples -type f -exec chmod 644 {} +
%fdupes %{buildroot}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files -n %{libname}
%defattr(-,root,root)
%license COPYING
%doc AUTHORS NEWS README
%{_libdir}/libkeybinder.so.*
%files devel
%defattr(-,root,root)
%doc examples
%{_includedir}/keybinder.h
%{_libdir}/libkeybinder.so
%{_libdir}/pkgconfig/keybinder.pc
%{_datadir}/gtk-doc/html/%{name}/
%{_datadir}/gir-1.0/Keybinder-0.0.gir
%files lua
%defattr(-,root,root)
%{_libdir}/lua/*/keybinder.so
%if 0%{?do_python}
%files -n python-%{name}
%defattr(-,root,root)
%{python_sitearch}/%{name}
%endif
%files -n typelib-1_0-Keybinder-0_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Keybinder-0.0.typelib
%changelog