]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - collecty/collecty.nm
nftables: Drop package
[ipfire-3.x.git] / collecty / collecty.nm
index deb7fb4de12ff775e7e4ecb61ec3f6dde28197ec..2b30bd5e8e28299752a2dd4b080f695a342e53d3 100644 (file)
@@ -4,7 +4,7 @@
 ###############################################################################
 
 name       = collecty
-version    = 0.0.2
+version    = 004
 release    = 1
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
@@ -23,18 +23,63 @@ source_dl  = http://source.ipfire.org/releases/collecty/
 
 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