# 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 - 0.6.4-1 - update to 0.6.4 * Sat Jun 10 2017 Remi Collet - 0.6.3-2 - latest upstream git snapshot for EL-7 * Fri Jun 9 2017 Remi Collet - 0.6.3-1 - initial package