Files
c__utilities/c++utilities.spec

77 lines
2.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package c++utilities
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: c++utilities
Version: 3.4.1
Release: 1
License: GPL-2.0+
Summary: Common C++ classes and routines
Url: https://github.com/Martchus/cpp-utilities
Group: System/Packages
Source: cpp-utilities-%{version}.tar.gz
Source1: %{name}-rpmlintrc
BuildRequires: cmake
BuildRequires: gcc-c++ >= 4.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Common C++ classes and routines such as argument parser, IO and conversion utilities.
This text was intentionally added to make the description larger than the summary.
%package devel
Summary: c++utilities devel files
%description devel
Package, Patch, Pattern, and Product Management - developers files
%prep
%setup -q -n cpp-utilities-%{version}
%build
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_BUILD_TYPE=Release \
..
make %{?_smp_mflags}
%install
cd build
make install DESTDIR=%{buildroot} %{?_smp_mflags}
mkdir -p %{buildroot}/usr/lib64/
mv %{buildroot}/usr/lib/libc++utilities.so* %{buildroot}/usr/lib64/
rmdir %{buildroot}/usr/lib/
%post
ldconfig
%postun
ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libc++utilities.so*
%files devel
%defattr(-,root,root)
%{_includedir}/c++utilities
%{_datadir}/c++utilities