Blob Blame History Raw
%{!?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)")}

%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}

%{!?_jnidir: %global _jnidir %{_libdir}/java}

%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

%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
%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

%if %{?fedora}%{!?fedora:0} >= 7 || %{?rhel}%{!?rhel:0} >= 5
%if %{?rhel}%{!?rhel:0} == 5
%ifarch ppc
# RHEL 5 ppc only has java 1.4
%global with_java 0
%global with_junit 0
%else
%global with_java %{!?_without_java:1}%{?_without_java:0}
%global with_junit %{!?_without_junit:1}%{?_without_junit:0}
%endif
%else
%global with_java %{!?_without_java:1}%{?_without_java:0}
%global with_junit %{!?_without_junit:1}%{?_without_junit:0}
%endif
%else
%global with_java 0
%global with_junit 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
%global with_pylint 0
%else
%global with_python 1
%global with_pylint %{!?_without_pylint:1}%{?_without_pylint:0}
%endif
%else
%global with_python 1
%global with_pylint %{!?_without_pylint:1}%{?_without_pylint:0}
%endif
%else
%global with_python 0
%global with_pylint 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} >= 18 || %{?rhel}%{!?rhel:0} >= 5
%global with_canl %{!?_without_canl:1}%{?_without_canl:0}
%else
%global with_canl 0
%endif

%global with_xmlsec1 %{!?_without_xmlsec1:1}%{?_without_xmlsec1:0}

%global pkgdir arc

Name:		nordugrid-arc
Version:	5.0.5
Release:	2%{?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}/src/%{name}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#		Packages dropped without replacements
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
Obsoletes:	nordugrid-arc-doxygen < 4.0.0

BuildRequires:	cppunit-devel
BuildRequires:	pkgconfig
%if %{?fedora}%{!?fedora:0} >= 12 || %{?rhel}%{!?rhel:0} >= 6
BuildRequires:	libuuid-devel
%else
BuildRequires:	e2fsprogs-devel
%endif
BuildRequires:	gettext
%if %{with_python}
BuildRequires:	python-devel
%endif
%if %{?rhel}%{!?rhel:0} == 5
BuildRequires:	python26-devel
%endif
%if %{?fedora}%{!?fedora:0} >= 13
BuildRequires:	python3-devel
%endif
%if %{with_pylint}
BuildRequires:	pylint
%endif
BuildRequires:	glibmm24-devel
BuildRequires:	glib2-devel
BuildRequires:	libxml2-devel
BuildRequires:	openssl
BuildRequires:	openssl-devel
%if %{with_xmlsec1}
BuildRequires:	xmlsec1-devel >= 1.2.4
BuildRequires:	xmlsec1-openssl-devel >= 1.2.4
%endif
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 4
BuildRequires:	nss-devel
%else
BuildRequires:	mozilla-nss-devel
%endif
BuildRequires:	openldap-devel
BuildRequires:	globus-common-devel
BuildRequires:	globus-ftp-client-devel
BuildRequires:	globus-ftp-control-devel
%if %{with_canl}
BuildRequires:	canl-c++-devel
%endif
%if %{with_xrootd}
%if %{?fedora}%{!?fedora:0} >= 17 || %{?rhel}%{!?rhel:0} >= 5
BuildRequires:	xrootd-client-devel
%else
BuildRequires:	xrootd-devel
%endif
%endif
%if %{with_gfal}
BuildRequires:	gfal2-devel
%endif
%if %{?fedora}%{!?fedora:0} >= 15 || %{?rhel}%{!?rhel:0} >= 7
BuildRequires:	libdb-cxx-devel
%else
%if %{?fedora}%{!?fedora:0} == 14
BuildRequires:	libdb-devel
%else
BuildRequires:	db4-devel
%endif
%endif
%if %{with_java}
BuildRequires:	java-devel >= 1.5.0
BuildRequires:	jpackage-utils
%if %{with_gcj}
BuildRequires:	java-gcj-compat-devel
%endif
%if %{with_junit}
BuildRequires:	junit
%endif
%endif
# Needed for Boinc backend testing during make check
BuildRequires:	perl(DBI)
# Needed for infoprovider testing during make check
BuildRequires:	perl(XML::Simple)
# Needed for LRMS testing during make check
BuildRequires:	perl(Test::Harness)
BuildRequires:	perl(Test::Simple)
BuildRequires:	mktemp
# Needed to run ACIX unit tests
%if %{with_acix}
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
BuildRequires:	checkpolicy
%endif
BuildRequires:	swig
%if %{?fedora}%{!?fedora:0} >= 4 || %{?rhel}%{!?rhel:0} >= 5
BuildRequires:	libtool-ltdl-devel
%else
BuildRequires:	libtool
%endif

%description
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.

