summaryrefslogtreecommitdiffstats
path: root/libui.spec
blob: 5d09cf4ab3257e15fe6d83e889b434e58da76535 (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
# remirepo/fedora spec file for libui
#
# Copyright (c) 2016 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#

%global gh_commit   5de62d073f189a92af7b5386ad1ea184c21d1e14
%global gh_date     20161026
%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.3.%{gh_date}git%{gh_short}%{?dist}
License:       MIT
Group:         System Environment/Libraries

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}
Group:      Development/Libraries
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}


%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 uitable.h; do
  install -Dpm 644 $header %{buildroot}%{_includedir}/$header
done


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


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


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


%changelog
* 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