-
Notifications
You must be signed in to change notification settings - Fork 0
/
spectemplate-cmake-lib.spec
68 lines (47 loc) · 1.43 KB
/
spectemplate-cmake-lib.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# template for library from github built with CMake
%undefine _cmake_in_source_build
# Shared library version
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_listing_shared_library_files
%global abi_ver 0
Name:
Version:
Release: 1%{?dist}
Summary:
License:
URL: https://github.com/{{author}}/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
%description
%{summary}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup
# https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/
%build
%cmake
%cmake_build
%install
%cmake_install
# Fedora discourages usage and packaging of static libraries
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries
#find %{buildroot}%{_libdir} -name *.a -exec rm
%check
%ctest
# split files between base and -devel packages
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages
%files
%license LICENSE
%doc README.md
%{_libdir}/lib%{name}.so.%{abi_ver}*
%files devel
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/%{name}.pc
%changelog