From c52f830b3a6a03e44c15cd0d3423a4508505d7c3 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Fri, 4 Aug 2023 12:07:52 +0100 Subject: [PATCH] initial commit --- .gitignore | 2 ++ pinnwand.service | 9 +++++++ pinnwand.spec | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 pinnwand.service create mode 100644 pinnwand.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a05bed --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.rpm +*.tar.gz diff --git a/pinnwand.service b/pinnwand.service new file mode 100644 index 0000000..8902227 --- /dev/null +++ b/pinnwand.service @@ -0,0 +1,9 @@ +[Unit] +Description=pinnwand pastebin + +[Service] +ExecStart=/usr/bin/pinnwand --configuration-path /etc/pinnwand/pinnwand.toml http +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/pinnwand.spec b/pinnwand.spec new file mode 100644 index 0000000..e50a0e0 --- /dev/null +++ b/pinnwand.spec @@ -0,0 +1,62 @@ +%global gittagversion 1.4.0 +%global gittag v%{?gittagversion} + +Name: pinnwand +Version: %{?gittagversion} +Release: 1%{?dist} +Summary: Straightforward pastebin software + +License: MIT +URL: https://github.com/supakeen/pinnwand + +Source: %{url}/archive/%{gittag}/%{name}-%{version}.tar.gz +Source: pinnwand.service + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: systemd-rpm-macros + +%global _description %{expand: +pinnwand is Python pastebin software that tried to keep it simple but got a +little more complex +} + +%description %_description + +%prep +%autosetup -p 1 -n pinnwand-%{version} +sed -i 's/docutils = "^0.19/docutils = ">=0.19/' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files pinnwand + + +install -Dpm 0644 %{_sourcedir}/pinnwand.service %{buildroot}%{_unitdir}/%{name}.service +install -Dpm 0644 etc/pinnwand.toml-example %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml + +%check +%pytest + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{_unitdir}/pinnwand.service +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml + + + +%changelog +* Thu Aug 03 2023 Neil Hanlon - 1.4.0-1 +- Update to 1.4.0 + +* Sun Feb 20 2022 supakeen - 1.3.2-1 +- Initial version of the package.