Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:crameleon:LibertaCasa
limnoria
limnoria.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File limnoria.spec of Package limnoria
# # spec file for package limnoria # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define appname limnoria %define appnameUpper Limnoria %define srcver 2023-12-09 %define scripts limnoria_wizard limnoria_reset_password limnoria_adduser %define pythons python311 Name: limnoria Version: 20231209 Release: 0 Summary: A modified version of Supybot (an IRC bot and framework) License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/ProgVal/Limnoria Source0: %{appnameUpper}-%{version}.tar.gz Source1: system-user-%{appname}.conf Source2: %{appname}@.service Source3: README.SUSE Source4: limnoria.configured Patch0: limnoria_wizard.patch Patch1: limnoria_adduser.patch Patch2: limnoria_reset_password.patch Patch3: limnoria_wizard-suse.patch Patch4: limnoria_adduser-suse.patch Patch5: limnoria_reset_password-suse.patch BuildRequires: %{python_module PySocks} BuildRequires: %{python_module chardet} BuildRequires: %{python_module cryptography} BuildRequires: %{python_module ecdsa} BuildRequires: %{python_module feedparser} BuildRequires: %{python_module packaging} BuildRequires: %{python_module pyparsing} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module python-gnupg} # pyxmpp2-scram not available, the code actually covers the non-availability #BuildRequires: %%{python_module pyxmpp2-scram} BuildRequires: %{python_module setuptools} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: procps BuildRequires: python-rpm-macros BuildRequires: sysuser-tools # The following BuildRequires are only needed for unit tests: BuildRequires: gpg2 BuildRequires: timezone Requires: %{python_module base} Requires: procps Requires: python3-PySocks Requires: python3-chardet Requires: python3-cryptography Requires: python3-ecdsa Requires: python3-feedparser Requires: python3-python-dateutil Requires: python3-python-gnupg # the user is instructed to call the limnoria scripts using `sudo -u limnoria` Recommends: sudo Obsoletes: Supybot Provides: %{python_module limnoria} = %{version} BuildArch: noarch %sysusers_requires %description Limnoria is a Python IRC bot with a plugin API. It is equipped with an ACL system for specifying user permissions with per-command granularity. Numerous plugins are included. %prep %setup -q -n %{appnameUpper}-%{version} sed -i '1{/\/usr\/bin\/python/d}' plugins/Debug/plugin.py sed -i '1{/\/usr\/bin\/env/d}' plugins/SedRegex/constants.py for script in %{scripts} do cp src/scripts/$script.py $script cp $script $script-suse done %autopatch -p1 -M2 %autopatch -m3 -M5 sed -i '1{/\/usr\/bin\/env/d}' src/scripts/limnoria_{wizard,plugin_create,adduser,plugin_doc,botchk,reset_password,test}.py install -m 0644 %{SOURCE3} . %build # extremely ugly hack for "WARNING could not set SOURCE_DATE_EPOCH, ensure BUILD_RELEASE is set in /.buildenv" # SOURCE_DATE_EPOCH is needed by setup.py, otherwise it tries to set it by parsing Git commits which fails in a different direction if [ -z "$SOURCE_DATE_EPOCH" ] then export SOURCE_DATE_EPOCH="$(date +%s)" fi %python_build %sysusers_generate_pre %{SOURCE1} %{appname} system-user-%{appname}.conf %install %python_install %fdupes %{buildroot}%{python_sitelib}/supybot/ for script in %{scripts} do install -m 0755 $script-suse %{buildroot}%{_bindir}/${script//_/-}-suse done install -d -m 0750 %{buildroot}%{_sysconfdir}/%{appname} install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{appname}/.%{appname}.configured install -d -m 0750 %{buildroot}%{_sharedstatedir}/%{appname} install -d -m 0750 %{buildroot}/srv/www/%{appname} install -d -m 0750 %{buildroot}%{_localstatedir}/log/%{appname} install -dm 0755 %{buildroot}%{_unitdir} install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir} install -d -m 0755 %{buildroot}%{_sysusersdir} install -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir} # setup script installs duplicate limnoria* and supybot* files rm %{buildroot}%{_bindir}/supybot* %{buildroot}%{_mandir}/man1/supybot* %check export PYTHONDONTWRITEBYTECODE=1 export PYTHONPATH=%{buildroot}%{$python_sitelib}/ # FIXME importlib error %{buildroot}%{_bindir}/limnoria-test -c --plugins-dir=%{buildroot}%{python_sitelib}/limnoria/plugins/ --no-network || true %pre -f %{name}.pre %post if [ $1 -eq 1 ] then echo "Welcome to Limnoria!" echo "Please use \`sudo -u limnoria limnoria-wizard-suse\` to configure a bot instance and" echo "reference %{_docdir}/%{name}/README.SUSE for further details." fi %files %doc README.md CONTRIBUTING.md ChangeLog RELNOTES README.SUSE %license LICENSE.md %dir %attr (755,%{appname},%{appname}) %{_sysconfdir}/%{appname} %dir %attr (750,%{appname},%{appname}) %{_sharedstatedir}/%{appname} %dir %attr (755,%{appname},%{appname}) /srv/www/%{appname} %dir %attr (755,%{appname},%{appname}) %{_localstatedir}/log/%{appname} %{_unitdir}/%{appname}@.service %{_sysusersdir}/system-user-%{appname}.conf %config(noreplace) %attr(644,%{appname},%{appname}) %{_sysconfdir}/%{appname}/.%{appname}.configured %{_bindir}/limnoria %{_bindir}/limnoria-adduser %{_bindir}/limnoria-botchk %{_bindir}/limnoria-plugin-create %{_bindir}/limnoria-plugin-doc %{_bindir}/limnoria-reset-password %{_bindir}/limnoria-test %{_bindir}/limnoria-wizard %{_bindir}/limnoria-wizard-suse %{_bindir}/limnoria-reset-password-suse %{_bindir}/limnoria-adduser-suse %{python_sitelib}/supybot/ %{python_sitelib}/limnoria-*.egg-info %{_mandir}/man1/limnoria.1%{?ext_man} %{_mandir}/man1/limnoria-adduser.1%{?ext_man} %{_mandir}/man1/limnoria-botchk.1%{?ext_man} %{_mandir}/man1/limnoria-plugin-create.1%{?ext_man} %{_mandir}/man1/limnoria-plugin-doc.1%{?ext_man} %{_mandir}/man1/limnoria-reset-password.1%{?ext_man} %{_mandir}/man1/limnoria-test.1%{?ext_man} %{_mandir}/man1/limnoria-wizard.1%{?ext_man} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor