]> git.pld-linux.org Git - packages/libtermkey.git/blame - libtermkey.spec
up to 0.22
[packages/libtermkey.git] / libtermkey.spec
CommitLineData
baa8ed58
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4%bcond_without unibilium
5
6Summary: Library for easy processing of keyboard entry from terminal-based programs
7Name: libtermkey
713a2b27 8Version: 0.22
8810bbb0 9Release: 1
baa8ed58
ER
10License: MIT
11Group: Libraries
12Source0: http://www.leonerd.org.uk/code/libtermkey/%{name}-%{version}.tar.gz
713a2b27 13# Source0-md5: 08bf514d59660391c3a21b3977a16c8c
721993b3
ER
14Patch0: 0001-build-take-into-account-CFLAGS-LDFLAGS-for-tests.patch
15Patch1: 0002-include-stdlib.h-for-putenv.patch
baa8ed58
ER
16URL: http://www.leonerd.org.uk/code/libtermkey/
17BuildRequires: gcc
18BuildRequires: libtool
82678d91 19BuildRequires: pkgconfig
baa8ed58 20%if %{with unibilium}
82678d91 21BuildRequires: unibilium-devel >= 0.1.0
baa8ed58
ER
22%else
23BuildRequires: pkgconfig(tinfo)
24%endif
25%if %{with tests}
26BuildRequires: /usr/bin/prove
27%endif
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31This library allows easy processing of keyboard entry from
32terminal-based programs. It handles all the necessary logic to
33recognise special keys, UTF-8 combining, and so on, with a simple
34interface.
35
36%package devel
37Summary: Development files needed for %{name}
38Group: Development/Libraries
39Requires: %{name} = %{version}-%{release}
40
41%description devel
42Development files needed for %{name}.
43
44%prep
45%setup -q
46
8810bbb0
ER
47# No need for demos
48%{__sed} -i -e '/^all:/s/$(DEMOS)//' Makefile
49
baa8ed58
ER
50%build
51%{__make} \
52 CC="%{__cc}" \
53 CFLAGS="%{rpmcflags}" \
54 PREFIX=%{_prefix} \
8810bbb0
ER
55 LIBDIR=%{_libdir} \
56 VERBOSE=1
baa8ed58
ER
57
58%if %{with tests}
59%{__make} test \
60 CC="%{__cc}" \
8810bbb0
ER
61 CFLAGS="%{rpmcflags}" \
62 VERBOSE=1
baa8ed58
ER
63%endif
64
65%install
66rm -rf $RPM_BUILD_ROOT
67%{__make} install \
68 PREFIX=%{_prefix} \
69 LIBDIR=%{_libdir} \
70 DESTDIR=$RPM_BUILD_ROOT
71
72rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%post -p /sbin/ldconfig
78%postun -p /sbin/ldconfig
79
80%files
81%defattr(644,root,root,755)
82%doc LICENSE
83%attr(755,root,root) %{_libdir}/libtermkey.so.*.*.*
84%{_libdir}/libtermkey.so.1
85
86%files devel
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*
This page took 0.098089 seconds and 4 git commands to generate.