%{!?dotests: %define dotests 1} Summary: Ganglia Monitor daemon module aixdisk Name: ganglia-mod_aixdisk Version: 3.7.2 URL: http://ganglia.info/ Release: 1 License: BSD Vendor: Ganglia Development Team Group: System Environment/Base %define _libdir64 %{_libdir}64 Source0: ganglia-%{version}.tar.gz Source10: ganglia-aix-metrics-20130712.c Patch0: ganglia-%{version}-%{release}-aix.patch Patch1: ganglia-%{version}-%{release}-mod_aixdisk.patch Patch2: ganglia-%{version}-register.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: apr-devel >= 1.5.2-1 BuildRequires: expat-devel >= 2.2.6-1 BuildRequires: libconfuse-devel >= 2.7-1 BuildRequires: patch, make, autoconf, automake, libtool, m4 Requires: ganglia-lib = %{version} Requires: ganglia-gmond = %{version} Requires: apr >= 1.5.2-1 Requires: expat >= 2.2.6-1 Requires: libconfuse >= 2.7-1 Requires: libgcc >= 6.3.0-1 Requires: pcre >= 8.42 %define conf_dir /etc/ganglia %description Ganglia is a scalable, real-time monitoring and execution environment with all execution requests and statistics expressed in an open well-defined XML format. This gmond module provides disk statistics for individual disks on AIX. ## ## PREP ## %prep %setup -q -n ganglia-%{version} export PATH=/opt/freeware/bin:$PATH # use the new libmetrics AIX implementation cp %{SOURCE10} libmetrics/aix/metrics.c %patch0 %patch2 # apply the patch for the mod_aixdisk module %patch1 rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit ## ## BUILD ## %build # build on 64bit mode export OBJECT_MODE=64 cd 64bit export CC="/opt/freeware/bin/gcc -U_AIX43 -D_AIX53 -I/opt/freeware/include -maix64 -O2" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-brtl" autoreconf -fiv ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --sysconfdir=%{conf_dir} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --without-gmetad \ --enable-php=no \ --disable-python gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi # build on 32bit mode export OBJECT_MODE=32 cd ../32bit export CC="/opt/freeware/bin/gcc -U_AIX43 -D_AIX53 -I/opt/freeware/include -O2 -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib -Wl,-bmaxdata:0x80000000 -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-brtl" autoreconf -fiv ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{conf_dir} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --without-gmetad \ --enable-php=no \ --disable-python gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi ## ## INSTALL ## %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # install on 64bit mode cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install cp gmond/modules/aixdisk/.libs/modaixdisk.so ${RPM_BUILD_ROOT}%{_libdir64}/ganglia # install on 32bit mode cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install ## Create the directory structure %__mkdir -p ${RPM_BUILD_ROOT}%{conf_dir}/conf.d ## Move the files into the structure %__cp -f gmond/modules/conf.d/* ${RPM_BUILD_ROOT}%{conf_dir}/conf.d cp gmond/modules/aixdisk/.libs/modaixdisk.so ${RPM_BUILD_ROOT}%{_libdir}/ganglia ## ## CLEAN ## %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} ## ## FILES ## %files %defattr(-,root,system) %{_libdir}/ganglia/modaixdisk.so %{_libdir64}/ganglia/modaixdisk.so %config(noreplace) %{conf_dir}/conf.d/aixdisk.conf ## ## CHANGELOG ## %changelog * Fri Aug 09 2019 Reshma V Kumar - 3.7.2-1 - Initial port of ganglia-mod_aixdisk to AIX toolbox * Wed Jan 27 2016 Michael Perzl - 3.7.2-1 - updated to version 3.7.2 * Wed Jan 27 2016 Michael Perzl - 3.7.1-1 - updated to version 3.7.1 * Wed Jan 27 2016 Michael Perzl - 3.6.1-1 - updated to version 3.6.1 * Thu Apr 16 2015 Michael Perzl - 3.6.0-3 - rebuilt against newest versions of dependencies * Fri Jul 12 2013 Michael Perzl - 3.6.0-2 - added the missing cpu_steal_func to AIX libmetrics file * Tue Jun 11 2013 Michael Perzl - 3.6.0-1 - updated to version 3.6.0 * Tue Jun 11 2013 Michael Perzl - 3.5.0-1 - updated to version 3.5.0 * Mon Jun 10 2013 Michael Perzl - 3.4.0-2 - adapted to new AIX libmetrics file * Mon May 28 2012 Michael Perzl - 3.4.0-1 - updated to version 3.4.0 * Sun May 06 2012 Michael Perzl - 3.3.7-1 - updated to version 3.3.7 * Fri Apr 20 2012 Michael Perzl - 3.3.6-1 - updated to version 3.3.6 * Wed Apr 11 2012 Michael Perzl - 3.3.5-1 - updated to version 3.3.5 * Mon Feb 26 2012 Michael Perzl - 3.3.1-1 - updated to version 3.3.1 * Sun Nov 20 2011 Michael Perzl - 3.2.0-1 - updated to version 3.2.0 * Sun Nov 20 2011 Michael Perzl - 3.1.7-1 - first version for AIX V5.1 and higher