aboutsummaryrefslogtreecommitdiff
path: root/extras/packaging/libfruit.spec
blob: dc6319272739eb36d2a0978443af5d61350b82fd (plain)
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
#
# spec file for package fruit
#

Name:           libfruit
Version:        @Fruit_VERSION@
Release:        0
Summary:        Dependency Injection Framework For C++
License:        Apache-2.0
Group:          Development/Libraries/C and C++
Url:            https://github.com/google/fruit
Source0:        fruit-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  boost-devel
Suggests:       libfruit-devel = %{version}

%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires:  gcc-c++ >= 5.0.0
%else
# OpenSUSE doesn't include the bugfix release version component in the package version.
BuildRequires:  gcc-c++ >= 5.0
%endif

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Fruit is a dependency injection framework for C++, loosely inspired by the
Guice framework for Java.
It uses C++ metaprogramming together with some new C++11 features to detect
most injection problems at compile-time.

%package devel
Summary:        Dependency Injection Framework For C++ - Development Files
License:        Apache-2.0
Group:          Development/Libraries/C and C++
Url:            https://github.com/google/fruit
Requires:       libfruit = %{version}

%description devel
Fruit is a dependency injection framework for C++, loosely inspired by the
Guice framework for Java.
It uses C++ metaprogramming together with some new C++11 features to detect
most injection problems at compile-time.

%prep
%setup -q -n fruit-%{version}

%build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_BUILD_TYPE=RelWithDebInfo

%{__make} %{?jobs:-j%jobs}

%install
%{__make} DESTDIR=%{buildroot} install

%files
%defattr(-,root,root)
%{_libdir}/libfruit.*

%files devel
%defattr(-,root,root)
%{_includedir}/fruit

%changelog