# 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 f9b9d977a2804a0cf8d849e2fd50e1516289a6e7 %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.4.4 Release: 2%{?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.4* %files devel %{_includedir}/mustache/ %{_libdir}/%{libname}.so %{_libdir}/pkgconfig/mustache.pc %files -n mustache %{_bindir}/mustache %changelog * Mon Feb 26 2018 Remi Collet - 0.4.4-2 - F28 cleanup * Wed Feb 7 2018 Remi Collet - 0.4.4-1 - Update to 0.4.4 * Fri Jun 9 2017 Remi Collet - 0.4.3-2 - use GCC 6.2 from devtoolset-6 on EL-7 * Thu Jun 8 2017 Remi Collet - 0.4.3-1 - initial package