1

[alpine-devel] pnp4nagios

Peter de Zoeten
Details
Message ID
<CAArrbi1iwc7pgpGCUsr0xUz+NYnJ-LhRfQr-13CaJRxLbUfPhg@mail.gmail.com>
Sender timestamp
1320788093
DKIM signature
missing
Download raw message
Hello all,

i'm a little in doubt at the moment;

I compiled pnp4nagios with the following git diff. PNP4Nagios is
heavily dependend on PHP. So should i make a php package?
And also: in this APKBUILD the package install to
/usr/local/pnp4nagios; should i try to get it to webapps?
This is the git APKBUILD package:

Look at www.pnp4nagios.org for all information
---
 testing/pnp4nagios/APKBUILD |   64 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 testing/pnp4nagios/APKBUILD

diff --git a/testing/pnp4nagios/APKBUILD b/testing/pnp4nagios/APKBUILD
new file mode 100644
index 0000000..3ee1ec2
--- /dev/null
+++ b/testing/pnp4nagios/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Peter de Zoeten <peter@dezoeten.mine.nu>
+# Maintainer:  Peter de Zoeten <peter@dezoeten.mine.nu>
+pkgname=pnp4nagios
+pkgver=0.6.15
+pkgrel=0
+pkgdesc="PNP4Nagios"
+url="http://www.pnp4nagios.org"
+arch="all"
+license="GPL"
+depends="nagios rrdtool perl-time-hires perl-rrd php-zlib libgcc"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+#subpackages="$pkgname-doc $pkgname-php"
+subpackages="$pkgname-doc"
+
+source="http://sourceforge.net/projects/pnp4nagios/files/pnp4nagios/pnp4nagios-$pkgver/pnp4nagios-$pkgver.tar.gz"
+
+#source="saveas-http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.15.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpnp4nagios%2Ffiles%2FPNP-0.6%2F&ts=1318875996&use_mirror=heanet/pnp4nagios-0.6.15.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+       local i
+       cd "$_builddir"
+       for i in $source; do
+               case $i in
+               *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+               esac
+       done
+}
+
+build() {
+       cd "$_builddir"
+       ./configure || return 1
+       make all || return 1
+}
+doc() {
+        arch="noarch"
+        # Man pages
+        mkdir -p "$subpkgdir"/usr/share/man || return 1
+        mv "$pkgdir"/usr/local/pnp4nagios/man/man*
"$subpkgdir"/usr/share/man/ \
+        || return 1
+
+        # Doc files
+        _docs="INSTALL README"
+        for _doc in $_docs; do
+                install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
+               "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+        done
+       rmdir "$pkgdir"/usr/local/pnp4nagios/man/
+}
+
+package() {
+       cd "$_builddir"
+       make fullinstall DESTDIR="$pkgdir" || return 1
+       mkdir -p "$pkgdir"/usr/share/nagios/htdocs/ssi
+       cp "$_builddir"/contrib/ssi/status-header.ssi
"$pkgdir"/usr/share/nagios/htdocs/ssi/status-header.ssi
+#       rm -rf "$pkgdir"/etc/httpd
+       mkdir -p "$pkgdir"/etc/lighttpd
+       cp "$_builddir"/sample-config/lighttpd.pnp4nagios.conf
"$pkgdir"/etc/lighttpd/pnp4nagios.conf.sample
+}
+
+
+md5sums="27cdab96510e15cfa0f4b7c2bf15dd2b  pnp4nagios-0.6.15.tar.gz"

Let me know what you think. It works fine the way it is compiled now.

Regards, Peter


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Carlo Landmeter
Details
Message ID
<CA+cSEmNacjPqNQaPpVUSycBehMHbVkw9fPJCx5dfG5YAaVFUkQ@mail.gmail.com>
In-Reply-To
<CAArrbi1iwc7pgpGCUsr0xUz+NYnJ-LhRfQr-13CaJRxLbUfPhg@mail.gmail.com> (view parent)
Sender timestamp
1320846110
DKIM signature
missing
Download raw message
On Tue, Nov 8, 2011 at 10:34 PM, Peter de Zoeten <peter@dezoeten.mine.nu> wrote:
> Hello all,
>
> i'm a little in doubt at the moment;
>
> I compiled pnp4nagios with the following git diff. PNP4Nagios is
> heavily dependend on PHP. So should i make a php package?

If the package consist of a binary/script files and php files which
can run separately on different server (and make sense) it would make
sense to split them.
If not, then just keep it in the same package and add the necessary
depends to it.

> And also: in this APKBUILD the package install to
> /usr/local/pnp4nagios; should i try to get it to webapps?

