# remirepo/fedora spec file for libhandlebars # # Copyright (c) 2017-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests %global soname 9 %global libname libhandlebars %global gh_commit bc10ea7c40b25ec4678e44a2d4d6640336be789b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner jbboehr %global gh_project handlebars.c %global hspec_commit 3eb919f19988f37a539779c08342d2ce50aa75d0 %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: 1.0.0 Release: 2%{?dist} Summary: Handlebars C library # SPDX # The executable and the test suite are now licensed under the AGPLv3 or later. # The library remains licensed under the LGPLv2.1 or later. License: LGPL-2.1-or-later 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 # Use pcre2 instead of pcre Patch0: pcre2.patch BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: libyaml-devel BuildRequires: json-c-devel BuildRequires: libtalloc-devel BuildRequires: pcre2-devel BuildRequires: lmdb-devel %if %{with tests} BuildRequires: check-devel >= 0.12 %endif %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 Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} # previous soname Conflicts:%{name}5-devel < %{version} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package -n handlebarsc License: AGPL-3.0-or-later Summary: Command line tools from %{libname} 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 %patch -P0 -p1 -b .pcre2 mkdir spec mv %{hspec_project}-%{hspec_commit} spec/handlebars mv %{mspec_project}-%{mspec_commit} spec/mustache ./bootstrap %build %configure \ %if %{without tests} --disable-check %endif make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} rm %{buildroot}%{_libdir}/*.{a,la} %if %{with tests} %check make test %endif %files %license LICENSE* %{_libdir}/%{libname}.so.%{soname}* %files devel %doc CHANGELOG.md %{_includedir}/handlebars* %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/handlebars.pc %files -n handlebarsc %{_bindir}/handlebarsc %changelog * Fri Nov 29 2024 Remi Collet - 1.0.0-2 - use pcre2 instead of pcre using patch from https://github.com/jbboehr/handlebars.c/pull/99 * Mon Nov 28 2022 Remi Collet - 1.0.0-1 - update to 1.0.0 - soname bump * Mon Dec 7 2020 Remi Collet - 0.7.3-1 - update to 0.7.3 - drop patch merged upstream * Wed Aug 19 2020 Remi Collet - 0.7.2-2 - F33 build with patch for -Werror=format-security reported as https://github.com/jbboehr/handlebars.c/issues/87 * Wed Apr 22 2020 Remi Collet - 0.7.2-1 - update to 0.7.2 * Sun Apr 19 2020 Remi Collet - 0.7.1-1 - update to 0.7.1 * Sat Apr 18 2020 Remi Collet - 0.7.0-2 - build with upstream patch for _hardened_ldflags * Fri Apr 17 2020 Remi Collet - 0.7.0-1 - update to 0.7.0 - drop patches merged upstream - open https://github.com/jbboehr/handlebars.c/issues/81 _hardened_ldflags break build * Wed Feb 19 2020 Remi Collet - 0.6.4-4 - add fix for GCC 10 from https://github.com/jbboehr/handlebars.c/pull/76 - add fix for new check library adapted from upstream * Tue Jun 26 2018 Remi Collet - 0.6.4-3 - F28 rebuild * Mon Feb 26 2018 Remi Collet - 0.6.4-2 - F28 cleanup * 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