summaryrefslogtreecommitdiffstats
path: root/libui.spec
blob: 9415b864c89b1c4c4a3ec882f1a3d176f04ca799 (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
106
107
108
109
110
111
112
113
114
# remirepo/fedora spec file for libui
#
# Copyright (c) 2016-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#

%global gh_commit   5fa7ba487e67eaffd82cacbdecd014a4ede5bb1e
%global gh_date     20161201
%global gh_short    %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner    andlabs
%global gh_project  libui
%global libname     libui
%global soname      0

Name:          %{libname}
Summary:       Simple and portable GUI library 
Version:       0
Release:       0.5.%{gh_date}git%{gh_short}%{?dist}
License:       MIT

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

%if 0%{?rhel}
BuildRequires: cmake3 >= 3.1.0
%else
BuildRequires: cmake  >= 3.1.0
%endif
BuildRequires: gtk3-devel


%description
Simple and portable (but not inflexible) GUI library in C that uses the native
GUI technologies of each platform it supports. 


%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}.


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

%if 0%{?rhel}
sed -e 's/NOT APPLE/0/' -i CMakeLists.txt
%endif


%build
%if 0%{?rhel}
%cmake3
%else
%cmake
%endif

make %{_smp_mflags}


%install
: Library
install -Dm 755 out/%{libname}.so.%{soname} %{buildroot}%{_libdir}/%{libname}.so.%{soname}
ln -s %{libname}.so.%{soname} %{buildroot}%{_libdir}/%{libname}.so

: Headers
for header in ui.h ui_unix.h; do
  install -Dpm 644 $header %{buildroot}%{_includedir}/$header
done


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


%files
%license LICENSE
%{_libdir}/%{libname}.so.%{soname}*


%files devel
%doc *.md
%doc examples
%{_libdir}/%{libname}.so
%{_includedir}/ui*.h


%changelog
* Mon Feb 26 2018 Remi Collet <remi@fedoraproject.org> - 0-0.5.20161201git5fa7ba4
- F28 cleanup

* Wed Nov  8 2017 Remi Collet <remi@fedoraproject.org> - 0-0.4.20161201git5fa7ba4
- refresh

* Thu Nov  3 2016 Remi Collet <remi@fedoraproject.org> - 0-0.3.20161102gitf56411f
- refresh

* Fri Oct 28 2016 Remi Collet <remi@fedoraproject.org> - 0-0.3.20161026git5de62d0
- refresh

* Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 0-0.2.20161023git0870a30
- update to latest upstream snapshot for pecl/ui

* Tue Oct 25 2016 Remi Collet <remi@fedoraproject.org> - 0-0.1.alpha3.1
- initial package