pcp/pcp.spec
David Disseldorp c6102bc9d9 Accepting request 287414 from home:kwk:branches:Base:System
- Update to 3.10.2
  See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD
  for details
- new patches
  0007-Honor-CFLAGS-in-qmake.patch
  0008-SUSE-fy-pmsnap-control-path.patch
  0009-pmsnap-control-var-www-srv-www.patch 
- renamed patches
  create-pmlogger-and-pmie-logdirs-during-install.patch
  to 0006-create-pmlogger-and-pmie-logdirs-during-install.patch
- Update to 3.10.1
  See http://git.pcp.io/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=blob_plain;f=CHANGELOG;hb=HEAD
  for details
- new sub-packages
  * pcp-doc
  * pcp-gui
  * python3-pcp
  * python-pcp
  * pmda-infiniband
  * pmda-perfevent
  * pmda-papi
  * import-collectl2pcp
- drop fix_pmie_pmlogger_startup_races.patch, upstream
  drop pcp-3.6.10-gcc5-reservedword.patch, obsolete

OBS-URL: https://build.opensuse.org/request/show/287414
OBS-URL: https://build.opensuse.org/package/show/Base:System/pcp?expand=0&rev=37
2015-02-24 09:27:55 +00:00

1530 lines
43 KiB
RPMSpec

