Max Matveev wrote:
I may even decide not to run pcp on the build box to keep "pristine"
environment but I have to have shared libraries and headers if I want
to build.
*and* you also need tools such as newhelp, pmns utils, etc., some of
which are also needed in production environments where pcp-devel will
not be installed. So they'll either have to go in pcp-libs or we also
need a pcp-common package ...
And I really like to be able to get the newhelp without getting the
rest of the pcp: pmda developement almost forces me to run newhelp at
build time to catch any problems with the help files. I also need the
pmns utilities to futz with the namespace files: both can go into
pcp-libs or pcp-base or pcp-foundation or pcp-kitchen-sink-no-scripts.
max
as above.
In any case, I agree on having pcp, pcp-libs and pcp-devel. A
preliminary patch is attached - this just picks stuff out of
the existing debian/*.install manifests.
-- Mark
diff --git a/GNUmakefile b/GNUmakefile
index 06119fc..621f38f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -53,7 +53,9 @@ LDIRT = config.cache config.status config.log files.rpm
pro_files.rpm \
pcp-pro-$(PACKAGE_MAJOR).$(PACKAGE_MINOR).$(PACKAGE_REVISION) \
pcp-sgi-$(PACKAGE_MAJOR).$(PACKAGE_MINOR).$(PACKAGE_REVISION) \
root-*/include root-*/lib root-*/*.rpm root-*/default_pro \
- autom4te.cache install.manifest install_pro.manifest
+ autom4te.cache install.manifest install_pro.manifest \
+ debug*.list devel_files libs_files base_files.rpm libs_files.rpm \
+ devel_files.rpm
SUBDIRS = src man build debian
ifeq "$(MAKECMDGOALS)" "clobber"
diff --git a/VERSION.pcp b/VERSION.pcp
index a68287b..0f7ba60 100644
--- a/VERSION.pcp
+++ b/VERSION.pcp
@@ -1,7 +1,7 @@
#
# This file is used by configure to get version information
#
-PACKAGE_MAJOR=2
-PACKAGE_MINOR=8
-PACKAGE_REVISION=4
+PACKAGE_MAJOR=3
+PACKAGE_MINOR=0
+PACKAGE_REVISION=0
PACKAGE_BUILD=1
diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in
index a6de568..8640398 100644
--- a/build/rpm/pcp.spec.in
+++ b/build/rpm/pcp.spec.in
@@ -57,6 +57,23 @@ Obsoletes: pcp <= @package_version@
Provides: pcp = @package_version@
%endif
+Requires: pcp-libs >= @package_version@
+
+Summary: System-level performance monitoring and performance management.
+License: GPL/LGPL
+Vendor: Silicon Graphics, Inc.
+URL: http://oss.sgi.com/projects/pcp
+Group: Applications/System
+
+#
+# pcp-libs
+#
+%package libs
+Group: Applications/System
+Summary: Performance Co-Pilot run-time libraries
+Vendor: Silicon Graphics, Inc.
+URL: http://oss.sgi.com/projects/pcp/
+
Provides: libpcp.so.2
%ifarch ia64 x86_64
Provides: libpcp.so.2()(64bit)
@@ -67,11 +84,16 @@ Provides: libpcp_pmda.so.2
Provides: libpcp_pmda.so.2()(64bit)
%endif
-Summary: System-level performance monitoring and performance management.
-License: GPL/LGPL
-Vendor: Silicon Graphics, Inc.
-URL: http://oss.sgi.com/projects/pcp
+#
+# pcp-devel
+#
+%package devel
Group: Applications/System
+Summary: Performance Co-Pilot (PCP) development headers and static libraries
+Vendor: Silicon Graphics, Inc.
+URL: http://oss.sgi.com/projects/pcp/
+
+Requires: pcp-libs >= @package_version@
%description
Performance Co-Pilot (PCP) is a framework and services to
@@ -83,6 +105,13 @@ all of the interesting performance data in a system, and
allows
client applications to easily retrieve and process any subset of
that data.
+%description libs
+Performance Co-Pilot (PCP) run-time libraries
+
+%description devel
+Performance Co-Pilot (PCP) headers, static libraries, documentation
+and tools for development.
+
%if %sgi_chroot_build
%debug_package
%endif
@@ -123,8 +152,33 @@ set +x
PCP_CONF=$BACKDIR/src/include/pcp.conf
export PCP_CONF
. $BACKDIR/src/include/pcp.env
-sort $DIST_MANIFEST | uniq | $PCP_AWK_PROG '
-$1 == "d" { printf ("%%%%dir %%%%attr(%s,root,root) %s\n", $2, $5); }
+
+FILELIST=`echo $BACKDIR/debian/*.{install,dirs}`
+DEVFILELIST=`echo $BACKDIR/debian/*-dev.{install,dirs}`
+
+#
+# Package split: pcp, pcp-libs, pcp-devel
+# -libs gets first pick, then -devel. Base package catches-all remaining.
+#
+sed -e 's/^/\//' $FILELIST | grep 'usr\/lib*\/lib.*\.so' >libs_files
+sed -e 's/^/\//' $DEVFILELIST >devel_files
+%ifarch ia64 x86_64
+sed -i -e 's/usr\/lib\//usr\/lib64\//' libs_files
+sed -i -e 's/usr\/lib\//usr\/lib64\//' devel_files
+%endif
+
+rm -f devel_files.rpm libs_files.rpm base_files.rpm
+sort -u $DIST_MANIFEST | $PCP_AWK_PROG '
+BEGIN {
+ while( getline < "libs_files") lib[$0]=1;
+ while( getline < "devel_files") dev[$0]=1;
+}
+{
+ if (lib[$NF]) f="libs_files.rpm";
+ else if (dev[$NF]) f="devel_files.rpm";
+ else f="base_files.rpm"
+}
+$1 == "d" { printf ("%%%%dir %%%%attr(%s,root,root) %s\n", $2, $5) >> f }
$1 == "f" { if ( match ($6, "'$PCP_VAR_DIR'/config") ||
match ($6, "'$PCP_SYSCONFIG_DIR'") ) {
printf ("%%%%config(noreplace) ");
@@ -132,13 +186,16 @@ $1 == "f" { if ( match ($6, "'$PCP_VAR_DIR'/config") ||
if (match ($6, "'$PCP_MAN_DIR'") || match ($6, "'$PCP_DOC_DIR'")) {
printf ("%%%%doc ");
}
- printf ("%%%%attr(%s,root,root) %s\n", $2, $6); }
-$1 == "l" { print "%attr(0777,root,root)", $3; }' > files.rpm
+ printf ("%%%%attr(%s,root,root) %s\n", $2, $6) >> f }
+$1 == "l" { print "%attr(0777,root,root)", $3 >> f }'
set -x
-#
-%files -f files.rpm
+%files -f base_files.rpm
+
+%files libs -f libs_files.rpm
+
+%files devel -f devel_files.rpm
%pre
exit 0
|