]>
Commit | Line | Data |
---|---|---|
d59490c8 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | %bcond_without doc # build doc | |
5 | ||
6 | Summary: Terminfo parsing library | |
7 | Name: unibilium | |
8 | Version: 1.2.0 | |
9 | Release: 1 | |
10 | License: LGPLv3+ | |
11 | Group: Libraries | |
12 | Source0: https://github.com/mauke/unibilium/archive/v%{version}/%{name}-%{version}.tar.gz | |
13 | # Source0-md5: 9b1c97839a880a373da6c097443b43c4 | |
14 | URL: https://github.com/mauke/unibilium | |
15 | BuildRequires: gcc | |
16 | BuildRequires: libtool | |
76150857 | 17 | BuildRequires: pkgconfig |
d59490c8 ER |
18 | %if %{with doc} |
19 | BuildRequires: /usr/bin/pod2man | |
20 | %endif | |
21 | %if %{with tests} | |
22 | BuildRequires: /usr/bin/prove | |
23 | %endif | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | Unibilium is a very basic terminfo library. It doesn't depend on | |
28 | curses or any other library. It also doesn't use global variables, so | |
29 | it should be thread-safe. | |
30 | ||
31 | %package devel | |
32 | Summary: Development files needed for %{name} | |
33 | Group: Development/Libraries | |
34 | Requires: %{name} = %{version}-%{release} | |
35 | ||
36 | %description devel | |
37 | Development files needed for %{name}. | |
38 | ||
39 | %prep | |
40 | %setup -q | |
41 | ||
42 | %build | |
43 | %{__make} \ | |
44 | CC="%{__cc}" \ | |
45 | PREFIX=%{_prefix} \ | |
46 | LIBDIR=%{_libdir} | |
47 | ||
48 | %if %{with tests} | |
49 | %{__make} test | |
50 | %endif | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | %{__make} install \ | |
55 | PREFIX=%{_prefix} \ | |
56 | LIBDIR=%{_libdir} \ | |
57 | DESTDIR=$RPM_BUILD_ROOT | |
58 | ||
59 | rm -vf $RPM_BUILD_ROOT%{_libdir}/*.{a,la} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post -p /sbin/ldconfig | |
65 | %postun -p /sbin/ldconfig | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc Changes | |
70 | %attr(755,root,root) %{_libdir}/libunibilium.so.*.*.* | |
71 | %ghost %{_libdir}/libunibilium.so.0 | |
72 | ||
73 | %files devel | |
74 | %defattr(644,root,root,755) | |
75 | %{_libdir}/libunibilium.so | |
76 | %{_pkgconfigdir}/unibilium.pc | |
77 | %{_includedir}/%{name}.h | |
78 | %{_mandir}/man3/unibi_*.3* | |
79 | %{_mandir}/man3/unibilium.h.3* |