diff --git a/.gitignore b/.gitignore index 11ab592..1923a1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /utf8_v2_3_4.zip +/utfcpp-2.3.6.tar.gz diff --git a/sources b/sources index 1869822..0ebf6e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c5e9522fde3debcad5e8922d796b2bd0 utf8_v2_3_4.zip +SHA512 (utfcpp-2.3.6.tar.gz) = 8dfa4e3e3597ef5a8454adf72a0dc95dbbaf18eb4590e9cecf30c372e3488dd8b405b1d17e3db874bfd9756c7ce2c2961d6096f13b44dea42cc88a801787c459 diff --git a/utf8cpp.spec b/utf8cpp.spec index c8212e1..23b6f85 100644 --- a/utf8cpp.spec +++ b/utf8cpp.spec @@ -2,14 +2,14 @@ %global debug_package %{nil} Name: utf8cpp -Version: 2.3.4 -Release: 13%{?dist} +Version: 2.3.6 +Release: 1%{?dist} Summary: A simple, portable and lightweight library for handling UTF-8 encoded strings - License: Boost -URL: http://utfcpp.sourceforge.net/ -Source0: http://downloads.sourceforge.net/utfcpp/utf8_v2_3_4.zip -BuildArch: noarch +URL: https://github.com/nemtrif/utfcpp +Source0: https://github.com/nemtrif/utfcpp/archive/v%{version}/utfcpp-%{version}.tar.gz +BuildRequires: cmake3 +BuildRequires: gcc-c++ %description %{summary}. @@ -38,34 +38,49 @@ Features include: This project currently only contains header files, which can be found in the %{name}-devel package. - %prep -%setup -q -c %{name}-%{version} - +%setup -q -n utfcpp-%{version} +mkdir build %build -# nothing to do - +pushd build +%cmake3 \ + -DUTF8_TESTS=ON \ + -DUTF8_SAMPLES=ON \ + .. +%make_build +popd %install -mkdir -p %{buildroot}%{_includedir} -install -p -m0644 source/utf8.h %{buildroot}%{_includedir}/utf8.h -mkdir -p %{buildroot}%{_includedir}/utf8 -for i in checked.h core.h unchecked.h; do - install -p -m0644 source/utf8/${i} %{buildroot}%{_includedir}/utf8/${i} -done - +pushd build +%make_install +popd +pushd %{buildroot}%{_includedir} +mv utf8cpp/utf8{,.h} . +popd +rm -r %{buildroot}%{_libdir}/cmake/utf8cpp + +%check +pushd build +%make_build test +popd %files devel -%doc doc/* +%doc README.md samples/docsample.cpp %{_includedir}/utf8.h %dir %{_includedir}/utf8 %{_includedir}/utf8/checked.h %{_includedir}/utf8/core.h %{_includedir}/utf8/unchecked.h - %changelog +* Mon Oct 21 2019 Dominik 'Rathann' Mierzejewski - 2.3.6-1 +- update to 2.3.6 +- new upstream location +- use cmake and run tests +- switch main package to archful per + https://docs.fedoraproject.org/en-US/packaging-guidelines/#_do_not_use_noarch + * Sat Jul 27 2019 Fedora Release Engineering - 2.3.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild