Skip to content
Snippets Groups Projects
nordugrid-arc.spec.in 47.1 KiB
Newer Older
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
%if %{?rhel}%{!?rhel:0} == 5
%global __python26 %{_bindir}/python2.6
%{!?python26_sitearch: %global python26_sitearch %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python26_sitelib: %global python26_sitelib %(%{__python26} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
# Disable the default python byte compilation
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%endif

Mattias Ellert's avatar
Mattias Ellert committed
%if %{?filter_setup:1}%{!?filter_setup:0}
%filter_provides_in %{python_sitearch}.*\.so$
%if %{?rhel}%{!?rhel:0} == 5
%filter_provides_in %{python26_sitearch}.*\.so$
%endif
%if %{?fedora}%{!?fedora:0} >= 13
%filter_provides_in %{python3_sitearch}.*\.so$
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%filter_setup
%endif

%if %{?fedora}%{!?fedora:0} >= 12 || %{?rhel}%{!?rhel:0}
%global with_xrootd  %{!?_without_xrootd:1}%{?_without_xrootd:0}
%else
%global with_xrootd  0
%endif

%global with_lfc  %{!?_without_lfc:1}%{?_without_lfc:0}
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
%global with_java %{!?_without_java:1}%{?_without_java:0}
%else
%global with_java 0
%endif
%global with_gcj  %{!?_with_gcj:0}%{?_with_gcj:1}
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
%if %{?rhel}%{!?rhel:0} == 6
%ifarch ppc64
# The python module doesn't build on RHEL6 ppc64 (.toc1 section overflow)
%global with_python 0
%else
%global with_python 1
%endif
%else
%global with_python 1
%endif
%else
%global with_python 0
%endif

%if %{?fedora}%{!?fedora:0} >= 7 || %{?rhel}%{!?rhel:0} >= 5
%global with_acix 1
%else
%global with_acix 0
%endif

%if %{?fedora}%{!?fedora:0} >= 16 || %{?rhel}%{!?rhel:0} >= 5
%global with_gfal 1
%else
%global with_gfal 0
%endif

%if %{?fedora}%{!?fedora:0} >= 8 || %{?rhel}%{!?rhel:0} >= 4
%global with_canl %{!?_without_canl:1}%{?_without_canl:0}
%else
%global with_canl 0
%endif

Name:		@PACKAGE@
Version:	@baseversion@
Release:	@fedorarelease@%{?dist}
Summary:	Advanced Resource Connector Grid Middleware
Group:		System Environment/Daemons
License:	ASL 2.0
URL:		http://www.nordugrid.org/
Source:		http://download.nordugrid.org/packages/%{name}/releases/%{version}@preversion@/src/%{name}-%{version}@preversion@.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Provides:	%{name}-libs = %{version}-%{release}
Obsoletes:	%{name}-libs < 1.0.0
Provides:	nordugrid-arc1 = 1.3.0
Obsoletes:	nordugrid-arc1 < 1.0.0
Provides:	nordugrid-arc-nox = 1.3.0
Obsoletes:	nordugrid-arc-nox < 1.3.0
#		Packages dropped without replacements
Obsoletes:	%{name}-httpsd < 0.8.2-1
Obsoletes:	%{name}-logger-server < 0.8.2-1
Mattias Ellert's avatar
Mattias Ellert committed
Obsoletes:	nordugrid-arc1-janitor < 1.0.0
Obsoletes:	nordugrid-arc-nox-charon < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
Obsoletes:	nordugrid-arc-nox-chelonia < 1.3.0
Obsoletes:	nordugrid-arc-nox-compiler < 1.3.0
Obsoletes:	nordugrid-arc-nox-delegation < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
Obsoletes:	nordugrid-arc-nox-hopi < 1.3.0
Obsoletes:	nordugrid-arc-nox-isis < 1.3.0
Obsoletes:	nordugrid-arc-nox-janitor < 1.3.0
Obsoletes:	nordugrid-arc-nox-paul < 1.3.0
Obsoletes:	nordugrid-arc-nox-saml2sp < 1.3.0
Obsoletes:	nordugrid-arc-nox-slcs < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
Obsoletes:	nordugrid-arc-chelonia < 2.0.0
Obsoletes:	nordugrid-arc-hopi < 2.0.0
Obsoletes:	nordugrid-arc-isis < 2.0.0
Obsoletes:	nordugrid-arc-janitor < 2.0.0

BuildRequires:	cppunit-devel
BuildRequires:	pkgconfig
%if %{?fedora}%{!?fedora:0} >= 12 || %{?rhel}%{!?rhel:0} >= 6
BuildRequires:	libuuid-devel
BuildRequires:	e2fsprogs-devel
BuildRequires:	gettext
%if %{with_python}
BuildRequires:	python-devel
%if %{?rhel}%{!?rhel:0} == 5
BuildRequires:	python26-devel
%endif
%if %{?fedora}%{!?fedora:0} >= 13
BuildRequires:	python3-devel
%endif
BuildRequires:	glibmm24-devel
BuildRequires:	glib2-devel
BuildRequires:	libxml2-devel
BuildRequires:	openssl
BuildRequires:	openssl-devel
BuildRequires:	xmlsec1-devel >= 1.2.4
BuildRequires:	xmlsec1-openssl-devel >= 1.2.4
%if %{?fedora}%{!?fedora:5} > 4 && %{?suse_version:0}%{!?suse_version:1}
Anders Waananen's avatar
Anders Waananen committed
BuildRequires:	nss-devel
BuildRequires:	openldap-devel
BuildRequires:	globus-common-devel
BuildRequires:	globus-ftp-client-devel
BuildRequires:	globus-ftp-control-devel
BuildRequires:	globus-rls-client-devel
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_lfc}
BuildRequires:	lfc-devel
BuildRequires:	gridsite-devel
%if %{with_canl}
BuildRequires:	canl-c++-devel
%endif
%if %{with_xrootd}
BuildRequires:	xrootd-devel
%if %{with_gfal}
BuildRequires:  gfal2-devel
%endif
Anders Waananen's avatar
Anders Waananen committed
%if %{?suse_version}%{!?suse_version:0}
BuildRequires:	libdb-4_5-devel
Anders Waananen's avatar
Anders Waananen committed
%else
%if %{?fedora}%{!?fedora:0} >= 15 || %{?rhel}%{!?rhel:0} >= 7
Mattias Ellert's avatar
Mattias Ellert committed
BuildRequires:	libdb-cxx-devel
%else
%if %{?fedora}%{!?fedora:0} == 14
BuildRequires:	libdb-devel
%else
BuildRequires:	db4-devel
Anders Waananen's avatar
Anders Waananen committed
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%endif
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java}
BuildRequires:	java-devel
BuildRequires:	jpackage-utils
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_gcj}
BuildRequires:	java-gcj-compat-devel
Mattias Ellert's avatar
Mattias Ellert committed
%endif
%endif
# Needed for LRMS testing during make check
BuildRequires:	perl(Test::Harness)
BuildRequires:	perl(Test::Simple)
BuildRequires:	mktemp
# Needed to run ACIX unit tests
BuildRequires:	python-twisted-core
BuildRequires:	python-twisted-web
BuildRequires:	pyOpenSSL
%if %{?rhel}%{!?rhel:0} == 5
BuildRequires:	python-hashlib
%endif
%endif
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
# The compilation of the selinux module fails on Fedora 5
BuildRequires:	selinux-policy-devel
%if %{?fedora}%{!?fedora:0} >= 4 || %{?rhel}%{!?rhel:0} >= 5
BuildRequires:	libtool-ltdl-devel
BuildRequires:	libtool
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

The Advanced Resource Connector (ARC) brings computing resources
together across institutional boundaries. This concept is commonly
referred to as a "computational grid". Historically, grids address the
organization of distributed storage of data and parallel computation,
but could be expanded to arbitrary services.

Just like the web, ARC has its roots in the IT infrastructure that was
erected to analyze the experiments for high energy physics at CERN.
The first release, ARC-0.x, was dependent on Globus, the current
release keeps that compatibility but can also be used independently.

Summary:	ARC command line interface
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Provides:	nordugrid-arc1-client = 1.3.0
Obsoletes:	nordugrid-arc1-client < 1.0.0
Provides:	nordugrid-arc-nox-client = 1.3.0
Obsoletes:	nordugrid-arc-nox-client < 1.3.0
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
For the regular user of any ARC-based computational grid,
this client package contains (or depends on) all packages
that are needed to submit jobs, query their status and
retrieve results.
Summary:	ARC Hosting Environment Daemon
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-server = 1.3.0
Obsoletes:	nordugrid-arc1-server < 1.0.0
Provides:	nordugrid-arc-nox-hed = 1.3.0
Obsoletes:	nordugrid-arc-nox-hed < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
%description hed
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
The ARC Hosting Environment Daemon (HED). This daemon is a container for
ARC services.
%package gridftpd
Summary:	ARC gridftp server
Group:		System Environment/Daemons
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-globus
Provides:	nordugrid-arc-nox-gridftp-server = 1.3.0
Obsoletes:	nordugrid-arc-nox-gridftp-server < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
%description gridftpd
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC gridftp server which has a plugin framework.
Current plugins include:

  fileplugin : Standard gridftp server based on Globus globus-ftp-control
  gaclplugin : Enhanced server with support for GACL authorization
  jobplugin  : Classical ARC job submission interface

%package cache-service
Summary:	ARC cache service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Provides:	nordugrid-arc-nox-cache-service = 1.3.0
Obsoletes:	nordugrid-arc-nox-cache-service < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
%description cache-service
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC cache service. It provides a way to perform
some operations on the A-REX cache remotely. It can be especially helpful
for data management within a pilot job framework.

%package datadelivery-service
Summary:	ARC data delivery service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%description datadelivery-service
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC data delivery service.

%package aris
Summary:	ARC LDAP information service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	bdii
Provides:	%{name}-infoindex = %{version}-%{release}
Obsoletes:	%{name}-infoindex < 0.8.2-1
Provides:	%{name}-infosys-ldap = %{version}-%{release}
Obsoletes:	%{name}-infosys-ldap < 1.0.0
Provides:	nordugrid-arc-nox-ldap-infosys = 1.3.0
Obsoletes:	nordugrid-arc-nox-ldap-infosys < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
Mattias Ellert's avatar
Mattias Ellert committed
%endif
Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6
Requires(post):		policycoreutils-python
Requires(postun):	policycoreutils-python
%description aris
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the LDAP based information system for ARC.
This package is not self-contained. it should be pulled in by either
nordugrid-arc-arex to be a part of a local information system or by
nordugrid-arc-egiis to be a part of a EGIIS service.
%package egiis
Summary:	ARC EGIIS service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-aris = %{version}-%{release}
Provides:	nordugrid-arc-nox-giis = 1.3.0
Obsoletes:	nordugrid-arc-nox-giis < 1.3.0
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%description egiis
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
The EGIIS is the Information Index Service used by ARC, This service is
used to set up a ldap-based server that local information systems register
to.
%package ldap-monitor
Summary:	ARC LDAP monitor service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	%{name}-monitor = %{version}-%{release}
Obsoletes:	%{name}-monitor < 1.0.0
Requires:	php
Requires:	php-gd
Requires:	php-ldap
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
%endif

%description ldap-monitor
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the LDAP monitor system for ARC.
This package is self-contained. It is used to set up a web-based monitor
which pulls information from a EGIIS and shows it graphically.
%package ws-monitor
Summary:	ARC WS monitor service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
%endif

%description ws-monitor
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the WS monitor system for ARC.
This package is self-contained. It is used to set up a web-based monitor
which pulls information from ISIS and shows it graphically.

Summary:	ARC Remote EXecution service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Requires:	mktemp
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	stomppy
Requires:	m2crypto
Requires:	%{name}-aris = %{version}-%{release}
Provides:	%{name}-grid-manager = %{version}-%{release}
Obsoletes:	%{name}-grid-manager < 1.0.0
Provides:	%{name}-server = %{version}-%{release}
Obsoletes:	%{name}-server < 1.0.0
Provides:	nordugrid-arc1-arex = 1.3.0
Obsoletes:	nordugrid-arc1-arex < 1.0.0
Provides:	nordugrid-arc-nox-arex = 1.3.0
Obsoletes:	nordugrid-arc-nox-arex < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
The ARC Remote EXecution service (AREX) provides a service for the
execution of compute jobs and the transfer of input or output data.
Summary:	ARC base plugins
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-plugins-base = 1.3.0
Obsoletes:	nordugrid-arc1-plugins-base < 1.0.0
Provides:	nordugrid-arc-nox-plugins-base = 1.3.0
Obsoletes:	nordugrid-arc-nox-plugins-base < 1.3.0
Provides:	nordugrid-arc-plugins-base = %{version}-%{release}
Obsoletes:	nordugrid-arc-plugins-base < 1.0.0-0.b2
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
ARC base plugins. This includes the Message Chain Components (MCCs) and
Data Manager Components (DMCs).

