Skip to content

Commit

Permalink
[packaging] Supported omim-tool-project.maps.me.spec for co8.
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and maksimandrianov committed Sep 14, 2020
1 parent be4d410 commit c00f12e
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
%define source_dir_name %{project}-%{version}
%define project_src %{project_root}/%{source_dir_name}

%define _empty_manifest_terminate_build 0

Name: %{project_tool_name}
Summary: %{project_tool_name} - a utility from %{project} (maps.me project)
Version: %{version}
Expand All @@ -18,7 +20,12 @@ Url: http://github.com/mapsme/%{project}
Buildroot: %{_tmppath}/%{project_tool_name}-%{version}-%(%{__id_u} -n)
Source: %{source_dir_name}.tar.gz
BuildRequires: cmake3
%if %{rhel} == 7
BuildRequires: devtoolset-7-gcc-c++
%endif
%if %{rhel} == 8
BuildRequires: gcc-c++
%endif
BuildRequires: git
BuildRequires: qt5-qtbase-devel
BuildRequires: sqlite-devel
Expand All @@ -37,8 +44,10 @@ cd %{project_src}/..
%setup -T -D

%build
%if %{rhel} == 7
source /opt/rh/devtoolset-7/enable
echo | %{project_root}/configure.sh
%endif
echo | %{project_src}/configure.sh
mkdir -p %{project_root}/build
cd %{project_root}/build
cmake3 %{project_src} -DSKIP_DESKTOP=ON
Expand All @@ -49,7 +58,7 @@ make %{?_smp_mflags} %{tool_name}
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_datadir}/%{project_tool_name}
cp -Rp %{project_root}/build/%{tool_name} %{buildroot}/%{_bindir}/%{project_tool_name}
cp -Rp %{project_root}/data %{buildroot}/%{_datadir}/%{project_tool_name}
cp -Rp %{project_src}/data %{buildroot}/%{_datadir}/%{project_tool_name}

%files
%defattr(-,root,root,-)
Expand Down

0 comments on commit c00f12e

Please sign in to comment.