diff options
Diffstat (limited to 'libhandlebars.spec')
-rw-r--r-- | libhandlebars.spec | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/libhandlebars.spec b/libhandlebars.spec new file mode 100644 index 0000000..900ca4e --- /dev/null +++ b/libhandlebars.spec @@ -0,0 +1,123 @@ +# 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 8ea5f7163281e29e078cedf28801c7fb72493ed5 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner jbboehr +%global gh_project handlebars.c + +%global hspec_commit e553716c186961477983d20c6e852d9a387f0668 +%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.3 +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: bison +BuildRequires: flex +BuildRequires: libyaml-devel +BuildRequires: json-c-devel +BuildRequires: libtalloc-devel +BuildRequires: pcre-devel +BuildRequires: check-devel >= 0.9.12 + + +%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 +* Fri Jun 9 2017 Remi Collet <remi@remirepo.net> - 0.6.3-1 +- initial package |