%package plugins-globus
Summary:	ARC Globus plugins
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-plugins-globus = 1.3.0
Obsoletes:	nordugrid-arc1-plugins-globus < 1.0.0
Provides:	nordugrid-arc-nox-plugins-globus = 1.3.0
Obsoletes:	nordugrid-arc-nox-plugins-globus < 1.3.0

%description plugins-globus
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
ARC Globus plugins. This includes the Globus dependent Data Manager
Components (DMCs).
Summary:  ARC proxy client based on canl
Group:    Applications/Internet
Requires: %{name} = %{version}-%{release}

NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package includes a preview of the arcproxy command based on canl.
%endif

%if %{with_xrootd}
%package plugins-xrootd
Summary:  ARC xrootd plugins
Group:    System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description plugins-xrootd
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

ARC xrootd plugins. These allow access to data through the xrootd protocol.
%endif

%if %{with_gfal}
%package plugins-gfal

Summary:  ARC Globus plugins
Group:    System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description plugins-gfal
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

ARC plugins for GFAL2. This allows third-party transfer and adds support
for several extra transfer protocols (rfio, dcap, gsidcap). Specific
protocol support is provided by separate gfal2-plugin packages.
%endif

%package acix-core
Summary:	ARC cache index - core
Group:		System Environment/Libraries
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	pyOpenSSL
%if %{?rhel}%{!?rhel:0} == 5
Requires:	python-hashlib
%endif

%description acix-core
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Core components of the ARC Cache Index (ACIX).

%package acix-cache
Summary:	ARC cache index - cache server
Group:		System Environment/Libraries
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	pyOpenSSL
%if %{?rhel}%{!?rhel:0} == 5
Requires:	python-hashlib
%endif
Requires:	%{name}-acix-core = %{version}-%{release}

%description acix-cache
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Cache server component of the ARC Cache Index (ACIX), usually installed
alongside A-REX. This component collects information on the content of
an A-REX cache.

%package acix-index
Summary:	ARC cache index - index server
Group:		System Environment/Libraries
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	pyOpenSSL
%if %{?rhel}%{!?rhel:0} == 5
Requires:	python-hashlib
%endif
Requires:	%{name}-acix-core = %{version}-%{release}

%description acix-index
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Index server component of the ARC Cache Index (ACIX), usually installed
independently of any A-REX installation. This component pulls cache content
from cache servers and can be queried by clients for the location of cached
files.
Summary:	ARC development files
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	glibmm24-devel
Requires:	glib2-devel
Requires:	libxml2-devel
Requires:	openssl-devel
Provides:	%{name}-libs-devel = %{version}-%{release}
Obsoletes:	%{name}-libs-devel < 1.0.0
Provides:	nordugrid-arc1-devel = 1.3.0
Obsoletes:	nordugrid-arc1-devel < 1.0.0
Provides:	nordugrid-arc-nox-devel = 1.3.0
Obsoletes:	nordugrid-arc-nox-devel < 1.3.0
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
Header files and libraries needed to develop applications using ARC.
%if %{with_python}
Summary:	ARC Python wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-python = 1.3.0
Obsoletes:	nordugrid-arc1-python < 1.0.0
Provides:	nordugrid-arc-nox-python = 1.3.0
Obsoletes:	nordugrid-arc-nox-python < 1.3.0
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
Python bindings for ARC.
%if %{?rhel}%{!?rhel:0} == 5
%package python26
Summary:	ARC Python wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	python(abi) = 2.6

%description python26
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Python bindings for ARC.
%endif

