#1 Simplify packaging and fix EPEL build
Merged 4 years ago by ignatenkobrain. Opened 4 years ago by ignatenkobrain.
rpms/ ignatenkobrain/boost-nowide upgrade  into  master

file modified
+22 -29
@@ -2,10 +2,15 @@ 

  %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})

  %global gh_owner  artyom-beilis

  %global gh_project nowide

+ %if 0%{?rhel} && 0%{?rhel} <= 7

+ %global boost_suffix 169

+ %global cmake_suffix 3

+ %global cmake %%cmake%{cmake_suffix}

+ %endif

  

  Name:       boost-nowide

  Version:    0

- Release:    20171030.git%{gh_short}%{?dist}

+ Release:    20190813.git%{gh_short}%{?dist}

  Summary:    Boost.Nowide makes cross platform Unicode aware programming easier.

  

  License:    Boost
@@ -20,15 +25,10 @@ 

  Patch0: https://patch-diff.githubusercontent.com/raw/%{gh_owner}/%{gh_project}/pull/27.patch#/%{name}-PR-27.patch

  

  

- %if 0%{?fedora}

- BuildRequires:  gcc-c++

- BuildRequires: cmake

- BuildRequires: boost-devel

- %else

- # this isn't in EPEL yet ... but it will be soon

- BuildRequires:  boost157-devel

- BuildRequires:  cmake3

- %endif

+ BuildRequires: cmake%{?cmake_suffix}

+ BuildRequires: make

+ BuildRequires: gcc-c++

+ BuildRequires: boost%{?boost_suffix}-devel

  

  # To create the docs

  BuildRequires: doxygen
@@ -37,12 +37,7 @@ 

  Requires: %{name} == %{version}-%{release}

  # nowide is a header only library on linux

  Provides: boost-nowide-static = %{version}-%{release}

- %if 0%{?fedora}

- Requires: boost-devel

- %else

- # this isn't in EPEL yet ... but it will be soon

- Requires:  boost157-devel

- %endif

+ Requires: boost%{?boost_suffix}-devel

  

  Summary: The header files to compile against boost.nowide

  
@@ -71,13 +66,9 @@ 

  

  %build

  # Need to build the static for install and tests to pass

- %if 0%{?fedora}

- %cmake -DNOWIDE_BUILD_STATIC=ON -DNOWIDE_SYSTEM_INCLUDE=ON

- %else

- %cmake3 -DNOWIDE_BUILD_STATIC=ON -DNOWIDE_SYSTEM_INCLUDE=ON \

-         -DBOOST_INCLUDEDIR=/usr/include/boost157 \

-         -DBOOST_LIBRARYDIR=%{_libdir}/boost157

- %endif

+ %cmake . -DNOWIDE_BUILD_STATIC=ON -DNOWIDE_SYSTEM_INCLUDE=ON \

+          -DBOOST_INCLUDEDIR=%{_includedir}/boost%{?boost_suffix} \

+          -DBOOST_LIBRARYDIR=%{_libdir}/boost%{?boost_suffix}

  %__make %{gh_project}

  

  # Build the docs
@@ -89,10 +80,9 @@ 

  # It's header only on linux so remove the libraries generated

  rm -f %{buildroot}/usr/lib*/libnowide*

  

- # move to boost157 directory in epel

- %if 0%{?rhel}

- mkdir -p %{buildroot}%{_includedir}/boost157/boost

- mv %{buildroot}%{_includedir}/boost/nowide %{buildroot}%{_includedir}/boost157/boost/

+ %if %{defined boost_suffix}

+ mkdir -p %{buildroot}%{_includedir}/boost%{boost_suffix}/boost

+ mv %{buildroot}%{_includedir}/boost/nowide %{buildroot}%{_includedir}/boost%{boost_suffix}/boost/

  rmdir %{buildroot}%{_includedir}/boost

  %endif

  
@@ -107,13 +97,16 @@ 

  

  

  %files devel

- %if 0%{?fedora}

+ %if %{undefined boost_suffix}

  %{_includedir}/boost/nowide

  %else

- %{_includedir}/boost157/boost/nowide

+ %{_includedir}/boost%{boost_suffix}/boost/nowide

  %endif

  

  %changelog

+ * Wed Jul 24 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0-20190813.gitec9672b

+ - Simplify packaging and fix EPEL build

+ 

  * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-20171030.gitec9672b

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

rebased onto 06e4b54

4 years ago

rebased onto 2328594

4 years ago

Pull-Request has been merged by ignatenkobrain

4 years ago