From a80a60928f8221a4e837c2af7b5501018c4a1300 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Tue, 22 Oct 2019 22:01:58 +0200 Subject: [PATCH 1/2] 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 --- .gitignore | 1 + sources | 2 +- utf8cpp.spec | 50 +++++++++++++++++++++++++++++++++++--------------- 3 files changed, 37 insertions(+), 16 deletions(-) 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 78a8e2c..71ed002 100644 --- a/utf8cpp.spec +++ b/utf8cpp.spec @@ -2,14 +2,15 @@ %global debug_package %{nil} Name: utf8cpp -Version: 2.3.4 -Release: 12%{?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}. @@ -40,24 +41,36 @@ This project currently only contains header files, which can be found in the %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 @@ -66,6 +79,13 @@ done %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 + * Sun Feb 03 2019 Fedora Release Engineering - 2.3.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 399c7349862ee76a2314d13845dcd72db00d89a7 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Tue, 22 Oct 2019 22:02:51 +0200 Subject: [PATCH 2/2] drop extra empty lines --- utf8cpp.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/utf8cpp.spec b/utf8cpp.spec index 71ed002..574342f 100644 --- a/utf8cpp.spec +++ b/utf8cpp.spec @@ -5,7 +5,6 @@ Name: utf8cpp Version: 2.3.6 Release: 1%{?dist} Summary: A simple, portable and lightweight library for handling UTF-8 encoded strings - License: Boost URL: https://github.com/nemtrif/utfcpp Source0: https://github.com/nemtrif/utfcpp/archive/v%{version}/utfcpp-%{version}.tar.gz @@ -39,12 +38,10 @@ Features include: This project currently only contains header files, which can be found in the %{name}-devel package. - %prep %setup -q -n utfcpp-%{version} mkdir build - %build pushd build %cmake3 \ @@ -54,7 +51,6 @@ pushd build %make_build popd - %install pushd build %make_install @@ -77,7 +73,6 @@ popd %{_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