%if %{?fedora}%{!?fedora:0} >= 13
%package python3
Summary:	ARC Python wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description python3
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Python bindings for ARC.
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java}
Summary:	ARC Java wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	java
Requires:	jpackage-utils
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_gcj}
Requires(post):		java-gcj-compat
Requires(postun):	java-gcj-compat
Mattias Ellert's avatar
Mattias Ellert committed
%endif
Provides:	nordugrid-arc1-java = 1.3.0
Obsoletes:	nordugrid-arc1-java < 1.0.0
Provides:	nordugrid-arc-nox-java = 1.3.0
Obsoletes:	nordugrid-arc-nox-java < 1.3.0
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
Java bindings for ARC.
%package doxygen
Summary:	ARC API documentation
Group:		Documentation
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
%endif

%description doxygen
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

Reference to the ARC programming API. It is prepared with doxygen.

Summary:	NorduGrid authorization tools
Group:		Applications/Internet
Requires:	perl(Crypt::SSLeay)
Requires:	perl(SOAP::Lite)
Requires:	perl(Crypt::OpenSSL::X509)
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC authorization machinery.
A prominent tool distributed in this package is the nordugridmap
script to collect user information from the virtual organizations.
Summary:	NorduGrid authentication tools
Group:		Applications/Internet
Requires:	fetch-crl
Requires(post):	fetch-crl
Requires(post):	chkconfig
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
NorduGrid is a collaboration aiming at development, maintenance and
support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

The nordugrid-arc-ca-utils packages has been obsoleted.
The functionality of the grid-update-crls tool is provided by the
fetch-crl tool in the fetch-crl package.

%setup @fedorasetupopts@
%if %{?fedora}%{!?fedora:0} <= 9 && %{?rhel}%{!?rhel:0} <= 5
# Older versions of SELinux does not have policy for open
cd selinux
sed -e 's/ open / /' -e /open/d -i %{name}-egiis.te
cd -
%endif

%configure --disable-static \
Mattias Ellert's avatar
Mattias Ellert committed
%if ! %{with_java}
%if ! %{with_python}
     --disable-python \
%if %{?rhel}%{!?rhel:0} == 5
     --with-altpython=python26 \
%endif
%if %{?fedora}%{!?fedora:0} >= 13
     --with-altpython=python3 \
%if ! %{with_xrootd}
     --with-docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags}
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
cd selinux
make -f /usr/share/selinux/devel/Makefile
cd -
%endif

