Репозитории ALT
Последнее обновление в Пт, 24 июля 2020, 16:32:17 +0000 | Пакетов: 15011
en ru
Исходные пакеты в ветвях
свернуть окно
  • 5.4.5-alt1_1
  • 5.2.1-alt1_3
  • 5.2.1-alt1_3
  • 4.5.9-alt1_4
  • 5.1.1-alt2_0.M70T.1
Группа :: Технические приложения
Исходный пакет: GMT
Необработанный spec-файл

# BEGIN SourceDeps(oneline):
BuildRequires: /usr/bin/as /usr/bin/gdal-config /usr/bin/ncdump /usr/bin/octave /usr/bin/svnversion libICE-devel libSM-devel
# END SourceDeps(oneline)

BuildRequires: gcc-c++
# fedora bcond_with macro

%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
# redefine altlinux specific with and without

%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%global gmthome %{_datadir}/GMT
%global gmtconf %{_sysconfdir}/GMT
%global gmtdoc %{_docdir}/gmt

%bcond_without octave
%if %with octave
%{!?octave_api: %define octave_api %(octave-config -p API_VERSION 2>/dev/null || echo 0)}
%define octave_mdir %(octave-config -p LOCALAPIFCNFILEDIR || echo)
%define octave_octdir %(octave-config -p LOCALAPIOCTFILEDIR || echo)

Name: GMT
Version: 4.5.9
Release: alt1_4
Summary: Generic Mapping Tools

Group: Engineering
License: GPLv2+
URL: http://gmt.soest.hawaii.edu/
Source0: ftp://ftp.soest.hawaii.edu/gmt/gmt-%{version}.tar.bz2
# Add needed includes

Patch0: GMT-includes.patch

BuildRequires: libgdal-devel
BuildRequires: libXt-devel libXaw-devel libXmu-devel libXext-devel
BuildRequires: libnetcdf-devel
BuildRequires: GMT-coastlines >= 2.1.0
%if %with octave
BuildRequires: octave-devel
# less is detected by configure, and substituted in GMT.in

BuildRequires: less
Requires: less
Requires: %{name}-common = %{version}-%{release}
Requires: GMT-coastlines >= 2.1.0
Provides: gmt = %{version}-%{release}
%if %without octave
Obsoletes: GMT-octave <= %{version}-%{release}
Source44: import.info

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

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}
Group: Engineering
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}
Group: Development/C
Requires: %{name} = %{version}-%{release}
Provides: gmt-devel = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package doc
Summary: Documentation for %{name}
Group: Documentation
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.

%package static
Summary: Static libraries for %{name}
Group: Development/C
Provides: gmt-static = %{version}-%{release}

%description static
The %{name}-static package contains static libraries for developing
applications that use %{name}.

%if %with octave
%package octave
Summary: Octave libraries for %{name}
Group: Development/C
Requires: %{name} = %{version}-%{release}
Provides: gmt-octave = %{version}-%{release}

%description octave
The %{name}-octave package contains and Octave interface for developing
applications that use %{name}.

# X11 application in a subpackage. No .desktop file since it

# requires a file name as argument

%package -n xgridedit
Summary: GMT grid code graphical editor
Group: Engineering

%description -n xgridedit
XGridEdit is an application for viewing and editing the numerical values in
GMT 2 dimensional grids.

%setup -q -n GMT%{version}
%patch0 -p1 -b .includes
#We don't care about .bat files

find -name \*.bat | xargs rm
#Fix permissions

find -name \*.c | xargs chmod a-x

#So we execute do_examples.sh instead of do_examples.csh

export CSH=sh
export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf"
%configure --datadir=%{gmthome} \
--enable-debug \
--enable-gdal \
--enable-shared \
%if %with octave
--enable-octave --enable-mex-mdir=%{octave_mdir} \
--enable-mex-xdir=%{octave_octdir} \
make suppl

make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -c -p' install-all
#Setup configuration files

mkdir -p $RPM_BUILD_ROOT%{gmtconf}/{mgg,dbase,mgd77,conf}
pushd $RPM_BUILD_ROOT%{gmthome}/
# put conf files in %{gmtconf} and do links in %{gmthome}

for file in conf/*.conf conf/gmtdefaults_* mgg/gmtfile_paths dbase/grdraster.info \
mgd77/mgd77_paths.txt; do
mv $file $RPM_BUILD_ROOT%{gmtconf}/$file
ln -s ../../../../../%{gmtconf}/$file $RPM_BUILD_ROOT%{gmthome}/$file

#Don't bring in csh for the csh examples

find $RPM_BUILD_ROOT/%{gmtdoc}/examples -name \*.csh |
xargs chmod a-x

# separate the README files that are associated with gmt main package

rm -rf __package_docs
mkdir __package_docs
cp -p src/*/README.* __package_docs
rm __package_docs/README.xgrid __package_docs/README.mex

# Remove conflicting binaries:

rm $RPM_BUILD_ROOT%{_bindir}/triangulate

#Cleanup from previous runs

rm -f $RPM_BUILD_DIR/GMT%{version}/share/coast

#Setup environment for the tests

export GMT_SHAREDIR=$RPM_BUILD_DIR/GMT%{version}/share

#Link in the coastline data

ln -s %{gmthome}/coast $RPM_BUILD_DIR/GMT%{version}/share

#Run the examples - note that this doesn't return errors if any fail, check logs!

make run-examples

%exclude %{_bindir}/xgridedit

%files common
%doc README __package_docs/* LICENSE.TXT ChangeLog gmt_bench-marks
%dir %{gmtconf}
%dir %{gmtconf}/mgg
%dir %{gmtconf}/dbase
%dir %{gmtconf}/mgd77
%dir %{gmtconf}/conf
%config(noreplace) %{gmtconf}/conf/*
%config(noreplace) %{gmtconf}/mgg/gmtfile_paths
%config(noreplace) %{gmtconf}/dbase/grdraster.info
%config(noreplace) %{gmtconf}/mgd77/mgd77_paths.txt

%files devel

%files doc

%files static

%if %with octave
%files octave

%files -n xgridedit
%doc src/xgrid/README.xgrid

* Fri Apr 12 2013 Igor Vlasenko <viy at altlinux.ru> 4.5.9-alt1_4
- update from fc import

* Tue Jan 29 2013 Cronbuild Service <cronbuild at altlinux.org> 4.5.8-alt2_1
- rebuild to get rid of unmets

* Thu Jan 03 2013 Igor Vlasenko <viy at altlinux.ru> 4.5.8-alt1_1
- initial fc import

Проект Geyser основан на коде из проекта Prometheus 2.0, который был доступен по лицензии MIT