%global debug_package %nil %global _gitcommit 6b16eb6b42462e317b7711e52e1148fda09a87c6 %global _gitdate 20241231 Name: lunar-calendar Version: 0.1git%{_gitdate} Release: 1%{?dist} Summary: Chinese Lunar Calendar License: BSD-2 URL: https://github.com/infinet/lunar-calendar Source0: https://github.com/infinet/lunar-calendar/archive/%{_gitcommit}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: gcc glibc-devel %description The Chinese Lunar Calendar is mostly based on the motion of the Moon. It is said due to the complicate interaction, mostly from the Sun and the Earth, the motion of Moon is very hard to predict, especially on the long run. Luckily Hong Kong Observatory has published a conversion table for the period from 1901 to 2100. It is the most trustworthy Lunar Calendar on the web so far. Lunar calendar beyond 1901-2100 range is generated by finding solar terms and moon phases uses VSOP87 planetary theory and LEA-406 lunar theory. The full version of LEA-406 and VSOP87 are used by default. This package skips the Python version and just installs C version. %prep %autosetup -n %{name}-%{_gitcommit} sed -i c/testastro.c \ -e 's:\(parsejplhorizon("\):\1%{_datadir}/%{name}/:' %build cd c %make_build %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{_datadir}/%{name} %{buildroot}%{_bindir} install -m755 c/lunarcal c/testastro %{buildroot}%{_bindir}/ install -m644 c/jpl_{sun,moon}.txt %{buildroot}%{_datadir}/%{name}/ %files %license COPYRIGHT %doc README.md %{_bindir}/lunarcal %{_bindir}/testastro %dir %{_datadir}/%{name} %{_datadir}/%{name}/jpl_*.txt %changelog * Mon May 5 2025 Martin RS - 0.1git20241231 - update * Mon May 3 2024 Martin RS - 0.1git20240327 - update * Mon Feb 20 2023 Martin RS - 0.1git20220916 - update * Fri Jan 14 2022 Martin RS - 0.1git20211120 - new for Fedora