Anders Waananen's avatar
Anders Waananen committed
%check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -p -m 644 debian/%{name}-arex.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-arex
install -p -m 644 debian/%{name}-gridftpd.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-gridftpd
install -p -m 644 debian/%{name}-aris.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-aris
install -p -m 644 debian/%{name}-datadelivery-service.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-datadelivery-service
find $RPM_BUILD_ROOT -type f -name \*.la -exec rm -fv '{}' ';'
find $RPM_BUILD_ROOT -name libarcglobusutils.so -exec rm -fv '{}' ';'
# Turn off default enabling of the services
Mattias Ellert's avatar
Mattias Ellert committed
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
sed -e 's/\(chkconfig: \)\w*/\1-/' \
    -e '/Default-Start/d' \
    -e 's/\(Default-Stop:\s*\).*/\10 1 2 3 4 5 6/' \
    -i $RPM_BUILD_ROOT%{_initrddir}/*
Mattias Ellert's avatar
Mattias Ellert committed

# Create log directory
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/arc

Mattias Ellert's avatar
Mattias Ellert committed
%find_lang %{name}
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java} && %{with_gcj}
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/aot-compile-rpm
%endif

%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
cd selinux
mkdir -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
install -p -m 644 %{name}-egiis.pp \
    $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
cd -
%endif

%if %{?rhel}%{!?rhel:0} == 5
%{__python}    -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitearch}", 1)' > /dev/null
%{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitearch}", 1)' > /dev/null
%{__python26}	 -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{python26_sitearch}"'", 10, "%{python26_sitearch}", 1)' > /dev/null
%{__python26} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{python26_sitearch}"'", 10, "%{python26_sitearch}", 1)' > /dev/null
%endif

%clean
rm -rf $RPM_BUILD_ROOT

Anders Waananen's avatar
Anders Waananen committed
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

Mattias Ellert's avatar
Mattias Ellert committed
%post plugins-globus -p /sbin/ldconfig

%postun plugins-globus -p /sbin/ldconfig

/sbin/chkconfig --add arched

if [ $1 -eq 0 ]; then
  service arched stop > /dev/null 2>&1
  /sbin/chkconfig --del arched
fi

if [ $1 -ge 1 ]; then
  service arched condrestart > /dev/null 2>&1
fi

%post arex
/sbin/chkconfig --add a-rex

%preun arex
if [ $1 -eq 0 ]; then
  service a-rex stop > /dev/null 2>&1
  /sbin/chkconfig --del a-rex
fi

%postun arex
if [ $1 -ge 1 ]; then
  service a-rex condrestart > /dev/null 2>&1
fi

%post gridftpd
/sbin/chkconfig --add gridftpd

%preun gridftpd
if [ $1 -eq 0 ]; then
  service gridftpd stop > /dev/null 2>&1
  /sbin/chkconfig --del gridftpd
fi

%postun gridftpd
if [ $1 -ge 1 ]; then
  service gridftpd condrestart > /dev/null 2>&1
fi

%post cache-service
/sbin/chkconfig --add arc-cache-service
if [ $1 -eq 0 ]; then
  service arc-cache-service stop > /dev/null 2>&1
  /sbin/chkconfig --del arc-cache-service
if [ $1 -ge 1 ]; then
  service arc-cache-service condrestart > /dev/null 2>&1
%post datadelivery-service
/sbin/chkconfig --add arc-datadelivery-service

%preun datadelivery-service
if [ $1 -eq 0 ]; then
  service arc-datadelivery-service stop > /dev/null 2>&1
  /sbin/chkconfig --del arc-datadelivery-service
fi

%postun datadelivery-service
if [ $1 -ge 1 ]; then
  service arc-datadelivery-service condrestart > /dev/null 2>&1
/sbin/chkconfig --add nordugrid-arc-bdii
/sbin/chkconfig --add nordugrid-arc-slapd
/sbin/chkconfig --add nordugrid-arc-inforeg
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
semanage port -a -t ldap_port_t -p tcp 2135 2>/dev/null || :
semanage fcontext -a -t slapd_db_t "/var/lib/arc/bdii/db(/.*)?" 2>/dev/null || :
semanage fcontext -a -t slapd_var_run_t "/var/run/arc/bdii/db(/.*)?" 2>/dev/null || :
# Remove selinux labels for old arc bdii var dir
semanage fcontext -d -t slapd_db_t "/var/run/arc/bdii(/.*)?" 2>/dev/null || :
if [ $1 -eq 0 ]; then
  service nordugrid-arc-bdii stop > /dev/null 2>&1
  service nordugrid-arc-slapd stop > /dev/null 2>&1
  service nordugrid-arc-inforeg stop > /dev/null 2>&1
  /sbin/chkconfig --del service nordugrid-arc-bdii
  /sbin/chkconfig --del nordugrid-arc-slapd
  /sbin/chkconfig --del nordugrid-arc-inforeg
if [ $1 -ge 1 ]; then
  service nordugrid-arc-bdii condrestart > /dev/null 2>&1
  service nordugrid-arc-slapd condrestart > /dev/null 2>&1
  service nordugrid-arc-inforeg condrestart > /dev/null 2>&1
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ]; then
  semanage port -d -t ldap_port_t -p tcp 2135 2>/dev/null || :
  semanage fcontext -d -t slapd_db_t "/var/lib/arc/bdii/db(/.*)?" 2>/dev/null || :
  semanage fcontext -d -t slapd_var_run_t "/var/run/arc/bdii/db(/.*)?" 2>/dev/null || :
%triggerun aris -- bdii
service nordugrid-arc-bdii condrestart > /dev/null 2>&1
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
/usr/sbin/semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-egiis.pp > /dev/null 2>&1 || :
/sbin/restorecon %{_sbindir}/arc-infoindex-relay
%endif

%postun egiis
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ] ; then
  /usr/sbin/semodule -r %{name}-egiis > /dev/null 2>&1 || :
fi
%endif

%post acix-cache
/sbin/chkconfig --add acix-cache

%preun acix-cache
if [ $1 -eq 0 ]; then
  service acix-cache stop > /dev/null 2>&1
  /sbin/chkconfig --del acix-cache
fi

%postun acix-cache
if [ $1 -ge 1 ]; then
  service acix-cache condrestart > /dev/null 2>&1
fi

%post acix-index
/sbin/chkconfig --add acix-index