diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0a3a09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/setconf-0.7.6.tar.gz diff --git a/setconf-0.7.6-add_man.patch b/setconf-0.7.6-add_man.patch new file mode 100644 index 0000000..9e23b99 --- /dev/null +++ b/setconf-0.7.6-add_man.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index dcf28bc..2607b2b 100644 +--- a/setup.py ++++ b/setup.py +@@ -12,6 +12,7 @@ setup(name="setconf", + author_email="xyproto@archlinux.org", + license="GPLv2", + py_modules=["setconf"], ++ data_files = [('share/man/man1', ['./setconf.1'])], + entry_points={ + "console_scripts" : [ + "setconf = setconf:main", +-- +2.20.1 + diff --git a/setconf-0.7.6-rm_sb.patch b/setconf-0.7.6-rm_sb.patch new file mode 100644 index 0000000..2afcf2b --- /dev/null +++ b/setconf-0.7.6-rm_sb.patch @@ -0,0 +1,9 @@ +diff --git a/setconf.py b/setconf.py +index 2e57b4e..0c3abf7 100755 +--- a/setconf.py ++++ b/setconf.py +@@ -1,4 +1,3 @@ +-#!/usr/bin/env python + # -*- coding: utf-8 -*- + # + # setconf diff --git a/setconf.spec b/setconf.spec new file mode 100644 index 0000000..8c8750d --- /dev/null +++ b/setconf.spec @@ -0,0 +1,48 @@ +Name: setconf +Version: 0.7.6 +Release: 1%{?dist} +Summary: Utility for changing settings in configuration text files + +License: GPLv2 +URL: http://setconf.roboticoverlords.org/ +Source0: https://github.com/xyproto/%{name}/archive/%{version}/%{name}-%{version}.tar.gz + +Patch0: %{name}-%{version}-rm_sb.patch +Patch1: %{name}-%{version}-add_man.patch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +BuildArch: noarch + +%description +Setconf is small utility that can be used for +changing settings in configuration text files. + +%prep +%autosetup -n %{name}-%{version} + +%build +%py3_build + +%check +%{__python3} setconf.py --test +awk '/^..\/setconf.py/ { print "%{__python3} " $0; next } { print }' testcases/test.sh >testcases/py3_test.sh +chmod a+x testcases/py3_test.sh +cd testcases/ && ./py3_test.sh + +%install +%py3_install + +%files +%license COPYING +%doc README.md +%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info/ +%{python3_sitelib}/%{name}.py +%{python3_sitelib}/__pycache__/%{name}.*.pyc +%{_mandir}/man1/%{name}.1* +%{_bindir}/%{name} + +%changelog +* Wed Feb 27 2019 Jan Macku - 0.7.6-1 +- Init setconf package diff --git a/sources b/sources new file mode 100644 index 0000000..ca83bf2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (setconf-0.7.6.tar.gz) = 994414dd38b087bd7bc3fb6e1143617dcab3e24f5b12c8352c2b9076502534be860b749804fa1367a1412073e79b1b4f23a2a547c0706c27041742d39b2eb5ac