%package client
Summary:	ARC command line interface
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}

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

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.

%package hed
Summary:	ARC Hosting Environment Daemon
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}

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
Connector (ARC).

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

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
  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}

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 ldap-infosys
Summary:	ARC LDAP information service
Group:		System Environment/Libraries
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
Requires:	openldap-servers
Requires:	glue-schema >= 2.0.10
Requires:	bdii

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%if %{?fedora}%{!?fedora:0} >= 23 || %{?rhel}%{!?rhel:0} >= 8
Requires(post):		policycoreutils-python-utils
Requires(postun):	policycoreutils-python-utils
%else
%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6
Requires(post):		policycoreutils-python
Requires(postun):	policycoreutils-python
%else
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%endif
%endif
%endif

%description ldap-infosys
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 aris
Summary:	ARC local information system
Group:		System Environment/Libraries
Requires:	%{name}-ldap-infosys = %{version}-%{release}
Requires:	bdii
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
Requires:	openldap-servers
Requires:	glue-schema >= 2.0.10
Requires:	bdii

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%if %{?fedora}%{!?fedora:0} >= 23 || %{?rhel}%{!?rhel:0} >= 8
Requires(post):		policycoreutils-python-utils
Requires(postun):	policycoreutils-python-utils
%else
%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6
Requires(post):		policycoreutils-python
Requires(postun):	policycoreutils-python
%else
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%endif
%endif
%endif

%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 but is closely connected to
nordugrid-arc-arex.

%package egiis
Summary:	ARC EGIIS service
Group:		System Environment/Libraries
Requires:	%{name}-ldap-infosys = %{version}-%{release}
Requires:	openldap-servers
Requires:	glue-schema >= 2.0.10

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%endif

%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}
Requires:	php
Requires:	php-gd
Requires:	php-ldap
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%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
BuildArch:	noarch
%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.

%package arex
Summary:	ARC Remote EXecution service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
%if %{with_python}
Requires:	%{name}-python = %{version}-%{release}
%endif
Requires:	mktemp
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	stomppy
Requires:	python-ldap
Requires:	python-dirq
Requires:	%{name}-aris = %{version}-%{release}

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%description arex
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.

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

%description plugins-needed
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}

%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).

%if %{with_canl}
%package arcproxyalt
Summary:	ARC proxy client based on canl
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}

%description arcproxyalt
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 GFAL 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

%if %{with_acix}
%package acix-core
Summary:	ARC cache index - core
Group:		System Environment/Libraries
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
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
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
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
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
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.
%endif

%package devel
Summary:	ARC development files
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	glibmm24-devel
Requires:	glib2-devel
Requires:	libxml2-devel
Requires:	openssl-devel

%description devel
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}
%package python
Summary:	ARC Python wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description python
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 %{?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.
%endif

%if %{with_java}
%package java
Summary:	ARC Java wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
%if %{?fedora}%{!?fedora:0} >= 20 || %{?rhel}%{!?rhel:0} >= 7
Requires:	java-headless
%else
Requires:	java
%endif
Requires:	jpackage-utils
%if %{with_gcj}
Requires(post):		java-gcj-compat
Requires(postun):	java-gcj-compat
%endif

%description java
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.
%endif

%package gridmap-utils
Summary:	NorduGrid authorization tools
Group:		Applications/Internet
Requires:	perl(Crypt::SSLeay)
Requires:	perl(SOAP::Lite)
Requires:	perl(Crypt::OpenSSL::X509)
Requires:	crontabs
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description gridmap-utils
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.

%package ca-utils
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
BuildArch:	noarch
%endif

%description ca-utils
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.

%package misc-utils
Summary:	NorduGrid misc tools
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}

%description misc-utils
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 utilities for various tasks including testing. The
package is usually not required by users or sysadmins but is mainly for
developers.

%prep
%setup -q

%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

%build
%if %{?fedora}%{!?fedora:0} >= 23
# Workaround for too new libsigc++/glibmm in Fedora 23+
export CXXFLAGS="%{optflags} -std=c++11"
%endif

%configure --disable-static \
%if ! %{with_java}
     --disable-java \
%endif
%if ! %{with_python}
     --disable-swig-python \
%endif
%if ! %{with_acix}
     --disable-acix \
%endif
%if %{with_gfal}
     --enable-gfal \
%endif
%if %{?rhel}%{!?rhel:0} == 5
     --with-altpython=python26 \
%endif
%if %{?fedora}%{!?fedora:0} >= 13
     --with-altpython=python3 \
%endif
%if %{with_canl}
     --enable-canlxx \
%endif
%if ! %{with_xrootd}
     --disable-xrootd \
%endif
     --disable-doc \
     --with-docdir=%{_pkgdocdir} \
     --with-jnidir=%{_jnidir}

