• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# spec file for package fruit
3#
4
5Name:           libfruit
6Version:        @FRUIT_VERSION@
7Release:        0
8Summary:        Dependency Injection Framework For C++
9License:        Apache-2.0
10Group:          Development/Libraries/C and C++
11Url:            https://github.com/google/fruit
12Source0:        fruit-%{version}.tar.gz
13
14BuildRequires:  cmake
15BuildRequires:  boost-devel
16Suggests:       libfruit-devel = %{version}
17
18%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
19BuildRequires:  gcc-c++ >= 5.0.0
20%else
21# OpenSUSE doesn't include the bugfix release version component in the package version.
22BuildRequires:  gcc-c++ >= 5.0
23%endif
24
25BuildRoot:      %{_tmppath}/%{name}-%{version}-build
26
27%description
28Fruit is a dependency injection framework for C++, loosely inspired by the
29Guice framework for Java.
30It uses C++ metaprogramming together with some new C++11 features to detect
31most injection problems at compile-time.
32
33%package devel
34Summary:        Dependency Injection Framework For C++ - Development Files
35License:        Apache-2.0
36Group:          Development/Libraries/C and C++
37Url:            https://github.com/google/fruit
38Requires:       libfruit = %{version}
39
40%description devel
41Fruit is a dependency injection framework for C++, loosely inspired by the
42Guice framework for Java.
43It uses C++ metaprogramming together with some new C++11 features to detect
44most injection problems at compile-time.
45
46%prep
47%setup -q -n fruit-%{version}
48
49%build
50cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DINSTALL_LIBRARY_DIR=%{_libdir} -DCMAKE_BUILD_TYPE=RelWithDebInfo
51
52%{__make} %{?jobs:-j%jobs}
53
54%install
55%{__make} DESTDIR=%{buildroot} install
56
57%files
58%defattr(-,root,root)
59%{_libdir}/libfruit.*
60
61%files devel
62%defattr(-,root,root)
63%{_includedir}/fruit
64
65%changelog
66