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