Blob Blame History Raw
%global __strip %{mingw32_strip}
%global __objdump %{mingw32_objdump}

%global shortname sigar

Name:		mingw-%{shortname}
Version:	1.6.5
Release:	0.13.git58097d9%{?dist}
Summary:	MinGW Windows sigar library

%global sigar_suffix  0-g4b67f57
%global sigar_hash    58097d9

Group:		Development/Libraries
License:	ASL 2.0
URL:		http://sigar.hyperic.com/

# Once 1.6.5 is released, we can use tarballs from GitHub:
#    Source0:	http://download.github.com/hyperic-sigar-{name}-{version}-{sigar_suffix}.tar.gz
#
# Until then the tarball can be re-generated with:
#    git clone git://github.com/hyperic/sigar.git
#    cd sigar
#    git archive --prefix=sigar-1.6.5/ 833ca18 | bzip2 > sigar-1.6.5-833ca18.tbz2
#
# The diff from 1.6.4 is too huge to contemplate cherrypicking from
Source0:	%{shortname}-%{version}-%{sigar_hash}.tbz2

BuildRequires:	mingw32-gcc cmake
BuildRequires:	redhat-rpm-config make
BuildRequires:	mingw32-filesystem

BuildArch:      noarch

%description
The Sigar API provides a portable interface for gathering system
information such as:
- System memory, swap, CPU, load average, uptime, logins
- Per-process memory, CPU, credential info, state, arguments,
  environment, open files
- File system detection and metrics
- Network interface detection, configuration info and metrics
- Network route and connection tables

This information is available in most operating systems, but each OS
has their own way(s) providing it. SIGAR provides developers with one
API to access this information regardless of the underlying platform.

#The core API is implemented in pure C with bindings currently
#implemented for Java, Perl and C#.


%package -n mingw32-%{shortname}
Summary:	MinGW Windows sigar library

%description -n mingw32-%{shortname}
The Sigar API provides a portable interface for gathering system
information such as:
- System memory, swap, CPU, load average, uptime, logins
- Per-process memory, CPU, credential info, state, arguments,
  environment, open files
- File system detection and metrics
- Network interface detection, configuration info and metrics
- Network route and connection tables

This information is available in most operating systems, but each OS
has their own way(s) providing it. SIGAR provides developers with one
API to access this information regardless of the underlying platform.

#The core API is implemented in pure C with bindings currently
#implemented for Java, Perl and C#.


%prep
# When using the GitHub tarballs, use:
# setup -q -n hyperic-{shortname}-{sigar_hash}
%setup -q -n %{shortname}-%{version}

%build
PATH=%{mingw32_bindir}:$PATH

mkdir build
pushd build
%{mingw32_cmake} ..
make %{?_smp_mflags}
popd

%install
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd

%files -n mingw32-%{shortname}
%doc ChangeLog README LICENSE NOTICE AUTHORS
%{mingw32_bindir}/libsigar.dll
%{mingw32_libdir}/libsigar.dll.a
%{mingw32_includedir}/sigar*.h

%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.13.git58097d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Mar 30 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.5-0.12.git58097d9
- Rebuild against latest mingw-crt to fix Windows XP compatibility issue

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.11.git58097d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.10.git58097d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.9.git58097d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Mar 07 2012 Kalev Lember <kalevlember@gmail.com> - 1.6.5-0.8.git58097d9
- Renamed the source package to mingw-sigar (#801029)
- Modernize the spec file
- Use mingw macros without leading underscore

* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.6.5-0.7.git58097d9
- Rebuild against the mingw-w64 toolchain

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.6.git58097d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Jun 30 2011 Adam Stokes <astokes@fedoraproject.org> - 1.6.5-0.5.git58097d9
- New upstream release

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.4.git833ca18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Dec 21 2010 Andrew Beekhof <andrew@beekhof.net> - 1.6.5-0.3.git833ca18
- Minor tweaks before import: summary and use of spaces

* Wed Dec 21 2010 Andrew Beekhof <andrew@beekhof.net> - 1.6.5-0.2.git833ca18
- Incorporate review feedback, include dependencies generator macro

* Wed Dec 1 2010 Andrew Beekhof <andrew@beekhof.net> - 1.6.5-0.1.git833ca18
- Initial checkin