3 %bcond_without tests # build without tests
4 %bcond_without unibilium
6 Summary: Library for easy processing of keyboard entry from terminal-based programs
12 Source0: http://www.leonerd.org.uk/code/libtermkey/%{name}-%{version}.tar.gz
13 # Source0-md5: 710ee4e48d8550e65f3adf627aac8465
14 Patch0: 0001-build-take-into-account-CFLAGS-LDFLAGS-for-tests.patch
15 Patch1: 0002-include-stdlib.h-for-putenv.patch
16 URL: http://www.leonerd.org.uk/code/libtermkey/
18 BuildRequires: libtool
19 BuildRequires: pkgconfig
21 BuildRequires: unibilium-devel >= 0.1.0
23 BuildRequires: pkgconfig(tinfo)
26 BuildRequires: /usr/bin/prove
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 This library allows easy processing of keyboard entry from
32 terminal-based programs. It handles all the necessary logic to
33 recognise special keys, UTF-8 combining, and so on, with a simple
37 Summary: Development files needed for %{name}
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Development files needed for %{name}.
48 %{__sed} -i -e '/^all:/s/$(DEMOS)//' Makefile
53 CFLAGS="%{rpmcflags}" \
61 CFLAGS="%{rpmcflags}" \
66 rm -rf $RPM_BUILD_ROOT
70 DESTDIR=$RPM_BUILD_ROOT
72 rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
75 rm -rf $RPM_BUILD_ROOT
77 %post -p /sbin/ldconfig
78 %postun -p /sbin/ldconfig
81 %defattr(644,root,root,755)
83 %attr(755,root,root) %{_libdir}/libtermkey.so.*.*.*
84 %{_libdir}/libtermkey.so.1
87 %defattr(644,root,root,755)
88 %{_libdir}/libtermkey.so
89 %{_includedir}/termkey.h
90 %{_pkgconfigdir}/termkey.pc
91 %{_mandir}/man3/termkey_*.3*
92 %{_mandir}/man7/termkey.7*