]> arthur.barton.de Git - netdata.git/blobdiff - netdata.spec.in
Spec: OpenSUSE support
[netdata.git] / netdata.spec.in
index e92e99402ae2a6637588e76858ea16e48f178aa6..0bb0f3c65e40d9adad511f1aad86fb1690c0ae02 100644 (file)
@@ -1,4 +1,15 @@
 %define contentdir %{_datadir}/netdata
+%if 0%{?suse_version}
+%define distro_post %service_add_post netdata.service
+%define distro_preun %service_del_preun netdata.service
+%define distro_postun %service_del_postun netdata.service
+%define distro_buildrequires BuildRequires:\ systemd-rpm-macros
+%else
+%define distro_post %systemd_post netdata.service
+%define distro_preun %systemd_preun netdata.service
+%define distro_postun %systemd_postun_with_restart netdata.service
+%define distro_buildrequires %{nil}
+%endif
 
 # This is temporary and should eventually be resolved. This bypasses
 # the default rhel __os_install_post which throws a python compile
@@ -10,7 +21,7 @@
 %bcond_without  systemd  # systemd
 %bcond_with     nfacct   # build with nfacct plugin
 
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
 %else
 %undefine      with_systemd
 %endif
 Summary:       Real-time performance monitoring, done right
 Name:          @PACKAGE_NAME@
 Version:       @PACKAGE_RPM_VERSION@
-Release:       @PACKAGE_RPM_RELEASE@%{?release_suffix}%{?dist}
+Release:       1%{?dist}
 License:       GPL v3+
 Group:         Applications/System
 Source0:       http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
-URL:           http://netdata.firehol.org/
+URL:           http://my-netdata.io/
+%distro_buildrequires
 BuildRequires: pkgconfig
 BuildRequires: xz
 BuildRequires: zlib-devel
+BuildRequires: libuuid-devel
+Requires: zlib
+Requires: libuuid
 
 # Packages can be found in the EPEL repo
 %if %{with nfacct}
 BuildRequires: libmnl-devel
 BuildRequires: libnetfilter_acct-devel
+Requires: libmnl
+Requires: libnetfilter_acct
 %endif
 
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 
 %if %{with systemd}
+%if 0%{?suse_version}
+%{?systemd_requires}
+%else
 Requires(preun):  systemd-units
 Requires(postun): systemd-units
 Requires(post):   systemd-units
+%endif
 %else
 Requires(post):   chkconfig
 %endif
@@ -74,9 +95,7 @@ rm -rf $RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -name .keep -print0 | xargs --null --no-run-if-empty rm
 
 install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
-install -m 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+install -Dm 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
 
 %if %{with systemd}
 install -d $RPM_BUILD_ROOT%{_unitdir}
@@ -96,13 +115,13 @@ install -m755 system/netdata-init-d \
         -s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
 
 %post
-%systemd_post netdata.service
+o%distro_post
 
 %preun
-%systemd_preun netdata.service
+%distro_preun
 
 %postun
-%systemd_postun_with_restart netdata.service
+%distro_postun
 %else
 %pre
 # Add the "netdata" user
@@ -145,10 +164,20 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root)
 
 %dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/health.d
+%dir %{_sysconfdir}/%{name}/python.d
+
 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
+#%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
+%config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
+#%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 
+# node.js config files are JSON (which do not support comments)
+# so, we only supply markdown files
+%{_sysconfdir}/%{name}/node.d/*.md
+
 %{_libexecdir}/%{name}
 %{_sbindir}/%{name}
 
@@ -170,6 +199,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}/web
 
 %changelog
+* Tue Oct 4 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.4.0-1
+- the fastest netdata ever (with a better look too)!
+- improved IoT and containers support!
+- alarms improved in almost every way!
+- Several more improvements, new features and bugfixes.
+* Sun Aug 28 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.3.0-1
+- netdata now has health monitoring
+- netdata now generates badges
+- netdata now has python plugins
+- Several more improvements, new features and bugfixes.
 * Tue Jul 26 2016 Jason Barnett <J@sonBarnett.com> - 1.2.0-2
 - Added support for EL6
 - Corrected several Requires statements