make %{?_smp_mflags}

%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
cd selinux
make -f /usr/share/selinux/devel/Makefile
cd -
%endif

%check
make check

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# Install Logrotate.
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 '{}' ';'

# The py-compile script in the source tarball is old (RHEL 6)
# It does the wrong thing for python 3 - remove and let rpmbuild do it right
find $RPM_BUILD_ROOT -type f -name \*.pyc -exec rm -fv '{}' ';'
find $RPM_BUILD_ROOT -type f -name \*.pyo -exec rm -fv '{}' ';'

# libarcglobusutils is not part of the ARC api.
find $RPM_BUILD_ROOT -name libarcglobusutils.so -exec rm -fv '{}' ';'

# Turn off default enabling of the services
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
sed -e 's/\(chkconfig: \) *[^ ]*/\1-/' \
    -e '/Default-Start/d' \
    -e 's/\(Default-Stop:\s*\).*/\10 1 2 3 4 5 6/' \
    -i $RPM_BUILD_ROOT%{_initrddir}/*

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

# Create spool directories for Jura
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/arc
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/arc/ssm
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/arc/urs

%find_lang %{name}

%if %{with_java} && %{with_gcj}
%{_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

# Remove examples and let RPM package them under /usr/share/doc using the doc macro
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{pkgdir}/examples
make -C src/libs/data-staging/examples	DESTDIR=$PWD/docdir/devel  pkgdatadir= install-exampleDATA
make -C src/hed/libs/compute/examples	DESTDIR=$PWD/docdir/devel  pkgdatadir= install-exampleDATA
make -C src/hed/libs/data/examples	DESTDIR=$PWD/docdir/devel  pkgdatadir= install-exampleDATA
make -C src/hed/acc/PythonBroker	DESTDIR=$PWD/docdir/python pkgdatadir= install-exampleDATA
make -C python/examples			DESTDIR=$PWD/docdir/python pkgdatadir= install-exampleDATA
make -C java/examples			DESTDIR=$PWD/docdir/java   pkgdatadir= install-exampleDATA
make -C src/clients			DESTDIR=$PWD/docdir/client pkgdatadir= install-exampleDATA
make -C src/tests/echo			DESTDIR=$PWD/docdir/hed	   pkgdatadir= install-exampleDATA
make -C src/hed				DESTDIR=$PWD/docdir/hed	   pkgdatadir= install-profileDATA

# arc.conf.reference needs special handling
make -C src/doc DESTDIR=$RPM_BUILD_ROOT install-exampleDATA

# Link to arc.conf.reference from doc
rm -f $PWD/docdir/arc.conf.reference
ln -s %{_datadir}/%{pkgdir}/examples/arc.conf.reference $PWD/docdir/arc.conf.reference

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post plugins-globus -p /sbin/ldconfig

%postun plugins-globus -p /sbin/ldconfig

%post hed
/sbin/chkconfig --add arched

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

%postun hed
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

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

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

%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
fi

%post ldap-infosys
/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_etc_t "/var/run/arc/infosys/bdii-slapd\.conf" 2>/dev/null || :
%endif

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

%postun ldap-infosys
if [ $1 -ge 1 ]; then
  service nordugrid-arc-slapd condrestart > /dev/null 2>&1
  service nordugrid-arc-inforeg condrestart > /dev/null 2>&1
fi
%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_etc_t "/var/run/arc/infosys/bdii-slapd\.conf" 2>/dev/null || :
fi
%endif

%post aris
/sbin/chkconfig --add nordugrid-arc-bdii
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
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 || :
%endif

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

%postun aris
if [ $1 -ge 1 ]; then
  service nordugrid-arc-bdii condrestart > /dev/null 2>&1 || :
fi
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ]; then
  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 || :
fi
%endif

%triggerun aris -- bdii
service nordugrid-arc-bdii condrestart > /dev/null 2>&1 || :

%post egiis
/sbin/chkconfig --add nordugrid-arc-egiis
%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

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

%postun egiis
if [ $1 -ge 1 ]; then
  service nordugrid-arc-egiis condrestart > /dev/null 2>&1 || :
fi
%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

%if %{with_acix}
%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

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

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

%if %{with_java} && %{with_gcj}
%post java
[ -x %{_bindir}/rebuild-gcj-db ] && %{_bindir}/rebuild-gcj-db
%endif

%if %{with_java} && %{with_gcj}
%postun java
[ -x %{_bindir}/rebuild-gcj-db ] && %{_bindir}/rebuild-gcj-db
%endif

%post ca-utils
# Enable and start CRL updates via cron for backward compatibility
/sbin/chkconfig fetch-crl-cron on
service fetch-crl-cron start > /dev/null 2>&1

%files -f %{name}.lang
%{!?_licensedir: %doc docdir/arc.conf.reference README AUTHORS LICENSE NOTICE ChangeLog}
%{?_licensedir: %doc docdir/arc.conf.reference README AUTHORS ChangeLog}
%{?_licensedir: %license LICENSE NOTICE}
%dir %{_libdir}/%{pkgdir}
%dir %{_libexecdir}/%{pkgdir}
%{_libdir}/libarccompute.so.*
%{_libdir}/libarccommunication.so.*
%{_libdir}/libarccommon.so.*
%{_libdir}/libarccredential.so.*
%{_libdir}/libarccredentialstore.so.*
%{_libdir}/libarccrypto.so.*
%{_libdir}/libarcdata.so.*
%{_libdir}/libarcdatastaging.so.*
%{_libdir}/%{pkgdir}/DataStagingDelivery
%{_libdir}/libarcloader.so.*
%{_libdir}/libarcmessage.so.*
%{_libdir}/libarcsecurity.so.*
%{_libdir}/libarcinfosys.so.*
%{_libdir}/libarcws.so.*
%{_libdir}/libarcwssecurity.so.*
%if %{with_xmlsec1}
%{_libdir}/libarcxmlsec.so.*
%endif
# We need to have libmodcrypto.so close to libarccrypto
%{_libdir}/%{pkgdir}/libmodcrypto.so
%{_libdir}/%{pkgdir}/libmodcrypto.apd
# We need to have libmodcredential.so close to libarccredential
%{_libdir}/%{pkgdir}/libmodcredential.so
%{_libdir}/%{pkgdir}/libmodcredential.apd
%{_libdir}/%{pkgdir}/arc-file-access
%dir %{_datadir}/%{pkgdir}/examples
%{_datadir}/%{pkgdir}/examples/arc.conf.reference
%dir %{_datadir}/%{pkgdir}/test-jobs
%{_datadir}/%{pkgdir}/test-jobs/test-job-*
%{_datadir}/%{pkgdir}/schema
%dir %{_datadir}/%{pkgdir}

%files client
%doc docdir/client/*
%{_bindir}/arccat
%{_bindir}/arcclean
%{_bindir}/arccp
%{_bindir}/arcecho
%{_bindir}/arcget
%{_bindir}/arcinfo
%{_bindir}/arckill
%{_bindir}/arcls
%{_bindir}/arcmkdir
%{_bindir}/arcrename
%{_bindir}/arcproxy
%{_bindir}/arcrenew
%{_bindir}/arcresub
%{_bindir}/arcresume
%{_bindir}/arcrm
%{_bindir}/arcstat
%{_bindir}/arcsub
%{_bindir}/arcsync
%{_bindir}/arctest
%dir %{_sysconfdir}/%{pkgdir}
%config(noreplace) %{_sysconfdir}/%{pkgdir}/client.conf
%doc %{_mandir}/man1/arccat.1*
%doc %{_mandir}/man1/arcclean.1*
%doc %{_mandir}/man1/arccp.1*
%doc %{_mandir}/man1/arcecho.1*
%doc %{_mandir}/man1/arcget.1*
%doc %{_mandir}/man1/arcinfo.1*
%doc %{_mandir}/man1/arckill.1*
%doc %{_mandir}/man1/arcls.1*
%doc %{_mandir}/man1/arcmkdir.1*
%doc %{_mandir}/man1/arcrename.1*
%doc %{_mandir}/man1/arcproxy.1*
%doc %{_mandir}/man1/arcrenew.1*
%doc %{_mandir}/man1/arcresub.1*
%doc %{_mandir}/man1/arcresume.1*
%doc %{_mandir}/man1/arcrm.1*
%doc %{_mandir}/man1/arcstat.1*
%doc %{_mandir}/man1/arcsub.1*
%doc %{_mandir}/man1/arcsync.1*
%doc %{_mandir}/man1/arctest.1*

%files hed
%doc docdir/hed/*
%{_initrddir}/arched
%{_sbindir}/arched
%{_libdir}/%{pkgdir}/libecho.so
%{_libdir}/%{pkgdir}/libecho.apd
%{_datadir}/%{pkgdir}/profiles
%doc %{_mandir}/man8/arched.8*
%doc %{_mandir}/man5/arc.conf.5*

%files gridftpd
%{_initrddir}/gridftpd
%{_sbindir}/gridftpd
%{_libdir}/%{pkgdir}/jobplugin.*
%{_libdir}/%{pkgdir}/fileplugin.*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-gridftpd
%doc %{_mandir}/man8/gridftpd.8*

%files ldap-infosys
%{_initrddir}/nordugrid-arc-ldap-infosys
%{_initrddir}/nordugrid-arc-slapd
%{_initrddir}/nordugrid-arc-inforeg
%{_datadir}/%{pkgdir}/create-slapd-config
%{_datadir}/%{pkgdir}/create-inforeg-config
%{_datadir}/%{pkgdir}/config_parser_compat.sh
%{_datadir}/%{pkgdir}/grid-info-soft-register
%{_datadir}/%{pkgdir}/ldap-schema

%files aris
%{_initrddir}/nordugrid-arc-bdii
%{_datadir}/%{pkgdir}/create-bdii-config
%{_datadir}/%{pkgdir}/glue-generator.pl
%{_datadir}/%{pkgdir}/glite-info-provider-ldap
%{_datadir}/%{pkgdir}/se.pl
%{_datadir}/%{pkgdir}/Shared.pm
%{_datadir}/%{pkgdir}/ConfigParser.pm
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-aris

%files egiis
%{_initrddir}/nordugrid-arc-egiis
%{_sbindir}/arc-infoindex-relay
%{_sbindir}/arc-infoindex-server
%{_mandir}/man8/arc-infoindex-relay.8*
%{_mandir}/man8/arc-infoindex-server.8*
%{_libdir}/%{pkgdir}/arc-infoindex-slapd-wrapper.so
%{_libdir}/%{pkgdir}/arc-infoindex-slapd-wrapper.apd
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
%{_datadir}/selinux/packages/%{name}
%endif

%files ldap-monitor
%{_datadir}/%{pkgdir}/ldap-monitor
%doc %{_mandir}/man7/ldap-monitor.7*

%files ws-monitor
%{_datadir}/%{pkgdir}/ws-monitor
%doc %{_mandir}/man7/ws-monitor.7*

%files cache-service
%{_initrddir}/arc-cache-service
%{_libdir}/%{pkgdir}/libcacheservice.so
%{_libdir}/%{pkgdir}/libcacheservice.apd

%files datadelivery-service
%{_initrddir}/arc-datadelivery-service
%{_libdir}/%{pkgdir}/libdatadeliveryservice.so
%{_libdir}/%{pkgdir}/libdatadeliveryservice.apd
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-datadelivery-service

%files arex
%{_initrddir}/a-rex
%{_libexecdir}/%{pkgdir}/cache-clean
%{_libexecdir}/%{pkgdir}/cache-list
%{_libexecdir}/%{pkgdir}/jura
%{_libexecdir}/%{pkgdir}/downloader
%{_libexecdir}/%{pkgdir}/gm-jobs
%{_libexecdir}/%{pkgdir}/gm-kick
%{_libexecdir}/%{pkgdir}/smtp-send
%{_libexecdir}/%{pkgdir}/smtp-send.sh
%{_libexecdir}/%{pkgdir}/uploader
%{_libexecdir}/%{pkgdir}/inputcheck
%{_libexecdir}/%{pkgdir}/arc-vomsac-check
%{_libexecdir}/%{pkgdir}/arc-config-check
%{_libexecdir}/%{pkgdir}/arc-blahp-logger
%{_datadir}/%{pkgdir}/cancel-*-job
%{_datadir}/%{pkgdir}/scan-*-job
%{_datadir}/%{pkgdir}/submit-*-job
%{_datadir}/%{pkgdir}/DGAuthplug.py*
%{_datadir}/%{pkgdir}/DGBridgeDataPlugin.py*
%{_datadir}/%{pkgdir}/DGLog2XML.py*
%{_libdir}/%{pkgdir}/libarex.so
%{_libdir}/%{pkgdir}/libarex.apd
%{_datadir}/%{pkgdir}/CEinfo.pl
%{_datadir}/%{pkgdir}/ARC0mod.pm
%{_datadir}/%{pkgdir}/FORKmod.pm
%{_datadir}/%{pkgdir}/Fork.pm
%{_datadir}/%{pkgdir}/SGEmod.pm
%{_datadir}/%{pkgdir}/SGE.pm
%{_datadir}/%{pkgdir}/LL.pm
%{_datadir}/%{pkgdir}/LSF.pm
%{_datadir}/%{pkgdir}/PBS.pm
%{_datadir}/%{pkgdir}/Condor.pm
%{_datadir}/%{pkgdir}/SLURMmod.pm
%{_datadir}/%{pkgdir}/SLURM.pm
%{_datadir}/%{pkgdir}/DGBridge.pm
%{_datadir}/%{pkgdir}/Boinc.pm
%{_datadir}/%{pkgdir}/XmlPrinter.pm
%{_datadir}/%{pkgdir}/InfosysHelper.pm
%{_datadir}/%{pkgdir}/LdifPrinter.pm
%{_datadir}/%{pkgdir}/GLUE2xmlPrinter.pm
%{_datadir}/%{pkgdir}/GLUE2ldifPrinter.pm
%{_datadir}/%{pkgdir}/NGldifPrinter.pm
%{_datadir}/%{pkgdir}/ARC0ClusterInfo.pm
%{_datadir}/%{pkgdir}/ARC1ClusterInfo.pm
%{_datadir}/%{pkgdir}/ConfigCentral.pm
%{_datadir}/%{pkgdir}/GMJobsInfo.pm
%{_datadir}/%{pkgdir}/HostInfo.pm
%{_datadir}/%{pkgdir}/RTEInfo.pm
%{_datadir}/%{pkgdir}/InfoChecker.pm
%{_datadir}/%{pkgdir}/IniParser.pm
%{_datadir}/%{pkgdir}/LRMSInfo.pm
%{_datadir}/%{pkgdir}/Sysinfo.pm
%{_datadir}/%{pkgdir}/LogUtils.pm
%{_datadir}/%{pkgdir}/condor_env.pm
%{_datadir}/%{pkgdir}/cancel_common.sh
%{_datadir}/%{pkgdir}/config_parser.sh
%{_datadir}/%{pkgdir}/configure-*-env.sh
%{_datadir}/%{pkgdir}/submit_common.sh
%{_datadir}/%{pkgdir}/scan_common.sh
%doc %{_mandir}/man1/cache-clean.1*
%doc %{_mandir}/man1/cache-list.1*
%doc %{_mandir}/man1/jura.1*
%doc %{_mandir}/man8/gm-jobs.8*
%doc %{_mandir}/man1/arc-config-check.1*
%doc %{_mandir}/man8/arc-vomsac-check.8*
%doc %{_mandir}/man8/arc-blahp-logger.8*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-arex
%dir %{_localstatedir}/log/arc
%dir %{_localstatedir}/spool/arc
%dir %{_localstatedir}/spool/arc/ssm
%dir %{_localstatedir}/spool/arc/urs
%{_libexecdir}/%{pkgdir}/ssmsend
%dir %{_datadir}/%{pkgdir}/ssm
%{_datadir}/%{pkgdir}/ssm/__init__.py*
%{_datadir}/%{pkgdir}/ssm/crypto.py*
%{_datadir}/%{pkgdir}/ssm/ssm2.py*
%{_datadir}/%{pkgdir}/ssm/brokers.py*
%{_datadir}/%{pkgdir}/ssm/sender.cfg

%if %{with_acix}
%files acix-core
%dir %{python_sitelib}/acix
%{python_sitelib}/acix/__init__.py*
%{python_sitelib}/acix/core

%files acix-cache
%{python_sitelib}/acix/cacheserver
%{_initrddir}/acix-cache

%files acix-index
%{python_sitelib}/acix/indexserver
%{_initrddir}/acix-index
%endif

%files devel
%doc docdir/devel/* src/hed/shc/arcpdp/*.xsd
%{_includedir}/%{pkgdir}
%{_libdir}/lib*.so
%{_bindir}/wsdl2hed
%doc %{_mandir}/man1/wsdl2hed.1*
%{_bindir}/arcplugin
%doc %{_mandir}/man1/arcplugin.1*
%{_libdir}/pkgconfig/arcbase.pc

%files plugins-needed
%dir %{_libdir}/%{pkgdir}/test
%{_libdir}/%{pkgdir}/test/libaccTEST.so
%{_libdir}/%{pkgdir}/test/libaccTEST.apd
%{_libdir}/%{pkgdir}/libaccARC1.so
%{_libdir}/%{pkgdir}/libaccBroker.so
%{_libdir}/%{pkgdir}/libaccCREAM.so
%{_libdir}/%{pkgdir}/libaccEMIES.so
%{_libdir}/%{pkgdir}/libaccJobDescriptionParser.so
%{_libdir}/%{pkgdir}/libaccSER.so
%{_libdir}/%{pkgdir}/libaccldap.so
%{_libdir}/%{pkgdir}/libarcshc.so
%{_libdir}/%{pkgdir}/libarcshclegacy.so
%{_libdir}/%{pkgdir}/libdmcfile.so
%{_libdir}/%{pkgdir}/libdmchttp.so
%{_libdir}/%{pkgdir}/libdmcldap.so
%{_libdir}/%{pkgdir}/libdmcsrm.so
%{_libdir}/%{pkgdir}/libdmcrucio.so
%{_libdir}/%{pkgdir}/libdmcacix.so
%{_libdir}/%{pkgdir}/libidentitymap.so
%{_libdir}/%{pkgdir}/libarguspdpclient.so
%{_libdir}/%{pkgdir}/libmcchttp.so
%{_libdir}/%{pkgdir}/libmccmsgvalidator.so
%{_libdir}/%{pkgdir}/libmccsoap.so
%{_libdir}/%{pkgdir}/libmcctcp.so
%{_libdir}/%{pkgdir}/libmcctls.so
%{_libdir}/%{pkgdir}/libaccARC1.apd
%{_libdir}/%{pkgdir}/libaccBroker.apd
%{_libdir}/%{pkgdir}/libaccCREAM.apd
%{_libdir}/%{pkgdir}/libaccEMIES.apd
%{_libdir}/%{pkgdir}/libaccJobDescriptionParser.apd
%{_libdir}/%{pkgdir}/libaccSER.apd
%{_libdir}/%{pkgdir}/libaccldap.apd
%{_libdir}/%{pkgdir}/libarcshc.apd
%{_libdir}/%{pkgdir}/libarcshclegacy.apd
%{_libdir}/%{pkgdir}/libdmcfile.apd
%{_libdir}/%{pkgdir}/libdmchttp.apd
%{_libdir}/%{pkgdir}/libdmcldap.apd
%{_libdir}/%{pkgdir}/libdmcsrm.apd
%{_libdir}/%{pkgdir}/libdmcrucio.apd
%{_libdir}/%{pkgdir}/libdmcacix.apd
%{_libdir}/%{pkgdir}/libidentitymap.apd
%{_libdir}/%{pkgdir}/libarguspdpclient.apd
%{_libdir}/%{pkgdir}/libmcchttp.apd
%{_libdir}/%{pkgdir}/libmccsoap.apd
%{_libdir}/%{pkgdir}/libmcctcp.apd
%{_libdir}/%{pkgdir}/libmccmsgvalidator.apd
%{_libdir}/%{pkgdir}/libmcctls.apd

%files plugins-globus
%{_libdir}/%{pkgdir}/libaccARC0.so
%{_libdir}/%{pkgdir}/libdmcgridftp.so
%{_libdir}/%{pkgdir}/libaccARC0.apd
%{_libdir}/%{pkgdir}/libdmcgridftp.apd
%{_libdir}/libarcglobusutils.so.*
%{_libexecdir}/%{pkgdir}/arc-lcas
%{_libexecdir}/%{pkgdir}/arc-lcmaps

%if %{with_canl}
%files arcproxyalt
%{_bindir}/arcproxyalt
%endif

%if %{with_xrootd}
%files plugins-xrootd
%{_libdir}/%{pkgdir}/libdmcxrootd.so
%{_libdir}/%{pkgdir}/libdmcxrootd.apd
%endif

%if %{with_gfal}
%files plugins-gfal
%{_libdir}/%{pkgdir}/libdmcgfal.so
%{_libdir}/%{pkgdir}/libdmcgfal.apd
%endif

%if %{with_python}
%files python
%doc docdir/python/*
%{python_sitearch}/_arc.*so
%{python_sitearch}/arc
%{_libdir}/%{pkgdir}/libaccPythonBroker.so
%{_libdir}/%{pkgdir}/libaccPythonBroker.apd
%{_libdir}/%{pkgdir}/libpythonservice.so
%{_libdir}/%{pkgdir}/libpythonservice.apd
%endif

%if %{?rhel}%{!?rhel:0} == 5
%files python26
%{python26_sitearch}/_arc.*so
%{python26_sitearch}/arc
%endif

%if %{?fedora}%{!?fedora:0} >= 13
%files python3
%{python3_sitearch}/_arc.*so
%{python3_sitearch}/arc
%endif

%if %{with_java}
%files java
%doc docdir/java/*
%{_libdir}/%{pkgdir}/libjarc.so
%{_jnidir}/arc.jar
%{_libdir}/%{pkgdir}/libjavaservice.so
%{_libdir}/%{pkgdir}/libjavaservice.apd
%if %{with_gcj}
%{_libdir}/gcj/%{name}
%endif
%endif

%files gridmap-utils
%{_sbindir}/nordugridmap
%config(noreplace) %{_sysconfdir}/cron.d/nordugridmap
%doc src/utils/gridmap/nordugridmap.conf
%doc %{_mandir}/man8/nordugridmap.8*

%files ca-utils

%files misc-utils
%{_bindir}/arcemiestest
%{_bindir}/arcwsrf
%{_bindir}/arcperftest
%if %{with_xmlsec1}
%{_bindir}/saml_assertion_init
%doc %{_mandir}/man1/saml_assertion_init.1*
%endif
%doc %{_mandir}/man1/arcemiestest.1*
%doc %{_mandir}/man1/arcwsrf.1*
%doc %{_mandir}/man1/arcperftest.1*

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jan 11 2016 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.5-1
- 5.0.5 Final Release

* Mon Nov 23 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.4-1
- 5.0.4 Final Release
- Drop patch nordugrid-arc-stdpair-c++11.patch
- Add workaround for old py-compile script

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Mon Sep 28 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.3-1
- 5.0.3 Final Release
- Add workaround for too new libsigc++/glibmm in Fedora 23+ (-std=c++11)

* Sat Jul 25 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.2-2
- Adapt to new policycore packaging (Fedora 23+)

* Tue Jun 30 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.2-1
- 5.0.2 Final Release
- Drop patch nordugrid-arc-unbalanced-quotes.patch

* Fri Jun 26 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.1-2
- Fix unbalanced quotes in scan-SLURM-job

* Fri Jun 26 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.1-1
- 5.0.1 Final Release
- Drop patch nordugrid-arc-pytest.patch

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 5.0.0-3
- Rebuilt for GCC 5 C++11 ABI change

* Sun Mar 29 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.0-2
- Fix python build conditionals

* Sat Mar 28 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.0.0-1
- 5.0.0 Final Release
- Drop patches nordugrid-arc-init.patch, -sedfix.patch and -python-print.patch

* Sat Mar 07 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.2.0-5
- Backport removal of python print statements (fixes pylint errors)

* Mon Dec 22 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.2.0-4
- Backport fix for broken sed statement in configure.ac

* Sat Aug 23 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.2.0-3
- Enable xmlsec1 support for EPEL 7

* Thu Aug 21 2014 Kevin Fenzi <kevin@scrye.com> - 4.2.0-2
- Rebuild for rpm bug 1131960

* Mon Aug 18 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.2.0-1
- 4.2.0 Final Release
- Drop patch nordugrid-arc-twisted.patch
- Build for EPEL 7 (without xmlsec)

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Wed Jul 02 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.1.0-4
- Rebuilt for xrootd 4

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 4.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Thu May 01 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.1.0-1
- 4.1.0 Final Release

* Thu Nov 28 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 4.0.0-1
- 4.0.0 Final Release

* Mon Sep 23 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.3-4
- Rebuild for gridsite 2 update

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

* Sat Jul 27 2013 J├│hann B. Gu├░mundsson <johannbg@fedoraproject.org> - 3.0.3-2
- Add a missing requirement on crontabs to spec file

* Thu Jul 25 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.3-1
- 3.0.3 Final Release
- Drop patch accepted upstream nordugrid-arc-find-syntax.patch
- Add support for _pkgdocdir

* Wed Jul 24 2013 Petr Pisar <ppisar@redhat.com> - 3.0.2-2
- Perl 5.18 rebuild

* Thu Jun 13 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.2-1
- 3.0.2 Final Release

* Wed May 08 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.1-1
- 3.0.1 Final Release

* Tue Apr 16 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.0-2
- Fix python module build logic

* Mon Apr 15 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.0-1
- 3.0.0 Final Release
- Drop obsolete patches nordugrid-arc-swig-209.patch and
  nordugrid-arc-xrootd-private.patch

* Fri Mar 08 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.0.1-4
- Rebuild for xrootd 3.3

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

* Wed Jan 23 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.0.1-2
- Additional selinux contexts
- Fix for python wrappers using swig 2.0.9

* Fri Nov 23 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.0.1-1
- 2.0.1 Final Release
- Drop patches accepted upstream: nordugrid-arc-unistd.patch,
  nordugrid-arc-pypara.patch, nordugrid-arc-xmlns.patch,
  nordugrid-arc-recursive.patch

* Fri Aug 03 2012 David Malcolm <dmalcolm@redhat.com> - 2.0.0-4
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3

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

* Sat Jun 16 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.0.0-2
- Fix problem with directory hierarchies during job retrieval

* Wed May 23 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.0.0-1
- 2.0.0 Final Release
- Disable chelonia, hopi, isis and janitor

* Tue Mar 06 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.1.1-1
- 1.1.1 Bugfix Release

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
- Rebuilt for c++ ABI breakage

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

* Mon Oct 24 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.1.0-2
- Backport fixes for endian independent md5 checksum

* Mon Oct 03 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.1.0-1
- 1.1.0 Final Release
- Drop patches accepted upstream: nordugrid-arc-perl-switch.patch and
  nordugrid-arc-run-full.patch

* Mon Oct 03 2011 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-3.1
- rebuild (java), rel-eng#4932

* Sat Aug 27 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.1-3
- Move large files away from /var/run in order not to fill up /run partition
- Move arc-lcas and arc-lcmaps to plugins-globus package

* Sun Aug 07 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.1-2
- Remove perl switch statements

* Sun Jul 24 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.1-1.1
- Disable python module on RHEL6 ppc64

* Sat Jul 23 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.1-1
- 1.0.1 Final Release
- Remove Provides/Obsoletes for pre-Fedora packages

* Mon Jul 11 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.0-3
- Fix American English spelling

* Sun Jun 26 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.0-2
- Add missing include <stddef.h> for new gcc

* Mon Apr 18 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0.0-1
- Initial release