diff options
author | Inetol | 2022-08-23 14:00:56 +0200 |
---|---|---|
committer | Inetol | 2022-08-23 14:00:56 +0200 |
commit | 6c236e3fc18dd834dc39aa75971e508c82ba511c (patch) | |
tree | 3eb5c2f76a39b313707b4b094305127c086fdfd9 | |
parent | ced28aa7fb37c6c543732e6767448c85024edfd4 (diff) | |
download | aur-6c236e3fc18dd834dc39aa75971e508c82ba511c.tar.gz |
upgpkg: newrelic-php5 10.0.0.312-2
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rwxr-xr-x | newrelic-php5.install | 107 |
4 files changed, 63 insertions, 113 deletions
@@ -1,17 +1,19 @@ pkgbase = newrelic-php5 pkgdesc = PHP Monitoring Agent pkgver = 10.0.0.312 - pkgrel = 1 + pkgrel = 2 url = https://newrelic.com/php install = newrelic-php5.install arch = x86_64 + arch = i686 license = Apache depends = glibc depends = php + noextract = newrelic-php5-10.0.0.312.tar.gz backup = etc/php/conf.d/newrelic.ini - source = https://download.newrelic.com/php_agent/archive/10.0.0.312/newrelic-php5-10.0.0.312-linux.tar.gz + source = newrelic-php5-10.0.0.312.tar.gz::https://download.newrelic.com/php_agent/archive/10.0.0.312/newrelic-php5-10.0.0.312-linux.tar.gz source = newrelic-daemon.service - md5sums = d9c9359ae695d724380f024ccf2f4921 - md5sums = 4fc78347663adcb32ed28eddb546619c + b2sums = 9f643ce5183249560ba13ab114c44a52f6b33bc0e0bde7a79d211877c8e4d5f4554de83a9ac8dc3e8fa399cea91265fa83e41485a6235d232b26a8750394908c + b2sums = c5f8acd4c94951f7761b98aa9965110f2128fb86b0fa0f5097f2a5ea537db5b58e62dcce57a23e458ca4906bcfe03aca687eb5e7239551726deee8a5d953abbd pkgname = newrelic-php5 diff --git a/.gitignore b/.gitignore index 8175a138a83d..26c36dd03649 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ -# Ignore everything: * - -# ...except: !.gitignore -!PKGBUILD !.SRCINFO -!*.service -!*.install
\ No newline at end of file +!newrelic-daemon.service +!newrelic-php5.install +!PKGBUILD
\ No newline at end of file @@ -1,42 +1,48 @@ -# Maintainer: Iván Gabaldón <contact|@|inetol.net> -# Contributor: Felix Yan <felixonmars@archlinux.org> -# Contributor: Vinh Nguyen <kurei [at] axcoto.com> +# Maintainer: Iván Gabaldón <contact [at] inetol.net> # Contributor: Kim Brandt <myrveln@gmail.com> +# Contributor: Vinh Nguyen <kurei [at] axcoto.com> +# Contributor: Felix Yan <felixonmars@archlinux.org> pkgname=newrelic-php5 pkgver=10.0.0.312 _libver=20210902 -pkgrel=1 +pkgrel=2 pkgdesc='PHP Monitoring Agent' -arch=('x86_64') +arch=('x86_64' 'i686') url='https://newrelic.com/php' license=('Apache') depends=('glibc' 'php') backup=('etc/php/conf.d/newrelic.ini') install="$pkgname.install" -source=("https://download.newrelic.com/php_agent/archive/$pkgver/$pkgname-$pkgver-linux.tar.gz" +source=("$pkgname-$pkgver.tar.gz::https://download.newrelic.com/php_agent/archive/$pkgver/$pkgname-$pkgver-linux.tar.gz" 'newrelic-daemon.service') -md5sums=('d9c9359ae695d724380f024ccf2f4921' - '4fc78347663adcb32ed28eddb546619c') +noextract=("$pkgname-$pkgver.tar.gz") +b2sums=('9f643ce5183249560ba13ab114c44a52f6b33bc0e0bde7a79d211877c8e4d5f4554de83a9ac8dc3e8fa399cea91265fa83e41485a6235d232b26a8750394908c' + 'c5f8acd4c94951f7761b98aa9965110f2128fb86b0fa0f5097f2a5ea537db5b58e62dcce57a23e458ca4906bcfe03aca687eb5e7239551726deee8a5d953abbd') -package() { - cd "$srcdir"/$pkgname-$pkgver-linux +prepare() { + mkdir -p "$pkgname-$pkgver" + bsdtar -xpf "$pkgname-$pkgver.tar.gz" --strip-components=1 -C "$pkgname-$pkgver" +} - mkdir -p "$pkgdir"/usr/bin/ \ - "$pkgdir"/usr/lib/php/modules/ \ - "$pkgdir"/usr/share/doc/newrelic-php5/ \ - "$pkgdir"/usr/lib/systemd/system/ \ - "$pkgdir"/etc/php/conf.d/; +package() { + if [ "$CARCH" == 'x86_64' ]; then + install -Dm755 "$srcdir/$pkgname-$pkgver/daemon/newrelic-daemon.x64" "$pkgdir/usr/bin/newrelic-daemon" - install -v -Dm755 ./daemon/newrelic-daemon.x64 "$pkgdir"/usr/bin/newrelic-daemon + install -Dm755 "$srcdir/$pkgname-$pkgver/agent/x64/newrelic-$_libver-zts.so" "$pkgdir/usr/lib/php/modules/newrelic-zts.so" + install -Dm755 "$srcdir/$pkgname-$pkgver/agent/x64/newrelic-$_libver.so" "$pkgdir/usr/lib/php/modules/newrelic.so" + elif [ "$CARCH" == 'i686' ]; then + install -Dm755 "$srcdir/$pkgname-$pkgver/daemon/newrelic-daemon.x86" "$pkgdir/usr/bin/newrelic-daemon" - install -v -Dm755 ./agent/x64/newrelic-$_libver-zts.so "$pkgdir"/usr/lib/php/modules/newrelic-zts.so - install -v -Dm755 ./agent/x64/newrelic-$_libver.so "$pkgdir"/usr/lib/php/modules/newrelic.so + install -Dm755 "$srcdir/$pkgname-$pkgver/agent/x86/newrelic-$_libver-zts.so" "$pkgdir/usr/lib/php/modules/newrelic-zts.so" + install -Dm755 "$srcdir/$pkgname-$pkgver/agent/x86/newrelic-$_libver.so" "$pkgdir/usr/lib/php/modules/newrelic.so" + fi - install -v -Dm644 ./scripts/newrelic.ini.template "$pkgdir"/etc/php/conf.d/newrelic.ini - install -v -Dm644 ./scripts/newrelic.ini.template "$pkgdir"/etc/php/conf.d/newrelic.ini.template + install -Dm644 "$srcdir/$pkgname-$pkgver/scripts/newrelic.ini.template" "$pkgdir/etc/php/conf.d/newrelic.ini.template" + install -Dm644 "$srcdir/$pkgname-$pkgver/scripts/newrelic.ini.template" "$pkgdir/etc/php/conf.d/newrelic.ini" - install -v -Dm644 ./README.txt ./LICENSE "$pkgdir"/usr/share/doc/newrelic-php5/ + install -Dm644 "$srcdir/newrelic-daemon.service" "$pkgdir/usr/lib/systemd/system/newrelic-daemon.service" - install -v -Dm644 ../newrelic-daemon.service "$pkgdir"/usr/lib/systemd/system/ + install -Dm644 "$srcdir/$pkgname-$pkgver/README.txt" "$pkgdir/usr/share/doc/$pkgname/README" + install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/newrelic-php5.install b/newrelic-php5.install index f4a80e25069d..6298ff8973ec 100755 --- a/newrelic-php5.install +++ b/newrelic-php5.install @@ -1,93 +1,38 @@ -# This is a default template for a post-install scriptlet. -# Uncomment only required functions and remove any functions -# you don't need (and this header). - -## arg 1: the new package version -#pre_install() { - # do something here -#} - -## arg 1: the new package version post_install() { + # Setup "newrelic" user/group + useradd --system -M --home / --shell /sbin/nologin newrelic || true -#!/bin/sh -# Create the newrelic user and group -useradd --system -M --home / --shell /sbin/nologin newrelic || true + # Setup permissions + mkdir -p /var/log/newrelic + chmod 755 /var/log/newrelic -# Kludge the permissions -mkdir -p /var/log/newrelic -chmod 1777 /var/log/newrelic + # When first installing the package, the license key will not be set. + # Instead of throwing an error, we want to whine to the user and then exit cleanly. + if sed -e '/^[ ]*#/d' "${inifile}" 2> /dev/null | grep -q 'REPLACE_WITH_REAL_KEY' 2> /dev/null; then + if [ -z "${NR_SILENT}" -a -z "${SILENT}" ]; then + echo \ +" +:: The service cannot be enabled/started until a valid licence is inserted in the following file: -inifile=/etc/php/conf.d/newrelic.ini + /etc/php/conf.d/newrelic.ini -# -# When first installing the package, the license key will not be set. -# Instead of throwing an error, we want to whine to the user and then exit cleanly. -# +:: Edit the above referenced file and in newrelic.license=\"REPLACE_WITH_REAL_KEY\" + replace the value with your licence key. More information here: -if sed -e '/^[ ]*#/d' "${inifile}" 2> /dev/null | grep -q 'REPLACE_WITH_REAL_KEY' 2> /dev/null; then - if [ -z "${NR_SILENT}" -a -z "${SILENT}" ]; then - cat <<EOF + https://docs.newrelic.com/docs/apm/agents/php-agent/getting-started/introduction-new-relic-php/#installation -********************************************************************* -********************************************************************* -*** -*** Can not start the New Relic PHP Agent until you insert a -*** valid license key in the following file: -*** -*** ${inifile} -*** -*** You can do this by edit file /etc/php/conf.d/newrelic.ini, -*** fint the line newrelic.license="REPLACE_WITH_REAL_KEY" -*** and replace with your real key. More information here: -*** -*** https://docs.newrelic.com/docs/php/new-relic-for-php#installation -*** -*** No data will be reported until the server monitor can start. -*** You can get your New Relic key from the 'Configuration' section -*** of the 'Support' menu of your New Relic account (accessible at -*** https://rpm.newrelic.com). -*** -*** -********************************************************************* -********************************************************************* +:: No data will be reported until the daemon can be started. + Get your license key in \"Settings\" of the \"Support\" menu in your NewRelic account. + (accessible at https://rpm.newrelic.com) -Once you set up your LICENSE KEY. Restart your web server, php process -manager. The agent and daemon will be run automatically. - -EOF +:: Once the license key is configured, enable/start the NewRelic daemon, PHP and the web server. +" + fi + return 0 fi - return 0 -fi - - -} - -## arg 1: the new package version -## arg 2: the old package version -pre_upgrade() { - # do something here - return 0 } -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - # do something here - return 0 -} - -## arg 1: the old package version -pre_remove() { - # do something here - return 0 -} - -## arg 1: the old package version post_remove() { - # do something here - userdel newrelic || true - rm -rf /var/log/newrelic -} - -# vim:set ts=2 sw=2 et: + userdel newrelic || true + rm -rf /var/log/newrelic +}
\ No newline at end of file |