SHA256
1
0
forked from pool/evemu
Alexei Sorokin 2016-08-01 22:03:03 +00:00 committed by Git OBS Bridge
parent cd962cbdae
commit dd909d1e3f
2 changed files with 53 additions and 12 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 1 21:12:25 UTC 2016 - sor.alexei@meowr.ru
- Fix python binding crashes.
- Add python3-evemu package.
- Remove "optimised" Python byte-code files.
-------------------------------------------------------------------
Mon Aug 1 11:10:55 UTC 2016 - jslaby@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package evemu
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@ -24,12 +24,12 @@ Release: 0
Summary: Input Event Device Emulation Library
License: GPL-3.0
Group: Hardware/Other
Url: http://freedesktop.org/wiki/Evemu
Url: https://freedesktop.org/wiki/Evemu
Source: http://archive.ubuntu.com/ubuntu/pool/universe/e/%{name}/%{name}_%{version}.orig.tar.xz
BuildRequires: asciidoc
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: python3-devel
BuildRequires: xmlto
@ -63,6 +63,18 @@ data, create emulation devices and replay data from kernel evdev
This package provides the Python2 bindings for evemu.
%package -n python3-%{name}
Summary: Python3 bindings for evemu
Group: Development/Languages/Python
Requires: %{soname}%{sover} = %{version}
%description -n python3-%{name}
The evemu library and tools are used to describe devices, record
data, create emulation devices and replay data from kernel evdev
(input event) devices.
This package provides the Python3 bindings for evemu.
%package devel
Summary: Development files for evemu
Group: Development/Tools/Other
@ -78,21 +90,38 @@ This package provides the development files.
%prep
%setup -q
evdev_sover="$(basename "$(readlink -f %{_libdir}/libevdev.so)")"
sed -i \
-e 's|\"%{soname}.so\"|\"%{soname}.so.%{sover}\"|' \
-e "s|\"libevdev.so\"|\"$evdev_sover\"|" \
python/%{name}/{base,const}.py
%build
%configure \
--disable-static \
--disable-silent-rules \
--disable-tests
make %{?_smp_mflags}
%global _configure ../configure
for py in python2 python3; do
export PYTHON=$py
mkdir -p build-$py
pushd build-$py
%configure \
--disable-static \
--disable-silent-rules \
--disable-tests
make %{?_smp_mflags}
popd
done
%install
%make_install
%make_install -C build-python2
%make_install -C build-python3
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}/%{_bindir}
%fdupes %{buildroot}/%{_mandir}/man?/
%fdupes %{buildroot}/%{python_sitelib}/%{name}/
# Remove useless "optimised" Python byte-code.
rm -f %{buildroot}%{python_sitelib}/%{name}/*.pyo \
%{buildroot}%{python3_sitelib}/%{name}/__pycache__/*.opt-?.pyc
%fdupes %{buildroot}%{_bindir}/
%fdupes %{buildroot}%{_mandir}/
%post -n %{soname}%{sover} -p /sbin/ldconfig
@ -114,6 +143,11 @@ find %{buildroot} -type f -name "*.la" -delete -print
%doc COPYING
%{python_sitelib}/%{name}/
%files -n python3-%{name}
%defattr(-,root,root)
%doc COPYING
%{python3_sitelib}/%{name}/
%files devel
%defattr(-,root,root)
%{_includedir}/%{name}.h