###############################################################################
name = collecty
-version = 0.0.2
+version = 004
release = 1
maintainer = Michael Tremer <michael.tremer@ipfire.org>
build
requires
- gettext
- python
+ autoconf
+ automake
+ docbook-utils
+ docbook-xsl
+ gettext-devel
+ intltool
+ libatasmart-devel
+ libtool-devel
+ liboping-devel
+ libxslt
+ lm-sensors-devel
+ python3-devel >= 3.4
+ python3-rrdtool
+ systemd-devel
end
- install
- mkdir -pv %{BUILDROOT}%{bindir}
- make install DESTDIR=%{BUILDROOT}
+ prepare_cmds
+ [ -e "configure" ] || ./autogen.sh
end
end
packages
package %{name}
groups += Base
+
+ requires
+ python3-dbus
+ python3-gobject3
+ python3-rrdtool
+ end
+
+ script postin
+ systemctl daemon-reload >/dev/null 2>&1 || :
+
+ # The collecty service should be started on default.
+ systemctl enable collecty.service > /dev/null 2>&1 || :
+ end
+
+ # Disable the service that is to be removed and stop it if it is still running.
+ script preun
+ systemctl --no-reload disable collecty.service >/dev/null 2>&1 || :
+ systemctl stop collecty.service >/dev/null 2>&1 || :
+ end
+
+ # Just tell systemd that unitfiles have been removed.
+ script postun
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ end
+
+ # Try to restart the service if it is running.
+ script postup
+ systemctl daemon-reload >/dev/null 2>&1 || :
+ systemctl try-restart collecty.service >/dev/null 2>&1 || :
+ end
+ end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
end
end