]> git.pld-linux.org Git - packages/libtermkey.git/blob - libtermkey.spec
Need pkgconfig or unibilium check
[packages/libtermkey.git] / libtermkey.spec
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.20
9 Release:        1
10 License:        MIT
11 Group:          Libraries
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/
17 BuildRequires:  gcc
18 BuildRequires:  libtool
19 BuildRequires:  pkgconfig
20 %if %{with unibilium}
21 BuildRequires:  unibilium-devel >= 0.1.0
22 %else
23 BuildRequires:  pkgconfig(tinfo)
24 %endif
25 %if %{with tests}
26 BuildRequires:  /usr/bin/prove
27 %endif
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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
34 interface.
35
36 %package devel
37 Summary:        Development files needed for %{name}
38 Group:          Development/Libraries
39 Requires:       %{name} = %{version}-%{release}
40
41 %description devel
42 Development files needed for %{name}.
43
44 %prep
45 %setup -q
46
47 # No need for demos
48 %{__sed} -i -e '/^all:/s/$(DEMOS)//' Makefile
49
50 %build
51 %{__make} \
52         CC="%{__cc}" \
53         CFLAGS="%{rpmcflags}" \
54         PREFIX=%{_prefix} \
55         LIBDIR=%{_libdir} \
56         VERBOSE=1
57
58 %if %{with tests}
59 %{__make} test \
60         CC="%{__cc}" \
61         CFLAGS="%{rpmcflags}" \
62         VERBOSE=1
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 %{__make} install \
68         PREFIX=%{_prefix} \
69         LIBDIR=%{_libdir} \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
73
74 %clean
75 rm -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.070608 seconds and 3 git commands to generate.