summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.copr/Makefile5
-rw-r--r--.gitignore1
-rw-r--r--rpm/SPECS/logactio.spec52
3 files changed, 8 insertions, 50 deletions
diff --git a/.copr/Makefile b/.copr/Makefile
new file mode 100644
index 0000000..fa3a745
--- /dev/null
+++ b/.copr/Makefile
@@ -0,0 +1,5 @@
+srpm :
+ dnf -y install git python-sphinx
+ mkdir -p ./rpm/SOURCES
+ bash -x ./rpm/mk-rpm.sh
+ cp ./rpm/SRPMS/logactio-*.src.rpm $(outdir)
diff --git a/.gitignore b/.gitignore
index d84d554..416e4a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
logactio.cfg
build/
dist/
+.copr/
MANIFEST
rpm/SOURCES
rpm/BUILD
diff --git a/rpm/SPECS/logactio.spec b/rpm/SPECS/logactio.spec
index f22413f..0d00e15 100644
--- a/rpm/SPECS/logactio.spec
+++ b/rpm/SPECS/logactio.spec
@@ -12,34 +12,17 @@ Source3: logactio.sysv
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
-%define systemd_avail 0
-%if 0%{?rhel} >= 7
-%define systemd_avail 1
-%endif
-%if 0%{?fedora} >= 15
-%define systemd_avail 1
-%endif
-
Requires: python(abi) >= 3.6
-
-%if 0%{systemd_avail} == 1
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-BuildRequires: systemd
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(preun): initscripts
-%endif
-%if 0%{?rhel} <= 6
-BuildRequires: python-sphinx10
+%if 0%{?fedora} > 0:
+BuildRequires: python-sphinx
%else
BuildRequires: python3-sphinx
%endif
-
%description
LogActio is a modular log tracker, which observes changes and acts
through different modules based on the event. It is purely written
@@ -51,11 +34,7 @@ in Python and can easily be extended with specific actions.
%build
%py3_build
pushd docs
-%if 0%{?rhel} > 6
make text man
-%else
-make text man SPHINXBUILD=sphinx-1.0-build
-%endif
popd
@@ -72,42 +51,19 @@ install -m644 docs/build/man/%{name}.7 %{buildroot}/%{_mandir}/man7/
# Install sysv-initd/systemd related stuff
mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
-%if 0%{systemd_avail} == 1
-mkdir -p %{buildroot}/%{_unitdir}/
install -m644 %{SOURCE2} %{buildroot}/%{_unitdir}/
-%else
-mkdir -p %{buildroot}/%{_initddir}/
-install -m755 %{SOURCE3} %{buildroot}/%{_initddir}/%{name}
-%endif
%clean
rm -rf %{buildroot}
%post
-%if 0%{systemd_avail} == 1
%systemd_post logactio.service
-%else
-/sbin/chkconfig --add %{name}
-%endif
%preun
-%if 0%{systemd_avail} == 1
%systemd_preun logactio.service
-%else
-if [ $1 -eq 0 ] ; then
- /sbin/service %{name} stop >/dev/null 2>&1
- /sbin/chkconfig --del %{name}
-fi
-%endif
%postun
-%if 0%{systemd_avail} == 1
%systemd_postun_with_restart logactio.service
-%else
-if [ "$1" -ge "1" ] ; then
- /sbin/service %{name} condrestart >/dev/null 2>&1 || :
-fi
-%endif
%files
@@ -118,11 +74,7 @@ fi
%{python3_sitelib}/LogActio
%{python3_sitelib}/*.egg-info
%config(noreplace) /etc/sysconfig/%{name}
-%if 0%{systemd_avail} == 1
%{_unitdir}/%{name}.service
-%else
-%{_initddir}/%{name}
-%endif
%changelog