加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
GMT.spec 5.41 KB
一键复制 编辑 原始数据 按行查看 历史
yugart 提交于 2021-10-11 16:49 . Package init
%global gmthome %{_datadir}/gmt
%global gmtconf %{_sysconfdir}/gmt
%global gmtdoc %{_docdir}/gmt
%bcond_with octave
%if %with octave
%{!?octave_api: %global octave_api %(octave-config -p API_VERSION 2>/dev/null || echo 0)}
%global octave_mdir %(octave-config -p LOCALAPIFCNFILEDIR || echo)
%global octave_octdir %(octave-config -p LOCALAPIOCTFILEDIR || echo)
%endif
%global completion_dir %(pkg-config --variable=completionsdir bash-completion)
%if "%{completion_dir}" == ""
%global completion_dir "/etc/bash_completion.d"
%endif
# Do not generate provides for plugins
%global __provides_exclude_from ^%{_libdir}/gmt/.*\\.so$
Name: GMT
Version: 6.0.0
Release: 1
Summary: Generic Mapping Tools
License: LGPLv3+
URL: https://www.generic-mapping-tools.org
Source0: https://github.com/GenericMappingTools/gmt/releases/download/%{version}/gmt-%{version}-src.tar.xz
BuildRequires: cmake gcc bash-completion fftw-devel gdal gdal-devel glib2-devel GraphicsMagick
BuildRequires: libXt-devel libXaw-devel libXmu-devel libXext-devel netcdf-devel openblas-devel
BuildRequires: pcre-devel dcw-gmt gshhg-gmt-nc4 less xdg-utils
%if %with octave
BuildRequires: octave-devel
%endif
# For docs
BuildRequires: python3-sphinx ghostscript
Requires: gdal GraphicsMagick less dcw-gmt gshhg-gmt-nc4 xdg-utils
Requires: %{name}-common = %{version}-%{release}
Provides: gmt = %{version}-%{release}
%description
GMT is an open source collection of ~60 tools for manipulating geographic and
Cartesian data sets (including filtering, trend fitting, gridding, projecting,
etc.) and producing Encapsulated PostScript File (EPS) illustrations ranging
from simple x-y plots via contour maps to artificially illuminated surfaces
and 3-D perspective views. GMT supports ~30 map projections and transforma-
tions and comes with support data such as coastlines, rivers, and political
boundaries.
GMT is developed and maintained by Paul Wessel and Walter H. F. Smith with
help from a global set of volunteers, and is supported by the National
Science Foundation.
NOTE: Specific executables that conflict with other Fedora packages have been
removed. These functions can still be accessed via the GMT wrapper script
with: GMT <function> [args]
%package common
Summary: Common files for %{name}
Provides: gmt-common = %{version}-%{release}
BuildArch: noarch
%description common
The %{name}-common package contains common files for GMT (Generic
Mapping Tools) package.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Provides: gmt-devel = %{version}-%{release}
Obsoletes: GMT-static <= 4.5.11
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
Provides: gmt-doc = %{version}-%{release}
Provides: %{name}-examples = %{version}-%{release}
Obsoletes: %{name}-examples < %{version}-%{release}
BuildArch: noarch
%description doc
The %{name}-doc package provides the documentation for the GMT (Generic
Mapping Tools) package.
%if %with octave
%package octave
Summary: Octave libraries for %{name}
Requires: %{name} = %{version}-%{release}
Requires: octave(api) = %{octave_api}
Provides: gmt-octave = %{version}-%{release}
%description octave
The %{name}-octave package contains and Octave interface for developing
applications that use %{name}.
%endif
%prep
%autosetup -p1 -n gmt-%{version}
%build
mkdir build
pushd build || exit 1
%{cmake} \
-DGSHHG_ROOT=%{_datadir}/gshhg-gmt-nc4 \
-DGMT_INSTALL_MODULE_LINKS=off \
-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES=off \
-DLICENSE_RESTRICTED=LGPL \
%if %with octave
-DGMT_OCTAVE=BOOL:ON \
%endif
-DGMT_OPENMP=BOOL:ON \
-DGMT_USE_THREADS=BOOL:ON \
-DBASH_COMPLETION_DIR=%{completion_dir} \
..
%make_build
%install
%make_install -C build
#Setup configuration files
mkdir -p %{buildroot}%{gmtconf}/{mgg,dbase,mgd77}
pushd %{buildroot}%{gmthome} || exit 1
# put conf files in %{gmtconf} and do links in %{gmthome}
for file in mgg/gmtfile_paths mgd77/mgd77_paths.txt; do
mv $file %{buildroot}%{gmtconf}/$file
ln -s ../../../../../%{gmtconf}/$file %{buildroot}%{gmthome}/$file
done
popd
# Configure coastline data location
mkdir -p %{buildroot}%{gmthome}/coast
echo %{_datadir}/gshhg-gmt-nc4 > %{buildroot}%{gmthome}/coast/coastline.conf
# Don't ship .bat files
find %{buildroot} -name \*.bat -delete
%ldconfig_scriptlets
%files
%license COPYING.LESSERv3 COPYINGv3 LICENSE.TXT
%doc AUTHORS.md CITATION.md CONTRIBUTING.md README.md
%{_bindir}/*
%{_libdir}/*.so.6*
%{_libdir}/gmt/
%files common
%license COPYING.LESSERv3 COPYINGv3 LICENSE.TXT
%doc AUTHORS.md CITATION.md CONTRIBUTING.md README.md
%dir %{gmtconf}
%dir %{gmtconf}/mgg
%dir %{gmtconf}/dbase
%dir %{gmtconf}/mgd77
%config(noreplace) %{gmtconf}/mgg/gmtfile_paths
%config(noreplace) %{gmtconf}/mgd77/mgd77_paths.txt
%{gmthome}/
%{completion_dir}/
%files devel
%{_includedir}/*
%{_libdir}/*.so
%files doc
%{gmtdoc}/
%if %with octave
%files octave
%{octave_mdir}/*.m
%{octave_octdir}/*.mex
%endif
%changelog
* Thu Jun 17 2021 He Rengui <herengui@uniontech.com> - 6.0.0-1
- package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化