From baa8ed58fdda83e0abc625e092097fc6f5fce3c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 14 Sep 2016 22:23:14 +0300 Subject: [PATCH] new, version 0.18 based on fedora package, bdfe3d4 --- fix-test-compile.patch | 9 +++++ libtermkey.spec | 85 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 fix-test-compile.patch create mode 100644 libtermkey.spec diff --git a/fix-test-compile.patch b/fix-test-compile.patch new file mode 100644 index 0000000..8dc4650 --- /dev/null +++ b/fix-test-compile.patch @@ -0,0 +1,9 @@ +diff -uNr libtermkey-0.18.orig/t/05read.c libtermkey-0.18/t/05read.c +--- libtermkey-0.18.orig/t/05read.c 2015-10-06 23:52:28.000000000 +0200 ++++ libtermkey-0.18/t/05read.c 2016-04-14 14:37:56.533341783 +0200 +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include "../termkey.h" + #include "taplib.h" diff --git a/libtermkey.spec b/libtermkey.spec new file mode 100644 index 0000000..ed7f6b5 --- /dev/null +++ b/libtermkey.spec @@ -0,0 +1,85 @@ +# +# Conditional build: +%bcond_without tests # build without tests +%bcond_without unibilium + +Summary: Library for easy processing of keyboard entry from terminal-based programs +Name: libtermkey +Version: 0.18 +Release: 1 +License: MIT +Group: Libraries +Source0: http://www.leonerd.org.uk/code/libtermkey/%{name}-%{version}.tar.gz +# Source0-md5: 3be2e3e5a851a49cc5e8567ac108b520 +Patch0: fix-test-compile.patch +URL: http://www.leonerd.org.uk/code/libtermkey/ +BuildRequires: gcc +BuildRequires: libtool +%if %{with unibilium} +BuildRequires: unibilium-devel +%else +BuildRequires: pkgconfig(tinfo) +%endif +%if %{with tests} +BuildRequires: /usr/bin/prove +%endif +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +This library allows easy processing of keyboard entry from +terminal-based programs. It handles all the necessary logic to +recognise special keys, UTF-8 combining, and so on, with a simple +interface. + +%package devel +Summary: Development files needed for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Development files needed for %{name}. + +%prep +%setup -q + +%build +%{__make} \ + CC="%{__cc}" \ + CFLAGS="%{rpmcflags}" \ + PREFIX=%{_prefix} \ + LIBDIR=%{_libdir} + +%if %{with tests} +%{__make} test \ + CC="%{__cc}" \ + CFLAGS="%{rpmcflags}" +%endif + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + PREFIX=%{_prefix} \ + LIBDIR=%{_libdir} \ + DESTDIR=$RPM_BUILD_ROOT + +rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc LICENSE +%attr(755,root,root) %{_libdir}/libtermkey.so.*.*.* +%{_libdir}/libtermkey.so.1 + +%files devel +%defattr(644,root,root,755) +%{_libdir}/libtermkey.so +%{_includedir}/termkey.h +%{_pkgconfigdir}/termkey.pc +%{_mandir}/man3/termkey_*.3* +%{_mandir}/man7/termkey.7* -- 2.44.0