diff options
Diffstat (limited to 'system/newrelic-sysmond/newrelic-sysmond.SlackBuild')
-rw-r--r-- | system/newrelic-sysmond/newrelic-sysmond.SlackBuild | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/system/newrelic-sysmond/newrelic-sysmond.SlackBuild b/system/newrelic-sysmond/newrelic-sysmond.SlackBuild index 3e5cf79abb..d33cf0ce49 100644 --- a/system/newrelic-sysmond/newrelic-sysmond.SlackBuild +++ b/system/newrelic-sysmond/newrelic-sysmond.SlackBuild @@ -23,13 +23,14 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=newrelic-sysmond -VERSION=${VERSION:-1.3.1.437} +VERSION=${VERSION:-1.4.0.471} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi @@ -40,12 +41,17 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - BINARCH=x86 + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - BINARCH=x64 + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else - echo "$ARCH is not supported" - exit 1 + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -53,34 +59,39 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION-linux +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION-linux.tar.gz -cd $PRGNAM-$VERSION-linux +mv $PRGNAM-$VERSION-linux $PRGNAM-$VERSION +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/var/run/newrelic $PKG/var/log/newrelic +mkdir -p $PKG/usr/sbin +mkdir -p $PKG/etc/rc.d +mkdir -p $PKG/etc/newrelic +mkdir -p $PKG/var/run/newrelic +mkdir -p $PKG/var/log/newrelic -install -m 0644 -D nrsysmond.cfg $PKG/etc/newrelic/nrsysmond.cfg.new +install -m 0644 nrsysmond.cfg $PKG/etc/newrelic/nrsysmond.cfg.new -install -m 0755 -D daemon/nrsysmond.$BINARCH $PKG/usr/sbin/nrsysmond - -install -m 0755 -D scripts/nrsysmond-config $PKG/usr/sbin/nrsysmond-config +if [ $ARCH == 'x86_64' ]; then + install -m 0755 daemon/nrsysmond.x64 $PKG/usr/sbin/nrsysmond +else + install -m 0755 daemon/nrsysmond.x86 $PKG/usr/sbin/nrsysmond +fi -install -m 0755 -D scripts/newrelic-sysmond.init.rhel \ - $PKG/etc/rc.d/rc.nrsysmond.new +install -m 0755 scripts/nrsysmond-config $PKG/usr/sbin/nrsysmond-config +install -m 0755 scripts/newrelic-sysmond.init.rhel $PKG/etc/rc.d/rc.newrelic-sysmond find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - INSTALL.txt LICENSE.txt MD5SUMS scripts \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a INSTALL.txt LICENSE.txt MD5SUMS scripts $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |