File ncclamp.spec of Package ncclamp

# spec file for package ncclamp
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           ncclamp
Version:        0.1
Release:        0
Summary:        Tool for NetCDF files to replace values in-place
License:        GPL-2.0-only
Group:          Productivity/Scientific/Other
Source:         %{name}-%{version}.tar.gz
BuildRequires:  netcdf-devel
BuildRequires:  libaec-devel
BuildRequires:  libsz2-devel
%if !0%{?suse_version} || 0%{?sle_version} >= 150000 || 0%{?suse_version} > 1500
BuildRequires:  hdf5-devel
BuildRequires:  hdf5-1_8-devel

Command-line tool for NetCDF files that allows you to replace
values in-place by specifying the variable, the old value to be replaced,
the new value, and a comparison operator. The change is applied across all
of the variable's dimensions, including the record dimension if any.

%setup -q

gcc -Wall -O2 -g -D_FORTIFY_SOURCE=2 %{optflags} -o ncclamp ncclamp.c -lnetcdf

install -d -m 755 %{buildroot}%{_bindir}
install -m 755 ncclamp %{buildroot}%{_bindir}/

%license LICENSE