summaryrefslogtreecommitdiffstats
path: root/libmustache.spec
blob: 1a4dd723f820261a11e862b24f9cce6e1c2cd29f (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# remirepo/fedora spec file for libmustache
#
# Copyright (c) 2017-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global libname      libmustache
%global gh_commit    0e333ded3d8d57fc9551b68c409cdbefd06eb0b2
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner     jbboehr
%global gh_project   %{libname}

%global spec_commit  b96be9fd4c6d6984828d93169fe7e86d8a8aec2f
%global spec_short   %(c=%{spec_commit}; echo ${c:0:7})
%global spec_owner   jbboehr
%global spec_project mustache-spec

Name:    %{libname}
Version: 0.5.0
Release: 1%{?dist}
Summary: Mustache C++ library

License: MIT
URL:     https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz
Source1: https://github.com/%{spec_owner}/%{spec_project}/archive/%{spec_commit}/%{spec_project}-%{spec_short}.tar.gz

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  libyaml-devel
BuildRequires:  libstdc++-devel
%if 0%{?rhel} == 7
BuildRequires:  devtoolset-6-toolchain
%else
BuildRequires:  gcc-c++
%endif


%description
C++ implementation of Mustache[1].

[1] http://mustache.github.io/


%package devel
Summary:  Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package -n mustache
Summary:  Command line tools from %{libname}
Group:    Applications/System
Requires: %{name}%{?_isa} = %{version}-%{release}

%description -n mustache
This package provides mustache command line tool split off %{libname}.


%prep
%setup -qn %{gh_project}-%{gh_commit} -a1
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-6/enable
g++ --version
%endif

rmdir spec
mv %{spec_project}-%{spec_commit} spec
autoreconf -fiv


%build
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-6/enable
%endif

%configure

make %{?_smp_mflags}


%install
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-6/enable
%endif
make install DESTDIR=%{buildroot}

rm %{buildroot}%{_libdir}/*.{a,la}


%check
%if 0%{?rhel} == 7
source /opt/rh/devtoolset-6/enable
%endif
make test


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


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE*
%{_libdir}/%{libname}.so.5*

%files devel
%{_includedir}/mustache/
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/mustache.pc

%files -n mustache
%{_bindir}/mustache


%changelog
* Sat Nov 10 2018 Remi Collet <remi@remirepo.net> - 0.5.0-1
- update to 0.5.0
- bump soname to 5

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

* Wed Feb  7 2018 Remi Collet <remi@remirepo.net> - 0.4.4-1
- Update to 0.4.4

* Fri Jun  9 2017 Remi Collet <remi@remirepo.net> - 0.4.3-2
- use GCC 6.2 from devtoolset-6 on EL-7

* Thu Jun  8 2017 Remi Collet <remi@remirepo.net> - 0.4.3-1
- initial package