summaryrefslogtreecommitdiffstats
path: root/termbox.spec
blob: c51f1cea00f8251620a3fd596a5ff4da2ba8e81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# remirepo spec file for termbox
#
# Copyright (c) 2014-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit    bbb64e9da7c5590dc7657eb1bece562089656dc1
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date      20140912
%global gh_owner     nsf
%global gh_project   termbox

Name:          termbox
Version:       1.1.2
Release:       2%{?dist}
Summary:       Minimalist library for text-based user interfaces

License:       MIT
URL:           https://github.com/%{gh_owner}/%{gh_project}
Source0:       https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz

BuildRequires: gcc
BuildRequires: waf


%description
Termbox is a library that provides minimalist API which allows the
programmer to write text-based user interfaces.


%package devel
Summary:    Header files and development libraries for %{name}
Requires:   %{name}%{?_isa} = %{version}-%{release}

%description devel
This package contains the header files and development libraries
for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.


%prep
%setup -q -n %{gh_project}-%{gh_commit}

rm waf


%build
export CFLAGS="%{optflags}"

%{_bindir}/waf configure \
    --prefix=%{_prefix} \
    --libdir=%{_libdir}

%{_bindir}/waf build %{?_smp_mflags}


%install
%{_bindir}/waf install \
    --targets=termbox_shared \
    --destdir=%{buildroot}

# F25 workaround
if [ ! -f %{buildroot}%{_includedir}/%{name}.h ]; then
  install -Dpm 644 src/termbox.h %{buildroot}%{_includedir}/%{name}.h
fi


%if 0%{?fedora} < 28 && 0%{?rhel} < 8
%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif


%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/lib%{name}.so.*

%files devel
%doc README.md
%doc src/demo/
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so


%changelog
* Wed Aug 22 2018 Remi Collet <remi@remirepo.net> - 1.1.2-2
- F29 cleanup

* Tue Mar 20 2018 Remi Collet <remi@remirepo.net> - 1.1.2-1
- update to 1.1.2

* Mon Feb 26 2018 Remi Collet <remi@remirepo.net> - 1.1.0-3
- F28 cleanup

* Sun Sep 11 2016 Remi Collet <remi@fedoraproject.org> - 1.1.0-2
- fix F25 build

* Thu Sep  1 2016 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
- update to 1.1.0

* Fri Sep 12 2014 Remi Collet <remi@fedoraproject.org> - 1.1.0-0.1.20140912git7cdd648
- initial package