summaryrefslogtreecommitdiffstats
path: root/libhandlebars.spec
blob: 531614a6580c01a89df1e6644b6538e679e4722e (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
# remirepo/fedora spec file for libhandlebars
#
# Copyright (c) 2017 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global libname       libhandlebars
%global gh_commit     9863359d28fa57cabe5494a00453ff12e8581d56
%global gh_short      %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner      jbboehr
%global gh_project    handlebars.c

%global hspec_commit  4afc86f830797a59896405a6b15f47bf452b3a5d
%global hspec_short   %(c=%{hspec_commit}; echo ${c:0:7})
%global hspec_owner   jbboehr
%global hspec_project handlebars-spec

%global mspec_commit  83b0721610a4e11832e83df19c73ace3289972b9
%global mspec_short   %(c=%{mspec_commit}; echo ${c:0:7})
%global mspec_owner   mustache
%global mspec_project spec

Name:    %{libname}
Version: 0.6.4
Release: 1%{?dist}
Group:   System Environment/Libraries
Summary: Handlebars C library

License: LGPLv2+
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/%{hspec_owner}/%{hspec_project}/archive/%{hspec_commit}/%{hspec_project}-%{hspec_short}.tar.gz
Source2: https://github.com/%{mspec_owner}/%{mspec_project}/archive/%{mspec_commit}/%{mspec_project}-%{mspec_short}.tar.gz

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  libyaml-devel
BuildRequires:  json-c-devel
BuildRequires:  libtalloc-devel
BuildRequires:  pcre-devel
BuildRequires:  lmdb-devel
BuildRequires:  check-devel >= 0.9.9
%if 0%{?fedora}
# Else, use upstream generated files
BuildRequires:  bison >= 3.0.2
BuildRequires:  flex >= 2.5.35
%endif


%description
C implementation of handlebars.js[1], developed in conjunction with
php-handlebars[2] and handlebars.php[3].

[1] http://handlebarsjs.com/
[2] https://github.com/jbboehr/php-handlebars
[3] https://github.com/jbboehr/php-handlebars


%package devel
Group:    Development/Libraries
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 handlebarsc
Summary:  Command line tools from %{libname}
Group:    Applications/System
Requires: %{name}%{?_isa} = %{version}-%{release}

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


%prep
%setup -qn %{gh_project}-%{gh_commit} -a1 -a2

mkdir spec
mv %{hspec_project}-%{hspec_commit} spec/handlebars
mv %{mspec_project}-%{mspec_commit} spec/mustache
./bootstrap


%build
%configure

make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}

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


%check
make test


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


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

%files devel
%doc CHANGELOG.md
%{_includedir}/handlebars*
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/handlebars.pc

%files -n handlebarsc
%{_bindir}/handlebarsc


%changelog
* Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 0.6.4-1
- update to 0.6.4

* Sat Jun 10 2017 Remi Collet <remi@remirepo.net> - 0.6.3-2
- latest upstream git snapshot for EL-7

* Fri Jun  9 2017 Remi Collet <remi@remirepo.net> - 0.6.3-1
- initial package