]>
Commit | Line | Data |
---|---|---|
baa8ed58 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | %bcond_without unibilium | |
5 | ||
6 | Summary: Library for easy processing of keyboard entry from terminal-based programs | |
7 | Name: libtermkey | |
8 | Version: 0.18 | |
bf2b2185 | 9 | Release: 2 |
baa8ed58 ER |
10 | License: MIT |
11 | Group: Libraries | |
12 | Source0: http://www.leonerd.org.uk/code/libtermkey/%{name}-%{version}.tar.gz | |
13 | # Source0-md5: 3be2e3e5a851a49cc5e8567ac108b520 | |
14 | Patch0: fix-test-compile.patch | |
15 | URL: http://www.leonerd.org.uk/code/libtermkey/ | |
16 | BuildRequires: gcc | |
17 | BuildRequires: libtool | |
18 | %if %{with unibilium} | |
19 | BuildRequires: unibilium-devel | |
20 | %else | |
21 | BuildRequires: pkgconfig(tinfo) | |
22 | %endif | |
23 | %if %{with tests} | |
24 | BuildRequires: /usr/bin/prove | |
25 | %endif | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This library allows easy processing of keyboard entry from | |
30 | terminal-based programs. It handles all the necessary logic to | |
31 | recognise special keys, UTF-8 combining, and so on, with a simple | |
32 | interface. | |
33 | ||
34 | %package devel | |
35 | Summary: Development files needed for %{name} | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
38 | ||
39 | %description devel | |
40 | Development files needed for %{name}. | |
41 | ||
42 | %prep | |
43 | %setup -q | |
44 | ||
45 | %build | |
46 | %{__make} \ | |
47 | CC="%{__cc}" \ | |
48 | CFLAGS="%{rpmcflags}" \ | |
49 | PREFIX=%{_prefix} \ | |
50 | LIBDIR=%{_libdir} | |
51 | ||
52 | %if %{with tests} | |
53 | %{__make} test \ | |
54 | CC="%{__cc}" \ | |
55 | CFLAGS="%{rpmcflags}" | |
56 | %endif | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | %{__make} install \ | |
61 | PREFIX=%{_prefix} \ | |
62 | LIBDIR=%{_libdir} \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
65 | rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la} | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post -p /sbin/ldconfig | |
71 | %postun -p /sbin/ldconfig | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc LICENSE | |
76 | %attr(755,root,root) %{_libdir}/libtermkey.so.*.*.* | |
77 | %{_libdir}/libtermkey.so.1 | |
78 | ||
79 | %files devel | |
80 | %defattr(644,root,root,755) | |
81 | %{_libdir}/libtermkey.so | |
82 | %{_includedir}/termkey.h | |
83 | %{_pkgconfigdir}/termkey.pc | |
84 | %{_mandir}/man3/termkey_*.3* | |
85 | %{_mandir}/man7/termkey.7* |