#
# spec file for package pcp
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
BuildRequires: -post-build-checks
%if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14
%define has_systemd 1
%else
%define has_systemd 0
%endif
%if 0%{?suse_version}
%define pcp_gr System/Monitoring
%define lib_pkg libpcp3
%define lib_pkg_conflict pcp-libs
%define lib_gr System/Libraries
%define lib_devel_pkg libpcp-devel
%define lib_devel_pkg_conflict pcp-libs-devel
%define lib_devel_gr Development/Libraries/Other
%define license_apache2 Apache-2.0
%define license_cc_by CC-BY-SA-3.0
%define license_gplv2 GPL-2.0
%define license_gplv2plus GPL-2.0+
%define license_lgplv2 LGPL-2.0
%define license_lgplv2plus LGPL-2.0+
%define license_lgplv21plus LGPL-2.1+
%define license_mit MIT
%define _libexecdir %{_libdir}
%else
%define pcp_gr Applications/System
%define lib_pkg pcp-libs
%define lib_pkg_conflict libpcp3
%define lib_gr Applications/System
%define lib_devel_pkg pcp-libs-devel
%define lib_devel_pkg_conflict libpcp-devel
%define lib_devel_gr Development/Libraries
%define license_apache2 ASL2.0
%define license_cc_by CC-BY
%define license_gplv2 GPLv2
%define license_gplv2plus GPLv2+
%define license_lgplv2 LGPLv2
%define license_lgplv2plus LGPLv2+
%define license_lgplv21plus LGPLv2.1+
%define license_mit MIT
%endif
Summary: System-level performance monitoring and performance management
License: %{license_gplv2plus} and %{license_lgplv2plus} and %{license_cc_by}
Group: %{pcp_gr}
Name: pcp
Version: 3.10.2
Release: 0
%define buildversion 1
%if 0%{?suse_version}
%else
%endif
Url: http://www.pcp.io
Source0: pcp-%{version}.src.tar.gz
Source1: pcp-webjs.src.tar.gz
%if 0%{?suse_version}
Source2: pcp-rpmlintrc
%endif
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch1: 0001-Fix-XEN-build.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch2: 0002-Install-libraries-without-exec-permission.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch3: 0003-pcp-legacy-init-lsb.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch4: 0004-Remove-CPAN-rpaths.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch5: 0005-Remove-runlevel-4-from-init-scripts.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch6: 0006-create-pmlogger-and-pmie-logdirs-during-install.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch7: 0007-Honor-CFLAGS-in-qmake.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch8: 0008-SUSE-fy-pmsnap-control-path.patch
# PACTH-FIX-OPENSUSE, kkaempf@suse.de
Patch9: 0009-pmsnap-control-var-www-srv-www.patch
# There are no papi/libpfm devel packages for s390 nor for some rhels, disable
%ifarch s390 s390x
%{!?disable_papi: %global disable_papi 1}
%{!?disable_perfevent: %global disable_perfevent 1}
%else
%{!?disable_papi: %global disable_papi (0%{?rhel} < 6)}
%{!?disable_perfevent: %global disable_perfevent (0%{?rhel} < 7)}
%endif
%if 0%{?suse_version}
%define disable_sheet2pcp 0
%else
%define disable_sheet2pcp 1
%endif
%define disable_microhttpd 0
%define disable_cairo 0
%if 0%{?rhel} > 6
%define disable_python3 0
%else
%define disable_python3 1
%endif
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
%define disable_qt 0
%else
%define disable_qt 1
%endif
%if 0%{?suse_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%else
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
BuildRequires: autoconf
BuildRequires: avahi-devel
BuildRequires: bison
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
BuildRequires: flex
BuildRequires: gcc-c++
%if 0%{?suse_version}
BuildRequires: mozilla-nss-devel
%else
BuildRequires: nss-devel
%endif
BuildRequires: perl
BuildRequires: procps
BuildRequires: python-devel
BuildRequires: rpm-devel
%if !%{disable_python3}
BuildRequires: python3-devel
%endif
BuildRequires: cyrus-sasl-devel
BuildRequires: ncurses-devel
BuildRequires: readline-devel
%if !%{disable_papi}
BuildRequires: papi-devel
%endif
%if !%{disable_perfevent}
BuildRequires: libpfm-devel >= 4.4
%endif
%if !%{disable_microhttpd}
BuildRequires: libmicrohttpd-devel
%endif
%if !%{disable_cairo}
BuildRequires: cairo-devel
%endif
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
BuildRequires: systemtap-sdt-devel
%else
%ifnarch ppc ppc64
BuildRequires: systemtap-sdt-devel
%endif
%endif
BuildRequires: perl(ExtUtils::MakeMaker)
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%else
BuildRequires: initscripts
%endif
BuildRequires: man
%if 0%{?has_systemd}
BuildRequires: systemd-devel
%{?systemd_requires}
%else
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
BuildRequires: systemd-devel
%endif
%endif
%if !%{disable_qt}
BuildRequires: desktop-file-utils
%if 0%{?suse_version}
BuildRequires: libqt4-devel >= 4.4
%else
BuildRequires: qt4-devel >= 4.4
%endif
%endif
# for set_permissions
%if 0%{?suse_version} >= 1131
PreReq: permissions
%endif
Requires: bash
Requires: cron
Requires: fileutils
Requires: findutils
Requires: gawk
Requires: grep
Requires: perl
Requires: sed
Requires: which
%if 0%{?suse_version}
Requires: cpp
Requires: cyrus-sasl
Requires: sysconfig
# pmatop needs curses.py
Requires: python-curses
%else
Requires: initscripts
%endif
Requires: python
%if 0%{?rhel} <= 5
Requires: python-ctypes
%endif
Requires: %{lib_pkg} = %{version}-%{release}
Requires: perl-PCP-PMDA = %{version}-%{release}
Requires: python-pcp = %{version}-%{release}
Obsoletes: pcp-pmda-nvidia < %{version}
%global tapsetdir %{_datadir}/systemtap/tapset
%define _confdir %{_sysconfdir}/pcp
%define _logsdir %{_localstatedir}/log/pcp
%define _pmnsdir %{_localstatedir}/lib/pcp/pmns
%define _tempsdir %{_localstatedir}/lib/pcp/tmp
%define _pmdasdir %{_localstatedir}/lib/pcp/pmdas
%define _testsdir %{_localstatedir}/lib/pcp/testsuite
%if 0%{?suse_version}
%define _pixmapdir %{_datadir}/pixmaps
%define _booksdir %{_docdir}/pcp
%else
%define _pixmapdir %{_datadir}/pcp-gui/pixmaps
%define _booksdir %{_datadir}/doc/pcp-doc
%endif
%if 0%{?fedora} >= 20 || 0%{?suse_version}
%define _with_doc --with-docdir=%{_docdir}/%{name}
%endif
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 || 0%{?has_systemd}
%define _initddir %{_datadir}/pcp/lib
%define disable_systemd 0
%else
%if 0%{?suse_version}
%define _initddir %{_sysconfdir}/init.d
%else
%define _initddir %{_sysconfdir}/rc.d/init.d
%endif
%define _with_initd --with-rcdir=%{_initddir}
%define disable_systemd 1
%endif
# we never want Infiniband on s390 platforms
%ifarch s390 s390x
%define disable_infiniband 1
%else
# we never want Infiniband on RHEL5 or earlier
%if 0%{?rhel} != 0 && 0%{?rhel} < 6
%define disable_infiniband 1
%else
%define disable_infiniband 0
%endif
%endif
%if %{disable_infiniband}
%define _with_ib --with-infiniband=no
%endif
%if !%{disable_papi}
%define _with_papi --with-papi=yes
%endif
%if !%{disable_perfevent}
%define _with_perfevent --with-perfevent=yes
%endif
%if %{disable_qt}
%define _with_ib --with-qt=no
%endif
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
%define _pmdasdir %{_localstatedir}/lib/pcp/pmdas
%description
Performance Co-Pilot (PCP) provides a framework and services to support
system-level performance monitoring and performance management.
The PCP open source release provides a unifying abstraction for all of
the interesting performance data in a system, and allows client
applications to easily retrieve and process any subset of that data.
#
# pcp-conf
#
%package conf
%if 0%{?suse_version}
%else
%endif
Summary: Performance Co-Pilot run-time configuration
License: %{license_lgplv2plus}
Group: Development/Libraries
Url: http://www.pcp.io
%if !0%{?suse_version}
# http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages"
Conflicts: pcp-libs < 3.9
%endif
%description conf
Performance Co-Pilot (PCP) run-time configuration
#
# pcp-libs
#
%package -n %{lib_pkg}
Summary: Performance Co-Pilot run-time libraries
License: %{license_lgplv2plus}
Group: %{lib_gr}
Url: http://www.pcp.io
Conflicts: %{lib_pkg_conflict}
%if !0%{?suse_version}
Requires: pcp-conf = %{version}-%{release}
%endif
%description -n %{lib_pkg}
Performance Co-Pilot (PCP) run-time libraries
#
# pcp-libs-devel
# SLE uses the legacy pcp-devel package name.
#
%package -n %{lib_devel_pkg}
Summary: Performance Co-Pilot (PCP) development headers and documentation
License: %{license_gplv2plus} and %{license_lgplv21plus}
Group: %{lib_devel_gr}
Url: http://www.pcp.io
Requires: %{lib_pkg} = %{version}-%{release}
Conflicts: %{lib_devel_pkg_conflict}
%if (0%{?suse_version} > 0)
Provides: pcp-devel = %{version}
Obsoletes: pcp-devel < %{version}
%endif
%description -n %{lib_devel_pkg}
Performance Co-Pilot (PCP) headers, documentation and tools for development.
#
# pcp-testsuite
#
%package testsuite
Summary: Performance Co-Pilot (PCP) test suite
License: %{license_gplv2plus} and %{license_mit}
Group: Development/Libraries
Url: http://www.pcp.io
Requires: pcp = %{version}-%{release}
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
Requires: %{lib_devel_pkg} = %{version}-%{release}
Obsoletes: pcp-gui-testsuite
%description testsuite
Quality assurance test suite for Performance Co-Pilot (PCP).
#
# pcp-manager
#
%package manager
Summary: Performance Co-Pilot (PCP) manager daemon
License: %{license_gplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
Requires: pcp = %{version}-%{release}
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
%description manager
An optional daemon (pmmgr) that manages a collection of pmlogger and
pmie daemons, for a set of discovered local and remote hosts running
the performance metrics collection daemon (pmcd). It ensures these
daemons are running when appropriate, and manages their log rotation
needs (which are particularly complex in the case of pmlogger).
The base PCP package provides comparable functionality through cron
scripts which predate this daemon but do still provide effective and
efficient log management services.
The pcp-manager package aims to aggressively enable new PCP features
and as a result may not be suited to all production environments.
%if !%{disable_microhttpd}
#
# pcp-webapi
#
%package webapi
Summary: Performance Co-Pilot (PCP) web API service
License: %{license_gplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
%if 0%{?suse_version}
Requires: pcp-conf = %{version}-%{release}
%else
Requires: pcp-libs = %{version}-%{release}
%endif
%description webapi
Provides a daemon (pmwebd) that binds a large subset of the Performance
Co-Pilot (PCP) client API (PMAPI) to RESTful web applications using the
HTTP (PMWEBAPI) protocol.
%endif
%if !%{disable_microhttpd}
#
# pcp-webjs
#
%package webjs
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
BuildArch: noarch
%endif
Summary: Performance Co-Pilot (PCP) web applications
License: %{license_apache2} and %{license_mit} and %{license_cc_by}
Group: Applications/System
Url: http://www.pcp.io
%description webjs
Javascript web application content for the Performance Co-Pilot (PCP)
web service.
%endif
#
# perl-PCP-PMDA. This is the PCP agent perl binding.
#
%package -n perl-PCP-PMDA
Summary: Performance Co-Pilot (PCP) Perl bindings and documentation
License: %{license_gplv2plus}
Group: %{lib_devel_gr}
Url: http://www.pcp.io
%if 0%{?suse_version}
%perl_requires
%else
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n perl-PCP-PMDA
The PCP::PMDA Perl module contains the language bindings for
building Performance Metric Domain Agents (PMDAs) using Perl.
Each PMDA exports performance data for one specific domain, for
example the operating system kernel, Cisco routers, a database,
an application, etc.
#
# perl-PCP-MMV
#
%package -n perl-PCP-MMV
Summary: Performance Co-Pilot (PCP) Perl bindings for PCP Memory Mapped Values
License: %{license_gplv2plus}
Group: %{lib_devel_gr}
Url: http://www.pcp.io
Requires: pcp >= %{version}
%if 0%{?suse_version}
%perl_requires
%else
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n perl-PCP-MMV
The PCP::MMV module contains the Perl language bindings for
building scripts instrumented with the Performance Co-Pilot
(PCP) Memory Mapped Value (MMV) mechanism.
This mechanism allows arbitrary values to be exported from an
instrumented script into the PCP infrastructure for monitoring
and analysis with pmchart, pmie, pmlogger and other PCP tools.
#
# perl-PCP-LogImport
#
%package -n perl-PCP-LogImport
Summary: Performance Co-Pilot Perl bindings for importing external archive data
License: %{license_gplv2plus}
Group: %{lib_devel_gr}
Url: http://www.pcp.io
Requires: pcp >= %{version}
%if 0%{?suse_version}
%perl_requires
%else
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n perl-PCP-LogImport
The PCP::LogImport module contains the Perl language bindings for
importing data in various 3rd party formats into PCP archives so
they can be replayed with standard PCP monitoring tools.
#
# perl-PCP-LogSummary
#
%package -n perl-PCP-LogSummary
Summary: Performance Co-Pilot Perl bindings for processing pmlogsummary output
License: %{license_gplv2plus}
Group: %{lib_devel_gr}
Url: http://www.pcp.io
Requires: pcp >= %{version}
%if 0%{?suse_version}
%perl_requires
%else
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n perl-PCP-LogSummary
The PCP::LogSummary module provides a Perl module for using the
statistical summary data produced by the Performance Co-Pilot
pmlogsummary utility. This utility produces various averages,
minima, maxima, and other calculations based on the performance
data stored in a PCP archive. The Perl interface is ideal for
exporting this data into third-party tools (e.g. spreadsheets).
#
# pcp-import-sar2pcp
#
%package import-sar2pcp
Summary: Performance Co-Pilot tools for importing sar data into PCP archive logs
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
Requires: perl-PCP-LogImport = %{version}-%{version}
Requires: sysstat
%description import-sar2pcp
Performance Co-Pilot (PCP) front-end tools for importing sar data
into standard PCP archive logs for replay with any PCP monitoring tool.
#
# pcp-import-iostat2pcp
#
%package import-iostat2pcp
Summary: Performance Co-Pilot tools for importing iostat data into PCP archive logs
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
Requires: perl-PCP-LogImport = %{version}-%{release}
Requires: sysstat
%description import-iostat2pcp
Performance Co-Pilot (PCP) front-end tools for importing iostat data
into standard PCP archive logs for replay with any PCP monitoring tool.
%if !%{disable_sheet2pcp}
#
# pcp-import-sheet2pcp
#
%package import-sheet2pcp
Summary: Performance Co-Pilot tools for importing spreadsheet data into PCP archive logs
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
Requires: perl-PCP-LogImport = %{version}-%{release}
Requires: sysstat
%description import-sheet2pcp
Performance Co-Pilot (PCP) front-end tools for importing spreadsheet data
into standard PCP archive logs for replay with any PCP monitoring tool.
%endif
#
# pcp-import-mrtg2pcp
#
%package import-mrtg2pcp
Summary: Performance Co-Pilot tools for importing MTRG data into PCP archive logs
License: %{license_lgplv2plus}
Group: %{pcp_gr}
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
Requires: perl-PCP-LogImport = %{version}-%{release}
%description import-mrtg2pcp
Performance Co-Pilot (PCP) front-end tools for importing MTRG data
into standard PCP archive logs for replay with any PCP monitoring tool.
#
# pcp-import-collectl2pcp
#
%package import-collectl2pcp
Summary: Performance Co-Pilot tools for importing collectl log files into PCP archive logs
License: %{license_lgplv2plus}
Group: Applications/System
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
%description import-collectl2pcp
Performance Co-Pilot (PCP) front-end tools for importing collectl data
into standard PCP archive logs for replay with any PCP monitoring tool.
%if !%{disable_papi}
#
# pcp-pmda-papi
#
%package pmda-papi
Summary: Performance Co-Pilot (PCP) metrics for Performance API and hardware counters
License: %{license_gplv2plus}
Group: Applications/System
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
BuildRequires: papi-devel
%description pmda-papi
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting hardware counters statistics through PAPI (Performance API).
%endif
%if !%{disable_perfevent}
#
# pcp-pmda-perfevent
#
%package pmda-perfevent
Summary: Performance Co-Pilot (PCP) metrics for hardware counters
License: %{license_gplv2plus}
Group: Applications/System
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: libpfm >= 4.4
Requires: pcp-libs = %{version}-%{release}
%endif
BuildRequires: libpfm-devel >= 4.4
%description pmda-perfevent
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting hardware counters statistics through libpfm.
%endif
%if !%{disable_infiniband}
#
# pcp-pmda-infiniband
#
%package pmda-infiniband
Summary: Performance Co-Pilot (PCP) metrics for Infiniband HCAs and switches
License: %{license_gplv2plus}
Group: Applications/System
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: libibmad >= 1.3.7
Requires: libibumad >= 1.3.7
Requires: pcp-libs = %{version}-%{release}
%endif
BuildRequires: libibmad-devel >= 1.3.7
BuildRequires: libibumad-devel >= 1.3.7
%description pmda-infiniband
This package contains the PCP Performance Metrics Domain Agent (PMDA) for
collecting Infiniband statistics. By default, it monitors the local HCAs
but can also be configured to monitor remote GUIDs such as IB switches.
%endif
#
# python-pcp. This is the PCP library bindings for python.
#
%package -n python-pcp
Summary: Performance Co-Pilot (PCP) Python bindings and documentation
License: %{license_gplv2plus}
Group: Development/Libraries
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n python-pcp
This python PCP module contains the language bindings for
Performance Metric API (PMAPI) monitor tools and Performance
Metric Domain Agent (PMDA) collector tools written in Python.
%if !%{disable_python3}
#
# python3-pcp. This is the PCP library bindings for python3.
#
%package -n python3-pcp
Summary: Performance Co-Pilot (PCP) Python3 bindings and documentation
License: %{license_gplv2plus}
Group: Development/Libraries
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n python3-pcp
This python PCP module contains the language bindings for
Performance Metric API (PMAPI) monitor tools and Performance
Metric Domain Agent (PMDA) collector tools written in Python3.
%endif
%if !%{disable_qt}
#
# pcp-gui package for Qt tools
#
%package -n pcp-gui
Summary: Visualization tools for the Performance Co-Pilot toolkit
License: %{license_gplv2plus} and %{license_lgplv2plus}
Group: Applications/System
Url: http://www.pcp.io
%if !0%{?suse_version}
Requires: pcp-libs = %{version}-%{release}
%endif
%description -n pcp-gui
Visualization tools for the Performance Co-Pilot toolkit.
The pcp-gui package primarily includes visualization tools for
monitoring systems using live and archived Performance Co-Pilot
(PCP) sources.
%endif
#
# pcp-doc package
#
%package -n pcp-doc
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
BuildArch: noarch
%endif
Summary: Documentation and tutorial for the Performance Co-Pilot
License: %{license_gplv2plus} and %{license_cc_by}
Group: Documentation
Url: http://www.pcp.io
%description -n pcp-doc
Documentation and tutorial for the Performance Co-Pilot
Performance Co-Pilot (PCP) provides a framework and services to support
system-level performance monitoring and performance management.
The pcp-doc package provides useful information on using and
configuring the Performance Co-Pilot (PCP) toolkit for system
level performance management. It includes tutorials, HOWTOs,
and other detailed documentation about the internals of core
PCP utilities and daemons, and the PCP graphical tools.
###############################################################################
%prep
%setup -q
%setup -q -T -D -a 1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
autoconf
%clean
rm -Rf $RPM_BUILD_ROOT
%build
PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %configure \
--with-tmpdir=%{_tempsdir} \
--datarootdir=%{_datadir} \
--docdir=%{_docdir} \
%{?_with_initd} \
%{?_with_doc} \
%{?_with_ib} \
%{?_with_papi} \
%{?_with_perfevent} \
%{?_with_qt}
PCP_CFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" CCFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" make default_pcp
###############################################################################
%install
export NO_CHOWN=true DIST_ROOT=$RPM_BUILD_ROOT
make install_pcp
PCP_GUI='pmchart|pmconfirm|pmdumptext|pmmessage|pmquery|pmsnap|pmtime'
# Fix stuff we do/don't want to ship
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
%if %{disable_sheet2pcp}
# remove sheet2pcp until BZ 830923 and BZ 754678 are resolved.
rm -f $RPM_BUILD_ROOT/%{_bindir}/sheet2pcp $RPM_BUILD_ROOT/%{_mandir}/man1/sheet2pcp.1.gz
%endif
# remove configsz.h as this is not multilib friendly.
rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/configsz.h
%if %{disable_microhttpd}
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/pmwebd.*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/PMWEBAPI.*
rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmwebd
rm -fr $RPM_BUILD_ROOT/%{_initddir}/pmwebd
rm -fr $RPM_BUILD_ROOT/%{_unitdir}/pmwebd.service
rm -f $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin/pmwebd
%else
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps
mv pcp-webjs/* $RPM_BUILD_ROOT/%{_datadir}/pcp/webapps
rmdir pcp-webjs
%endif
%if %{disable_infiniband}
# remove pmdainfiniband on platforms lacking IB devel packages.
rm -f $RPM_BUILD_ROOT/%{_pmdasdir}/ib
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/pmdaib.1.gz
rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/infiniband
%endif
%if %{disable_qt}
%if !0%{?suse_version}
rm -fr $RPM_BUILD_ROOT/%{_pixmapdir}
%endif
rm -fr $RPM_BUILD_ROOT/%{_confdir}/pmsnap
rm -f `find $RPM_BUILD_ROOT/%{_mandir}/man1 | grep -E "$PCP_GUI"`
%else
rm -rf $RPM_BUILD_ROOT/usr/share/doc/pcp-gui
%if 0%{?suse_version}
mkdir -p $RPM_BUILD_ROOT/%{_pixmapdir}
mv $RPM_BUILD_ROOT/%{_datadir}/pcp-gui/pixmaps/*.png $RPM_BUILD_ROOT/%{_pixmapdir}
rm -rf $RPM_BUILD_ROOT/%{_datadir}/pcp-gui/pixmaps
%suse_update_desktop_file -r -G 'Performance Copilot Chart' $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop System Monitor
%else
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/pmchart.desktop
%endif
%endif
%if 0%{?suse_version}
mkdir -p $RPM_BUILD_ROOT/%{_rundir}/pcp
mkdir -p $RPM_BUILD_ROOT/%{_tempsdir}
# move sample code to doc dir
mv $RPM_BUILD_ROOT/%{_pmdasdir}/sample $RPM_BUILD_ROOT/%{_docdir}/%{name}
mv $RPM_BUILD_ROOT/%{_pmdasdir}/simple $RPM_BUILD_ROOT/%{_docdir}/%{name}
mv $RPM_BUILD_ROOT/%{_pmdasdir}/trivial $RPM_BUILD_ROOT/%{_docdir}/%{name}
mv $RPM_BUILD_ROOT/%{_pmdasdir}/txmon $RPM_BUILD_ROOT/%{_docdir}/%{name}
mv $RPM_BUILD_ROOT/%{_datadir}/%{name}/examples $RPM_BUILD_ROOT/%{_docdir}/%{name}
%__install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sbindir}
%if !0%{?has_systemd}
# add /etc/init.d/X symlinks at /usr/sbin/rcX
for script in pcp pmie pmproxy pmlogger pmcd; do
ln -s "%{_sysconfdir}/init.d/${script}" \
"${RPM_BUILD_ROOT}/%{_sbindir}/rc${script}"
done
%else
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmcd
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmie
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmlogger
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmproxy
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmmgr
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpmwebd
%endif
%else
# default chkconfig off for Fedora and RHEL
for f in $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/{pcp,pmie,pmproxy}; do
sed -i -e '/^# chkconfig/s/:.*$/: - 95 05/' -e '/^# Default-Start:/s/:.*$/:/' $f
done
%endif
# list of PMDAs in the base pkg
ls -1 $RPM_BUILD_ROOT/%{_pmdasdir} |\
grep -E -v 'simple|sample|trivial|txmon' |\
grep -E -v 'perfevent|perfalloc.1' |\
grep -E -v '^ib$|infiniband' |\
grep -E -v 'papi' |\
sed -e 's#^#'%{_pmdasdir}'\/#' >base_pmdas.list
# all base pcp package files except those split out into sub packages
ls -1 $RPM_BUILD_ROOT/%{_bindir} |\
sed -e 's#^#'%{_bindir}'\/#' >base_bin.list
ls -1 $RPM_BUILD_ROOT/%{_libexecdir}/pcp/bin |\
sed -e 's#^#'%{_libexecdir}/pcp/bin'\/#' >base_exec.list
ls -1 $RPM_BUILD_ROOT/%{_mandir}/man1 |\
sed -e 's#^#'%{_mandir}'\/man1\/#' >base_man.list
ls -1 $RPM_BUILD_ROOT/%{_booksdir} |\
sed -e 's#^#'%{_booksdir}'\/#' > pcp-doc.list
%if 0%{?suse_version}
mv $RPM_BUILD_ROOT/%{_datadir}/pcp/demos $RPM_BUILD_ROOT/%{_docdir}/pcp
ls -1 $RPM_BUILD_ROOT/%{_docdir}/pcp/demos/tutorials |\
sed -e 's#^#'%{_docdir}/pcp/demos/tutorials'\/#' >>pcp-doc.list
%else
ls -1 $RPM_BUILD_ROOT/%{_datadir}/pcp/demos/tutorials |\
sed -e 's#^#'%{_datadir}/pcp/demos/tutorials'\/#' >>pcp-doc.list
%endif
%if !%{disable_qt}
ls -1 $RPM_BUILD_ROOT/%{_pixmapdir} |\
sed -e 's#^#'%{_pixmapdir}'\/#' > pcp-gui.list
cat base_bin.list base_exec.list base_man.list |\
grep -E "$PCP_GUI" >> pcp-gui.list
%endif
cat base_pmdas.list base_bin.list base_exec.list base_man.list |\
grep -E -v 'pmdaib|pmmgr|pmweb|pmsnap|2pcp' |\
grep -E -v "$PCP_GUI|pixmaps|doc|tutorials" |\
grep -E -v %{_confdir} | grep -E -v %{_logsdir} > base.list
# all devel pcp package files except those split out into sub packages
ls -1 $RPM_BUILD_ROOT/%{_mandir}/man3 |\
sed -e 's#^#'%{_mandir}'\/man3\/#' | grep -E -v '3pm|PMWEBAPI' >devel.list
%if 0%{?suse_version}
ls -1 $RPM_BUILD_ROOT/%{_docdir}/pcp/demos |\
sed -e 's#^#'%{_docdir}'\/pcp\/demos\/#' | grep -E -v tutorials >> devel.list
%else
ls -1 $RPM_BUILD_ROOT/%{_datadir}/pcp/demos |\
sed -e 's#^#'%{_datadir}'\/pcp\/demos\/#' | grep -E -v tutorials >> devel.list
%endif
%if 0%{?suse_version}
mv $RPM_BUILD_ROOT/%{_datadir}/doc/pcp-doc/* $RPM_BUILD_ROOT/%{_booksdir}
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/pcp-doc
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}
%endif
%endif
###############################################################################
%pre testsuite
test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir}
getent group pcpqa >/dev/null || groupadd -r pcpqa
getent passwd pcpqa >/dev/null || \
useradd -c "PCP Quality Assurance" -g pcpqa -d %{_testsdir} -M -r -s /bin/bash pcpqa 2>/dev/null
chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null
exit 0
%post testsuite
chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null
exit 0
%pre
getent group pcp >/dev/null || groupadd -r pcp
getent passwd pcp >/dev/null || \
useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp
%if !0%{?suse_version}
PCP_SYSCONF_DIR=%{_confdir}
PCP_LOG_DIR=%{_logsdir}
PCP_ETC_DIR=%{_sysconfdir}
# rename crontab files to align with current Fedora packaging guidelines
for crontab in pmlogger pmie
do
test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
done
# produce a script to run post-install to move configs to their new homes
save_configs_script()
{
_new="$1"
shift
for _dir
do
[ "$_dir" = "$_new" ] && continue
if [ -d "$_dir" ]
then
( cd "$_dir" ; find . -type f -print ) | sed -e 's/^\.\///' \
| while read _file
do
_want=true
if [ -f "$_new/$_file" ]
then
# file exists in both directories, pick the more
# recently modified one
_try=`find "$_dir/$_file" -newer "$_new/$_file" -print`
[ -n "$_try" ] || _want=false
fi
$_want && echo cp -p "$_dir/$_file" "$_new/$_file"
done
fi
done
}
# migrate and clean configs if we have had a previous in-use installation
[ -d "$PCP_LOG_DIR" ] || exit 0 # no configuration file upgrades required
rm -f "$PCP_LOG_DIR/configs.sh"
for daemon in pmcd pmie pmlogger pmproxy
do
save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon" \
/var/lib/pcp/config/$daemon /etc/$daemon /etc/pcp/$daemon /etc/sysconfig/$daemon
done
%endif
exit 0
%if !%{disable_microhttpd}
%preun webapi
%if 0%{?suse_version}
%if 0%{?has_systemd}
%service_del_preun pmwebd
%else
%{stop_on_removal pmwebd}
%endif
%else
if [ "$1" -eq 0 ]
then
%if !%{disable_systemd}
systemctl --no-reload disable pmwebd.service >/dev/null 2>&1
systemctl stop pmwebd.service >/dev/null 2>&1
%else
/sbin/service pmwebd stop >/dev/null 2>&1
/sbin/chkconfig --del pmwebd >/dev/null 2>&1
%endif
fi
%endif
%endif
%preun manager
%if 0%{?suse_version}
%if 0%{?has_systemd}
%service_del_preun pmmgr
%else
%{stop_on_removal pmmgr}
%endif
%else
if [ "$1" -eq 0 ]
then
%if !%{disable_systemd}
systemctl --no-reload disable pmmgr.service >/dev/null 2>&1
systemctl stop pmmgr.service >/dev/null 2>&1
%else
/sbin/service pmmgr stop >/dev/null 2>&1
/sbin/chkconfig --del pmmgr >/dev/null 2>&1
%endif
fi
%endif
%preun
%if 0%{?suse_version}
%if 0%{?has_systemd}
%service_del_preun pmlogger pmie pmproxy pmcd
%else
%{?stop_on_removal:%{stop_on_removal pmlogger pmie pmproxy pmcd}}
%endif
%else
if [ "$1" -eq 0 ]
then
# stop daemons before erasing the package
%if !%{disable_systemd}
systemctl --no-reload disable pmlogger.service >/dev/null 2>&1
systemctl --no-reload disable pmie.service >/dev/null 2>&1
systemctl --no-reload disable pmproxy.service >/dev/null 2>&1
systemctl --no-reload disable pmcd.service >/dev/null 2>&1
systemctl stop pmlogger.service >/dev/null 2>&1
systemctl stop pmie.service >/dev/null 2>&1
systemctl stop pmproxy.service >/dev/null 2>&1
systemctl stop pmcd.service >/dev/null 2>&1
%else
/sbin/service pmlogger stop >/dev/null 2>&1
/sbin/service pmie stop >/dev/null 2>&1
/sbin/service pmproxy stop >/dev/null 2>&1
/sbin/service pmcd stop >/dev/null 2>&1
/sbin/chkconfig --del pcp >/dev/null 2>&1
/sbin/chkconfig --del pmcd >/dev/null 2>&1
/sbin/chkconfig --del pmlogger >/dev/null 2>&1
/sbin/chkconfig --del pmie >/dev/null 2>&1
/sbin/chkconfig --del pmproxy >/dev/null 2>&1
%endif
# cleanup namespace state/flag, may still exist
PCP_PMNS_DIR=%{_pmnsdir}
rm -f "$PCP_PMNS_DIR/.NeedRebuild" >/dev/null 2>&1
fi
%endif
%if !%{disable_microhttpd}
%post webapi
chown -R pcp:pcp %{_logsdir}/pmwebd 2>/dev/null
%if 0%{?suse_version}
%if 0%{?has_systemd}
%service_add_post pmwebd
%else
%{fillup_and_insserv pmwebd}
%endif
%else
%if !%{disable_systemd}
systemctl condrestart pmwebd.service >/dev/null 2>&1
%else
/sbin/chkconfig --add pmwebd >/dev/null 2>&1
/sbin/service pmwebd condrestart
%endif
%endif
%endif
%post manager
chown -R pcp:pcp %{_logsdir}/pmmgr 2>/dev/null
%if 0%{?suse_version}
%if 0%{?has_systemd}
%service_add_post pmmgr
%else
%{fillup_and_insserv pmmgr}
%endif
%else
%if !%{disable_systemd}
systemctl condrestart pmmgr.service >/dev/null 2>&1
%else
/sbin/chkconfig --add pmmgr >/dev/null 2>&1
/sbin/service pmmgr condrestart
%endif
%endif
%post
/sbin/ldconfig
%if 0%{?has_systemd}
%service_add_post pmmgr
%else
%{fillup_and_insserv pmmgr}
%endif
PCP_LOG_DIR=%{_logsdir}
PCP_PMNS_DIR=%{_pmnsdir}
# restore saved configs, if any
test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
rm -f $PCP_LOG_DIR/configs.sh
# migrate old to new temp dir locations (within the same filesystem)
migrate_tempdirs()
{
_sub="$1"
_new_tmp_dir=%{_tempsdir}
_old_tmp_dir=%{_localstatedir}/tmp
for d in "$_old_tmp_dir/$_sub" ; do
test -d "$d" -a -k "$d" || continue
cd "$d" || continue
for f in * ; do
[ "$f" != "*" ] || continue
source="$d/$f"
target="$_new_tmp_dir/$_sub/$f"
[ "$source" != "$target" ] || continue
[ -f "$target" ] || mv -fu "$source" "$target"
done
cd && rmdir "$d" 2>/dev/null
done
}
for daemon in mmv pmdabash pmie pmlogger
do
migrate_tempdirs $daemon
done
chown -R pcp:pcp %{_logsdir}/pmcd 2>/dev/null
chown -R pcp:pcp %{_logsdir}/pmlogger 2>/dev/null
chown -R pcp:pcp %{_logsdir}/pmie 2>/dev/null
chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null
touch "$PCP_PMNS_DIR/.NeedRebuild"
chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
%if !%{disable_systemd}
systemctl condrestart pmcd.service >/dev/null 2>&1
systemctl condrestart pmlogger.service >/dev/null 2>&1
systemctl condrestart pmie.service >/dev/null 2>&1
systemctl condrestart pmproxy.service >/dev/null 2>&1
%else
/sbin/chkconfig --add pmcd >/dev/null 2>&1
/sbin/service pmcd condrestart
/sbin/chkconfig --add pmlogger >/dev/null 2>&1
/sbin/service pmlogger condrestart
/sbin/chkconfig --add pmie >/dev/null 2>&1
/sbin/service pmie condrestart
/sbin/chkconfig --add pmproxy >/dev/null 2>&1
/sbin/service pmproxy condrestart
%endif
%post -n %{lib_pkg} -p /sbin/ldconfig
%postun -n %{lib_pkg} -p /sbin/ldconfig
%if 0%{?suse_version}
%postun
/sbin/ldconfig
%if 0%{?has_systemd}
%service_del_postun pcp pmproxy pmie
%else
%{?restart_on_update:%{restart_on_update pcp pmproxy pmie}}
%{?insserv_cleanup:%{insserv_cleanup}}
%endif
%endif
###############################################################################
%files -f base.list
#
# Note: there are some headers (e.g. domain.h) and in a few cases some
# C source files that rpmlint complains about. These are not devel files,
# but rather they are (slightly obscure) PMDA config files.
#
%defattr(-,root,root)
%doc CHANGELOG COPYING README VERSION.pcp pcp.lsm
%if 0%{?suse_version}
%exclude %{_booksdir}/html
%exclude %{_booksdir}/*.pdf
%exclude %{_docdir}/pcp/demos
%exclude %{_docdir}/pcp/examples
%exclude %{_docdir}/pcp/sample
%exclude %{_docdir}/pcp/simple
%exclude %{_docdir}/pcp/trivial
%exclude %{_docdir}/pcp/txmon
%exclude %{_testsdir}
# -> pcp-pmda-infiniband
%exclude %{_pmdasdir}/infiniband
%endif
%ghost %dir %{_rundir}/pcp
%dir %{_confdir}
%dir %{_pmdasdir}
%dir %{_datadir}/pcp
%dir %{_localstatedir}/lib/pcp
%if 0%{?suse_version}
%dir %{_libdir}/pcp
%dir %{_libdir}/pcp/bin
%endif
%{_localstatedir}/lib/pcp
%dir %{_localstatedir}/lib/pcp/config
%if 0%{?suse_version}
# part of pcp-gui
%exclude %{_localstatedir}/lib/pcp/config/pmsnap
%exclude %{_localstatedir}/lib/pcp/config/pmchart
%exclude %{_localstatedir}/lib/pcp/config/pmafm/pcp-gui
%{_initddir}/pcp
%{_initddir}/pmcd
%{_initddir}/pmlogger
%{_initddir}/pmie
%{_initddir}/pmproxy
%endif
%dir %attr(0775,pcp,pcp) %{_tempsdir}
%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmie
%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmlogger
%dir %{_datadir}/pcp/lib
%{_datadir}/pcp/lib/ReplacePmnsSubtree
%{_datadir}/pcp/lib/bashproc.sh
%{_datadir}/pcp/lib/lockpmns
%{_datadir}/pcp/lib/pmdaproc.sh
%{_datadir}/pcp/lib/rc-proc.sh
%{_datadir}/pcp/lib/rc-proc.sh.minimal
%{_datadir}/pcp/lib/unlockpmns
%dir %attr(0775,pcp,pcp) %{_logsdir}
%attr(0775,pcp,pcp) %{_logsdir}/pmcd
%attr(0775,pcp,pcp) %{_logsdir}/pmlogger
%attr(0775,pcp,pcp) %{_logsdir}/pmie
%attr(0775,pcp,pcp) %{_logsdir}/pmproxy
%{_localstatedir}/lib/pcp/pmns
%if !0%{?has_systemd}
%{_initrddir}/pcp
%{_initrddir}/pmcd
%{_initrddir}/pmlogger
%{_initrddir}/pmie
%{_initrddir}/pmproxy
%else
%{_unitdir}/pmcd.service
%{_unitdir}/pmlogger.service
%{_unitdir}/pmie.service
%{_unitdir}/pmproxy.service
%{_sbindir}/rcpmcd
%{_sbindir}/rcpmie
%{_sbindir}/rcpmlogger
%{_sbindir}/rcpmproxy
%endif
%{_mandir}/man5/*
%dir %{_sysconfdir}/sasl2
%config(noreplace) %{_sysconfdir}/sasl2/pmcd.conf
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmlogger
%config(noreplace) %{_sysconfdir}/cron.d/pcp-pmie
%config %{_sysconfdir}/bash_completion.d/pcp
%config %{_sysconfdir}/pcp.env
%config %{_sysconfdir}/pcp.sh
%dir %{_confdir}/pmcd
%config(noreplace) %{_confdir}/pmcd/pmcd.conf
%config(noreplace) %{_confdir}/pmcd/pmcd.options
%config(noreplace) %{_confdir}/pmcd/rc.local
%dir %{_confdir}/pmproxy
%config(noreplace) %{_confdir}/pmproxy/pmproxy.options
%dir %{_confdir}/pmie
%config(noreplace) %{_confdir}/pmie/control
%dir %{_confdir}/pmlogger
%config(noreplace) %{_confdir}/pmlogger/control
%{_localstatedir}/lib/pcp/config/pmafm
%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmie
%{_localstatedir}/lib/pcp/config/pmieconf
%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmlogger
%{_localstatedir}/lib/pcp/config/pmlogger/*
%{_localstatedir}/lib/pcp/config/pmlogconf
%{_localstatedir}/lib/pcp/config/pmlogrewrite
%dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmda
%if 0%{?rhel} == 0 || 0%{?rhel} > 5
%{tapsetdir}/pmcd.stp
%else # rhel5
%ifarch ppc ppc64
# no systemtap-sdt-devel
%else # ! ppc
%{tapsetdir}/pmcd.stp
%endif # ppc
%endif
%files conf
%defattr(-,root,root)
%dir %{_includedir}/pcp
%{_includedir}/pcp/builddefs
%{_includedir}/pcp/buildrules
%config %{_sysconfdir}/pcp.conf
%files -n %{lib_pkg}
%defattr(-,root,root)
%{_libdir}/libpcp.so.3
%{_libdir}/libpcp_gui.so.2
%{_libdir}/libpcp_mmv.so.1
%{_libdir}/libpcp_pmda.so.3
%{_libdir}/libpcp_trace.so.2
%{_libdir}/libpcp_import.so.1
%files -n %{lib_devel_pkg} -f devel.list
%defattr(-,root,root)
%{_libdir}/libpcp.so
%{_libdir}/libpcp.so.2
%{_libdir}/libpcp_gui.so
%{_libdir}/libpcp_gui.so.1
%{_libdir}/libpcp_mmv.so
%{_libdir}/libpcp_pmda.so
%{_libdir}/libpcp_pmda.so.2
%{_libdir}/libpcp_trace.so
%{_libdir}/libpcp_import.so
%{_includedir}/pcp/*.h
# PMDAs that ship src and are not for production use
# straight out-of-the-box, for devel or QA use only.
%if 0%{?suse_version}
%{_docdir}/pcp/sample
%{_docdir}/pcp/simple
%{_docdir}/pcp/trivial
%{_docdir}/pcp/txmon
%else
%{_pmdasdir}/simple
%{_pmdasdir}/sample
%{_pmdasdir}/trivial
%{_pmdasdir}/txmon
%endif
%files testsuite
%defattr(-,pcpqa,pcpqa)
%{_testsdir}
%if !%{disable_microhttpd}
%files webapi
%defattr(-,root,root)
%{_initddir}/pmwebd
%if !%{disable_systemd}
%{_unitdir}/pmwebd.service
%{_sbindir}/rcpmwebd
%endif
%{_libexecdir}/pcp/bin/pmwebd
%attr(0775,pcp,pcp) %{_logsdir}/pmwebd
%dir %{_confdir}/pmwebd
%config(noreplace) %{_confdir}/pmwebd/pmwebd.options
%dir %{_datadir}/pcp/webapps
%{_mandir}/man1/pmwebd.1.gz
%{_mandir}/man3/PMWEBAPI.3.gz
%endif
%if !%{disable_microhttpd}
%files webjs
%defattr(-,root,root)
%{_datadir}/pcp/webapps/*
%endif
%files manager
%defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_confdir}/pmmgr
%{_confdir}/pmmgr
%endif
%{_initddir}/pmmgr
%if !%{disable_systemd}
%{_unitdir}/pmmgr.service
%{_sbindir}/rcpmmgr
%endif
%{_libexecdir}/pcp/bin/pmmgr
%attr(0775,pcp,pcp) %{_logsdir}/pmmgr
%dir %{_confdir}/pmmgr
%config(noreplace) %{_confdir}/pmmgr/pmmgr.options
%{_mandir}/man1/pmmgr.1.gz
%files import-sar2pcp
%defattr(-,root,root)
%{_bindir}/sar2pcp
%{_mandir}/man1/sar2pcp.1.gz
%files import-iostat2pcp
%defattr(-,root,root)
%{_bindir}/iostat2pcp
%{_mandir}/man1/iostat2pcp.1.gz
%if !%{disable_sheet2pcp}
%files import-sheet2pcp
%defattr(-,root,root)
%{_bindir}/sheet2pcp
%{_mandir}/man1/sheet2pcp.1.gz
%endif
%files import-mrtg2pcp
%defattr(-,root,root)
%{_bindir}/mrtg2pcp
%{_mandir}/man1/mrtg2pcp.1.gz
%files import-collectl2pcp
%defattr(-,root,root)
%{_bindir}/collectl2pcp
%{_mandir}/man1/collectl2pcp.1.gz
%if !%{disable_papi}
%files pmda-papi
%defattr(-,root,root)
%{_pmdasdir}/papi
%{_mandir}/man1/pmdapapi.1.gz
%endif
%if !%{disable_perfevent}
%files pmda-perfevent
%defattr(-,root,root)
%{_pmdasdir}/perfevent
%config(noreplace) %{_pmdasdir}/perfevent/perfevent.conf
%{_mandir}/man1/perfalloc.1.gz
%{_mandir}/man1/pmdaperfevent.1.gz
%{_mandir}/man5/perfevent.conf.5.gz
%endif
%if !%{disable_infiniband}
%files pmda-infiniband
%defattr(-,root,root)
%{_pmdasdir}/ib
%{_pmdasdir}/infiniband
%{_mandir}/man1/pmdaib.1.gz
%endif
%files -n perl-PCP-PMDA -f perl-pcp-pmda.list
%defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/PMDA
%endif
%files -n perl-PCP-MMV -f perl-pcp-mmv.list
%defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/MMV
%endif
%files -n perl-PCP-LogImport -f perl-pcp-logimport.list
%defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP
%dir %{_prefix}/lib/perl5/vendor_perl/*/*-linux-thread-multi*/auto/PCP/LogImport
%endif
%files -n perl-PCP-LogSummary -f perl-pcp-logsummary.list
%defattr(-,root,root)
%if 0%{?suse_version}
%dir %{_prefix}/lib/perl5/vendor_perl/*/PCP
%endif
%files -n python-pcp -f python-pcp.list.rpm
%defattr(-,root,root)
%if 0%{?suse_version}
%{python_sitearch}/*.so
%dir %{python_sitearch}/pcp
%{python_sitearch}/pcp
%endif
%if !%{disable_python3}
%files -n python3-pcp -f python3-pcp.list.rpm
%defattr(-,root,root)
%endif
%if !%{disable_qt}
%files -n pcp-gui -f pcp-gui.list
%defattr(-,root,root,-)
%{_pixmapdir}/pmchart.png
%{_confdir}/pmsnap
%config(noreplace) %{_confdir}/pmsnap/control
%{_localstatedir}/lib/pcp/config/pmsnap
%{_localstatedir}/lib/pcp/config/pmchart
%{_localstatedir}/lib/pcp/config/pmafm/pcp-gui
%{_datadir}/applications/pmchart.desktop
%endif
%files -n pcp-doc -f pcp-doc.list
%defattr(-,root,root,-)
%if 0%{?suse_version}
%exclude %{_docdir}/pcp/CHANGELOG
%exclude %{_docdir}/pcp/COPYING
%exclude %{_docdir}/pcp/INSTALL
%exclude %{_docdir}/pcp/README
%exclude %{_docdir}/pcp/VERSION.pcp
%exclude %{_docdir}/pcp/pcp.lsm
%exclude %{_docdir}/pcp/sample
%exclude %{_docdir}/pcp/simple
%exclude %{_docdir}/pcp/trivial
%exclude %{_docdir}/pcp/txmon
%dir %{_docdir}/pcp/demos
%dir %{_docdir}/pcp/demos/tutorials
%endif
%changelog