webdist/webdist.spec

65 lines
1.6 KiB
RPMSpec
Raw Normal View History

Name: webdist
Version: 0.1
Release: 1mamba
Summary: Web interface for GNU/Linux distribution based on Plesk framework and distromatic db files
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://gitlab.mambasoft.it/openmamba/webdist
Source: https://gitlab.mambasoft.it/openmamba/webdist.git/v%{version}/webdist-%{version}.tar.bz2
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: libpython310-devel
Requires: python310
Requires(post): python-virtualenv
%description
Web interface for GNU/Linux distribution based on Plesk framework and distromatic db files.
%prep
%setup -q
%build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%preun
%systemd_preun webdist
:
%post
if [ "$1" -ge 1 ]; then
[ -e /var/lib/webdist/env ] || virtualenv -q -p %{__python310} /var/lib/webdist/env
/var/lib/webdist/env/bin/pip install -r %{_datadir}/webdist/requirements.txt
fi
%systemd_post webdist
:
%postun
%systemd_postun_with_restart webdist
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/webdist
%config(noreplace) %{_sysconfdir}/webdist/main.cfg
%{_unitdir}/webdist.service
%dir %{_datadir}/webdist
%{_datadir}/webdist/requirements.txt
%dir %{_datadir}/webdist/app
%{_datadir}/webdist/app/*
%dir /var/lib/webdist
%doc COPYING
%changelog
* Sun Oct 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1-1mamba
- package created by autospec