%global debug_package %{nil} Name: kavita Version: 0.8.3.2 Release: 2.git.6.cf77f2a License: GPLv3 Summary: Cross-platform reading server Url: https://github.com/Kareadita/Kavita Source0: https://github.com/Kareadita/Kavita/archive/refs/tags/v%{version}.tar.gz Source1: %{name}.sysusers Source2: %{name}.tmpfiles.conf Source3: %{name}.service # Prevents building as a self-contained bundle Patch0: build.patch ExclusiveArch: x86_64 aarch64 BuildRequires: systemd-rpm-macros BuildRequires: dotnet-host dotnet-sdk-8.0 BuildRequires: nodejs >= 18.20.4 BuildRequires: nodejs-npm Requires: dotnet-runtime-8.0 Requires: aspnetcore-runtime-8.0 %{?sysusers_requires_compat} %description Kavita is a fast, feature rich, cross platform reading server. Built with a focus for being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family! %prep %autosetup -n Kavita-%{version} %pre %sysusers_create_compat %{SOURCE1} %build %ifarch x86_64 %global rid linux-x64 %endif %ifarch aarch64 %global rid linux-arm64 %endif ./build.sh %{rid} %install %__mkdir_p %{buildroot}%{_datadir}/%{name} cd _output/%{rid}/Kavita/ %global wlibs *.dll %global libs *.so* %__install -Dm 0644 config/appsettings.json %{buildroot}%{_sysconfdir}/%{name}/appsettings.json %__chmod 0755 %{wlibs} %{buildroot}%{_datadir}/%{name} %__chmod 0755 %{libs} %{buildroot}%{_datadir}/%{name} %__cp -Ra * %{buildroot}%{_datadir}/%{name} %global sedn -e 's:$NAME:%{name}:g' %global sedd -e 's:$DATADIR:%{_datadir}:g' %global seds -e 's:$SYSCONFDIR:%{_sysconfdir}:g' %__sed %{sedn} %{sedd} %{SOURCE1} > %{SOURCE1}.n && %__mv %{SOURCE1}.n %{SOURCE1} %__install -Dm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf %__sed %{sedn} %{sedd} %{seds} %{SOURCE2} > %{SOURCE2}.n && %__mv %{SOURCE2}.n %{SOURCE2} %__install -Dm 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf %__sed %{sedn} %{sedd} %{SOURCE3} > %{SOURCE3}.n && %__mv %{SOURCE3}.n %{SOURCE3} %__install -Dm 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service %__rm -r %{buildroot}%{_datadir}/%{name}/config %__ln_s -r %{buildroot}%{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config %post %systemd_post %{name}.service %tmpfiles_create %{_tmpfilesdir}/%{name}.conf %postun %systemd_postun %{name}.service %__rm -r %{_datadir}/%{name} %files %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name} %{_datadir}/%{name} %doc README.md %license LICENSE %changelog * Sun Sep 22 2024 hiddengem 0.8.3.2-2 - Properly versioned builds (hiddengem2@protonmail.com) * Sat Sep 21 2024 hiddengem 0.8.3.2-1 - Version 0.8.3.2 (hiddengem2@protonmail.com) - Correct rpm patch macros (hiddengem2@protonmail.com) - Add more macros (hiddengem2@protonmail.com) - Add hardened service options (hiddengem2@protonmail.com) - Use path macros (hiddengem2@protonmail.com) - Unbreak copr build pt.2 (hiddengem2@protonmail.com) - Unbreak copr build (hiddengem2@protonmail.com) * Mon Aug 26 2024 hiddengem 0.8.2-7 - Update README (hiddengem2@protonmail.com) - Add build dependency (hiddengem2@protonmail.com) * Mon Aug 26 2024 hiddengem 0.8.2-6 - Rebuilt