You have an empty configure line in your apkbuild. This makes "make
install" go to usr/local.
newapkbuild has logic to download the src for you and analyze it and
prepare a proper apkbuild for you.
Because this is a sf.net source, you need to use the -s switch like this:

newapkbuild -s http://sourceforge.net/projects/pnp4nagios/files/PNP-0.6/pnp4nagios-0.6.15.tar.gz

While normally you can skip the -s part and just append the src url.
I don't know where the php files are installed, but if its some kind
of interface, i guess it would make sense to move it to webapps dir.

Please create git patches with "git format-patch" and add a sane
commit message to that commit like we use in our aports tree. Please
check aports git log for reference:

http://git.alpinelinux.org/cgit/aports/log

Please keep in mind, if you set yourself as maintainer, try to keep
the aport up-to-date by sending us patches.
If you are going to send us patches on a regular basis we suggest you
to request your own repo to be hosted on git.alpinelinux.org or setup
your own repo (i.e. github) from which we can fetch.

Thanks!

-carlo

> This is the git APKBUILD package:
>
> Look at www.pnp4nagios.org for all information
> ---
>  testing/pnp4nagios/APKBUILD |   64 +++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 64 insertions(+), 0 deletions(-)
>  create mode 100644 testing/pnp4nagios/APKBUILD
>
> diff --git a/testing/pnp4nagios/APKBUILD b/testing/pnp4nagios/APKBUILD
> new file mode 100644
> index 0000000..3ee1ec2
> --- /dev/null
> +++ b/testing/pnp4nagios/APKBUILD
> @@ -0,0 +1,64 @@
> +# Contributor: Peter de Zoeten <peter@dezoeten.mine.nu>
> +# Maintainer:  Peter de Zoeten <peter@dezoeten.mine.nu>
> +pkgname=pnp4nagios
> +pkgver=0.6.15
> +pkgrel=0
> +pkgdesc="PNP4Nagios"
> +url="http://www.pnp4nagios.org"
> +arch="all"
> +license="GPL"
> +depends="nagios rrdtool perl-time-hires perl-rrd php-zlib libgcc"
> +depends_dev=""
> +makedepends="$depends_dev"
> +install=""
> +#subpackages="$pkgname-doc $pkgname-php"
> +subpackages="$pkgname-doc"
> +
> +source="http://sourceforge.net/projects/pnp4nagios/files/pnp4nagios/pnp4nagios-$pkgver/pnp4nagios-$pkgver.tar.gz"
> +
> +#source="saveas-http://downloads.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.15.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpnp4nagios%2Ffiles%2FPNP-0.6%2F&ts=1318875996&use_mirror=heanet/pnp4nagios-0.6.15.tar.gz"
> +
> +_builddir="$srcdir"/$pkgname-$pkgver
> +prepare() {
> +       local i
> +       cd "$_builddir"
> +       for i in $source; do
> +               case $i in
> +               *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
> +               esac
> +       done
> +}
> +
> +build() {
> +       cd "$_builddir"
> +       ./configure || return 1
> +       make all || return 1
> +}
> +doc() {
> +        arch="noarch"
> +        # Man pages
> +        mkdir -p "$subpkgdir"/usr/share/man || return 1
> +        mv "$pkgdir"/usr/local/pnp4nagios/man/man*
> "$subpkgdir"/usr/share/man/ \
> +        || return 1
> +
> +        # Doc files
> +        _docs="INSTALL README"
> +        for _doc in $_docs; do
> +                install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
> +               "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
> +        done
> +       rmdir "$pkgdir"/usr/local/pnp4nagios/man/
> +}
> +
> +package() {
> +       cd "$_builddir"
> +       make fullinstall DESTDIR="$pkgdir" || return 1
> +       mkdir -p "$pkgdir"/usr/share/nagios/htdocs/ssi
> +       cp "$_builddir"/contrib/ssi/status-header.ssi
> "$pkgdir"/usr/share/nagios/htdocs/ssi/status-header.ssi
> +#       rm -rf "$pkgdir"/etc/httpd
> +       mkdir -p "$pkgdir"/etc/lighttpd
> +       cp "$_builddir"/sample-config/lighttpd.pnp4nagios.conf
> "$pkgdir"/etc/lighttpd/pnp4nagios.conf.sample
> +}
> +
> +
> +md5sums="27cdab96510e15cfa0f4b7c2bf15dd2b  pnp4nagios-0.6.15.tar.gz"
>
> Let me know what you think. It works fine the way it is compiled now.
>
> Regards, Peter
>
>
> ---
> Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
> Help:         alpine-devel+help@lists.alpinelinux.org
> ---
>
>


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---