summaryrefslogtreecommitdiffstats
path: root/system/pcp
diff options
context:
space:
mode:
Diffstat (limited to 'system/pcp')
-rw-r--r--system/pcp/pcp.SlackBuild31
1 files changed, 24 insertions, 7 deletions
diff --git a/system/pcp/pcp.SlackBuild b/system/pcp/pcp.SlackBuild
index 87345bcb99..377ccc58cc 100644
--- a/system/pcp/pcp.SlackBuild
+++ b/system/pcp/pcp.SlackBuild
@@ -39,9 +39,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -67,6 +64,23 @@ fi
set -e
+export -n OUTPUT
+
+MUID=${MUID:-377}
+MGID=${MGID:-377}
+
+if ! getent group pcp 2>&1 > /dev/null; then
+ echo " You must have an pcp group to run this script."
+ echo " # groupadd -g $MGID pcp"
+ exit 1
+elif ! getent passwd pcp 2>&1 > /dev/null; then
+ echo " You must have a pcp user to run this script."
+ echo " # useradd -u $MUID -g $MGID -d /var/lib/pcp pcp"
+ exit 1
+fi
+
+
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -109,6 +123,11 @@ else
make DIST_ROOT="$PKG" NO_CHOWN=true install_pcp
fi
+(cd $PKG/usr/lib$LIBDIRSUFFIX
+ rm libpcp.a libpcp_archive.a libpcp_fault.a libpcp_gui.a \
+ libpcp_import.a libpcp_mmv.a libpcp_pmda.a\
+ libpcp_trace.a libpcp_web.a
+)
mkdir -p "$PKG"/usr/doc/$PRGNAM-$VERSION
mv "$PKG"/usr/share/doc/* "$PKG"/usr/doc/$PRGNAM-$VERSION/
@@ -119,11 +138,8 @@ find "$PKG"/usr/share/icons/ -type d -empty -delete || true
install -D -m644 "$CWD"/sysuser.conf "$PKG"/usr/lib${LIBDIRSUFFIX}/sysusers.d/pcp.conf
install -D -m644 "$CWD"/tmpfile.conf "$PKG"/usr/lib${LIBDIRSUFFIX}/tmpfiles.d/pcp.conf
-
rm -rf "$PKG"/{var/lib/pcp/testsuite,run,var/tmp}
-
-
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -139,10 +155,11 @@ cp -a \
CHANGELOG CONTRIBUTING.md COPYING README.github README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL.md
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
+/sbin/makepkg --remove-rpaths -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE