-RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
-RPM_DEPENDS += python-devel python-virtualenv lcov chrpath
-EPEL_DEPENDS = libconfuse-devel ganglia-devel
+RPM_DEPENDS += openssl-devel
+RPM_DEPENDS += numactl-devel
+ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
+ RPM_DEPENDS += python-devel
+ RPM_DEPENDS += python2-virtualenv
+ RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
+else ifeq ($(shell if [ "$(OS_ID)" = "fedora" ]; then test $(OS_VERSION_ID) -gt 25; echo $$?; fi),0)
+ RPM_DEPENDS += python2-devel
+ RPM_DEPENDS += python2-virtualenv
+ RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
+else
+ RPM_DEPENDS += python-devel
+ RPM_DEPENDS += python-virtualenv
+ RPM_DEPENDS_GROUPS = 'Development Tools'
+endif
+
+# +ganglia-devel if building the ganglia plugin
+
+RPM_DEPENDS += chrpath libffi-devel rpm-build
+ifeq ($(OS_ID),fedora)
+ RPM_DEPENDS += nasm
+else
+ RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm
+endif
+
+RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static
+RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool lsb-release make openssl-devel
+RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow nasm libnuma-devel