diff --git a/8.0.1.tar.gz b/8.0.1.tar.gz new file mode 100644 index 0000000..5c5edf9 Binary files /dev/null and b/8.0.1.tar.gz differ diff --git a/fmt.spec b/fmt.spec new file mode 100644 index 0000000..481f79c --- /dev/null +++ b/fmt.spec @@ -0,0 +1,59 @@ +%undefine __cmake_in_source_build +Name: fmt +Version: 8.0.1 +Release: 1 +License: MIT +Summary: Small, safe and fast formatting library for C++ +URL: https://github.com/fmtlib/fmt +Source0: https://github.com/fmtlib/fmt/archive/%{version}.tar.gz +BuildRequires: gcc gcc-c++ ninja-build cmake +%description +C++ Format is an open-source formatting library for C++. It can be used as a +safe alternative to printf or as a fast alternative to IOStreams. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +%description devel +This package contains the header file for using %{name}. + +%prep +%autosetup -p1 + +%build +%cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON +cmake --build ./ %{?_smp_flags} --verbose + +%install +install -d -m 0755 %{buildroot}/%{_includedir}/%{name} +install -d -m 0755 %{buildroot}/%{_libdir} +install -d -m 0755 %{buildroot}/%{_libdir}/cmake/%{name} +install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig +cp -arf include/fmt/* %{buildroot}/%{_includedir}/%{name} +cp -arf lib%{name}.so %{buildroot}/%{_libdir} +cp -arf lib%{name}.so.8.0.1 %{buildroot}/%{_libdir} +cp -arf lib%{name}.so.8 %{buildroot}/%{_libdir} +cp -arf fmt.pc %{buildroot}/%{_libdir}/pkgconfig +cp -arf *.cmake %{buildroot}/%{_libdir}/cmake/%{name} + + +%check +ctest -VV %{?_smp_flags} + +%files +%license LICENSE.rst +%doc ChangeLog.rst README.rst +%{_libdir}/lib%{name}.so.8* + +%files devel +%{_includedir}/%{name} +%{_libdir}/lib%{name}.so +%{_libdir}/cmake/%{name} +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +* Sat Aug 7 2021 liyanan - 8.0.1-1 +- package init diff --git a/fmt.yaml b/fmt.yaml new file mode 100644 index 0000000..65ca976 --- /dev/null +++ b/fmt.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: fmtlib/fmt +tag_prefix: "" +separator: "-"