]>
Commit | Line | Data |
---|---|---|
13ef38fc JP |
1 | Summary: A date and time library based on the C++11/14/17 <chrono> header |
2 | Name: date | |
082be010 | 3 | Version: 3.0.1 |
13ef38fc JP |
4 | Release: 1 |
5 | License: MIT | |
6 | Group: Development/Libraries | |
7 | Source0: https://github.com/HowardHinnant/date/archive/v%{version}/%{name}-%{version}.tar.gz | |
082be010 | 8 | # Source0-md5: 78902f47f7931a3ae8a320e0dea1f20a |
13ef38fc JP |
9 | URL: https://howardhinnant.github.io/date/date.html |
10 | BuildRequires: cmake >= 3.7 | |
11 | BuildRequires: libstdc++-devel >= 6:5 | |
12 | BuildRequires: rpmbuild(macros) >= 1.605 | |
13 | Requires: tzdata | |
14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
15 | ||
16 | %description | |
17 | A date and time library based on the C++11/14/17 <chrono> header. | |
18 | ||
19 | %package devel | |
20 | Summary: Header files for date library | |
21 | Group: Development/Libraries | |
22 | Requires: %{name} = %{version}-%{release} | |
23 | ||
24 | %description devel | |
25 | Header files for date library. | |
26 | ||
27 | %prep | |
28 | %setup -q | |
13ef38fc JP |
29 | |
30 | %build | |
31 | install -d build | |
32 | cd build | |
33 | %cmake .. \ | |
34 | -DUSE_SYSTEM_TZ_DB:BOOL=ON \ | |
35 | -DBUILD_TZ_LIB:BOOL=ON | |
36 | %{__make} | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | ||
41 | %{__make} -C build install \ | |
42 | DESTDIR=$RPM_BUILD_ROOT | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
061e53ff JP |
47 | %post -p /sbin/ldconfig |
48 | %postun -p /sbin/ldconfig | |
49 | ||
13ef38fc JP |
50 | %files |
51 | %defattr(644,root,root,755) | |
52 | %doc README.md | |
53 | %attr(755,root,root) %{_libdir}/libdate-tz.so.*.*.* | |
54 | %ghost %{_libdir}/libdate-tz.so.3 | |
55 | ||
56 | %files devel | |
57 | %defattr(644,root,root,755) | |
58 | %dir %{_includedir}/date | |
59 | %{_includedir}/date/date.h | |
60 | %{_includedir}/date/tz.h | |
61 | %{_libdir}/cmake/date | |
62 | %{_libdir}/libdate-tz.so |