OBS-URL: https://build.opensuse.org/package/show/home:mkittler/c++utilities?expand=0&rev=26
79 lines
2.0 KiB
RPMSpec
79 lines
2.0 KiB
RPMSpec
%define reponame c++utilities
|
|
%define soname 4
|
|
|
|
Name: lib%{reponame}
|
|
Version: 4.11.0
|
|
Release: 1
|
|
License: GPL-2.0+
|
|
Summary: Common C++ classes and routines
|
|
Url: https://github.com/Martchus/cpp-utilities
|
|
Group: Development/Libraries/C and C++
|
|
Source: https://github.com/Martchus/cpp-utilities/archive/v%{version}/cpp-utilities-%{version}.tar.gz
|
|
BuildRequires: cmake
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: gcc-c++ >= 5
|
|
BuildRequires: cppunit-devel
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
Common C++ classes and routines such as argument parser, IO and conversion utilities.
|
|
|
|
%package -n lib%{reponame}%{soname}
|
|
Summary: Common C++ classes and routines
|
|
Group: System/Libraries
|
|
|
|
%description -n lib%{reponame}%{soname}
|
|
Common C++ classes and routines such as argument parser, IO and conversion utilities.
|
|
|
|
%package devel
|
|
Summary: Devel files for %{reponame}
|
|
Group: Development/Libraries/C and C++
|
|
Requires: lib%{reponame}%{soname} = %{version}
|
|
Requires: glibc-devel
|
|
Requires: libstdc++-devel
|
|
Requires: cmake
|
|
Requires: pkg-config
|
|
|
|
%description devel
|
|
Development files for %{reponame}
|
|
|
|
%prep
|
|
%setup -q -n cpp-utilities-%{version}
|
|
|
|
%build
|
|
mkdir -p build
|
|
cd build
|
|
cmake -DCMAKE_INSTALL_PREFIX:STRING=%{_prefix} \
|
|
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
|
|
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
|
|
-DCMAKE_BUILD_TYPE:STRING=Release \
|
|
-DLIB_SUFFIX_64:STRING="64" \
|
|
..
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
cd build
|
|
make check %{?_smp_mflags}
|
|
|
|
%install
|
|
cd build
|
|
make install DESTDIR=%{buildroot} %{?_smp_mflags}
|
|
|
|
%post -n lib%{reponame}%{soname}
|
|
ldconfig
|
|
|
|
%postun -n lib%{reponame}%{soname}
|
|
ldconfig
|
|
|
|
%files -n lib%{reponame}%{soname}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/lib%{reponame}.so.%{soname}*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/%{reponame}
|
|
%{_datadir}/%{reponame}
|
|
%{_libdir}/pkgconfig/%{reponame}.pc
|
|
%{_libdir}/lib%{reponame}.so
|