X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by lists.alpinelinux.org (Postfix) with ESMTP id 923331EBFFD for ; Tue, 1 Feb 2011 19:49:09 +0000 (UTC) Received: by iyb26 with SMTP id 26so6469651iyb.13 for ; Tue, 01 Feb 2011 11:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=e7gqF6WeuD9unG8jwXZVSj3Er6XqhnU6KLNJZ9SUl6Y=; b=l0LtXtLaNnyhFvuH6K35yQQ1s5oPyWm0ZabUDd846LATzhwc8bkLUIQ8tadnogUQnk 23YBhhZ+VgQ4u9+k+MNviADfRPju4mS17xkMzHa1IU7b99wl7wOmVSj6wzLoXxUv2DPN TPatUX+GSmh8x/UwuAyJbEPne7iy1iy83cnP8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lX5vpJm1VOy/0C4rgvQAQYFfIqS5/nudr680zKdhtYOCG129Gc0oSglrUTf7v9ACWf 6ToYKm3P9SpQSphuYP0+qrVMFy8Do9MoL0B5Lgm6ApRX383fMmpJwss/n/4wgp/M7wX7 5P2UPZuFjIY0UnS1htGDrWv00KrsOBXNi8lr8= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.231.36.7 with SMTP id r7mr8885321ibd.136.1296589748325; Tue, 01 Feb 2011 11:49:08 -0800 (PST) Received: by 10.231.13.73 with HTTP; Tue, 1 Feb 2011 11:49:08 -0800 (PST) In-Reply-To: <00AA038E4179CC4C8216C7595BD3E43B05ABFC83@ZAEXCH01.zaf.wtbts.net> References: <00AA038E4179CC4C8216C7595BD3E43B05ABFC83@ZAEXCH01.zaf.wtbts.net> Date: Tue, 1 Feb 2011 20:49:08 +0100 Message-ID: Subject: Re: [alpine-devel] Zabbix APKBUILD From: Carlo Landmeter To: "Computer Department (Watchtower South Africa Branch)" Cc: Alpine-devel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jan 31, 2011 at 7:38 AM, Computer Department (Watchtower South Africa Branch) wrote: > Apologies for top-posting... > > Thanks for figuring out a way to do this! I had wanted to do something > like this before, so this is great. > > Just one point - we probably want to add a "replaces=3Dzabbix" line to > support upgrading. And pkgrel should be 3 if my earlier commit from > Friday gets put in. Because your changes are already in my apkbuild I just commited it like this and its currently in aports. Hope you don't mind. -carlo > > Thanks! > > duane hughes > > -----Original Message----- > From: Carlo Landmeter [mailto:clandmeter@gmail.com] > Sent: 29 January 2011 00:57 > To: Alpine-devel > Subject: [alpine-devel] Zabbix APKBUILD > > Hi, > > I wanted to give Zabbix a try but it didn't find the supported db I > needed. It seems Zabbix does not support building against multiple db's > so we must build it separately. > Because i don't like seeing so many APKBUILD files for the same program > I modified the current one to build against 3 db's mysql pgsql and > sqlite. > Im not sure if this is preferred or will cause any issues so im > including my work as a complete apkbuild instead of a diff for review. > If this is OK i will commit to my tree. > I also made some other changes which seems to make sense. > > > ### APKBUILD ### > > > # Contributor: Jeff Bilyk # Maintainer: Natanael Copa > pkgname=3Dzabbix > pkgver=3D1.8.4 > pkgrel=3D2 > pkgdesc=3D"Enterprise-class open source distributed monitoring" > url=3D"www.zabbix.com" > arch=3D"all" > license=3D"GPL" > depends=3D"fping" > makedepends=3D"postgresql-dev curl-dev libiconv-dev net-snmp-dev > =A0 =A0 =A0 =A0sqlite-dev mysql-dev curl-dev" > install=3D"$pkgname.pre-install" > pkgusers=3D"zabbix" > pkggroups=3D"zabbix" > subpackages=3D"$pkgname-doc $pkgname-agent $pkgname-pgsql $pkgname-mysql > =A0 =A0 =A0 =A0$pkgname-webif $pkgname-sqlite $pkgname-utils $pkgname-set= up" > source=3D"http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.= g > z > =A0 =A0 =A0 =A0zabbix_server.conf > =A0 =A0 =A0 =A0zabbix_trapper.conf > =A0 =A0 =A0 =A0zabbix_proxy.conf > =A0 =A0 =A0 =A0zabbix_agentd.conf > =A0 =A0 =A0 =A0zabbix-dn_skipname.patch > =A0 =A0 =A0 =A0zabbix-getloadavg.patch > =A0 =A0 =A0 =A0zabbix-server.initd > =A0 =A0 =A0 =A0zabbix-agentd.initd > =A0 =A0 =A0 =A0zabbix-proxy.initd > =A0 =A0 =A0 =A0" > > _builddir=3D"$srcdir"/$pkgname-$pkgver > > prepare() { > =A0 =A0 =A0 =A0cd "$_builddir" > =A0 =A0 =A0 =A0for i in $source; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case $i in > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*.patch) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0msg "Applying $i" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0patch -p1 -i "$srcdir"/$i = || return 1 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0;; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0esac > =A0 =A0 =A0 =A0done > } > > build() { > =A0 =A0 =A0 =A0# set default configure flags > =A0 =A0 =A0 =A0_configure=3D"--prefix=3D/usr \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--sysconfdir=3D/etc \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--mandir=3D/usr/share/man = \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--infodir=3D/usr/share/inf= o \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--enable-server \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--enable-agent \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--enable-proxy \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--enable-ipv6 \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--with-net-snmp \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--with-libcurl > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0" > =A0 =A0 =A0 =A0# we run build for each db type > =A0 =A0 =A0 =A0# make sure prepare is same for each db > =A0 =A0 =A0 =A0for db in pgsql mysql sqlite3; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cd "$srcdir" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0msg "Building for $db" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cp -r "$pkgname-$pkgver" "$pkgname-$pkgver= -$db" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cd "$_builddir-$db" > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0./configure --with-$db \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0$_configure > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0make || return 1 > =A0 =A0 =A0 =A0done > } > > > package() { > =A0 =A0 =A0 =A0# doing manual install > =A0 =A0 =A0 =A0for i in agentd proxy server; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0install -D -m755 "$_builddir"/man/zabbix_$= i.man \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/usr/share/man/ma= n8/zabbix_$i.8 > =A0 =A0 =A0 =A0done > =A0 =A0 =A0 =A0for i in get sender; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0install -D -m755 "$_builddir"/man/zabbix_$= i.man \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/usr/share/man/ma= n1/zabbix_$i.1 > =A0 =A0 =A0 =A0done > =A0 =A0 =A0 =A0install -d -m0750 -o zabbix -g zabbix \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/var/run/zabbix "$pkgdir"/var/log= /zabbix > =A0 =A0 =A0 =A0install -D -m0644 "$srcdir"/zabbix_server.conf \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/etc/zabbix/zabbix_server.conf > =A0 =A0 =A0 =A0install -D -m0644 "$srcdir"/zabbix_trapper.conf \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/etc/zabbix/zabbix_trapper.conf > =A0 =A0 =A0 =A0for i in server proxy; do > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0install -D -m0755 "$srcdir"/zabbix-$i.init= d \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$pkgdir"/etc/init.d/zabbi= x-$i || return 1 > =A0 =A0 =A0 =A0done > } > > setup() { > =A0 =A0 =A0 =A0pkgdesc=3D"Zabbix images and sql files" > =A0 =A0 =A0 =A0depends=3D > =A0 =A0 =A0 =A0mkdir -p "$subpkgdir"/usr/share/zabbix/create > =A0 =A0 =A0 =A0mv "$srcdir"/$pkgname-$pkgver/create/data \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/share/zabbix/create > =A0 =A0 =A0 =A0mv "$srcdir"/$pkgname-$pkgver/create/schema \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/share/zabbix/create > } > > _do_db() { > =A0 =A0 =A0 =A0pkgdesc=3D"Zabbix server with $1 database support" > =A0 =A0 =A0 =A0depends=3D$pkgname > =A0 =A0 =A0 =A0mkdir -p "$subpkgdir"/usr/sbin > =A0 =A0 =A0 =A0mv "$_builddir-$1"/src/zabbix_server/zabbix_server \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/sbin/ || return 1 > =A0 =A0 =A0 =A0mv "$_builddir-$1"/src/zabbix_proxy/zabbix_proxy \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/sbin/ || return 1 > =A0 =A0 =A0 =A0return 0 > } > > pgsql() =A0 =A0 =A0 =A0 { _do_db pgsql; } > mysql() =A0 =A0 =A0 =A0 { _do_db mysql; } > sqlite() =A0 =A0 =A0 =A0{ _do_db sqlite3; } > > utils() { > =A0 =A0 =A0 =A0pkgdesc=3D"Zabbix client utilities" > =A0 =A0 =A0 =A0depends=3D > =A0 =A0 =A0 =A0mkdir -p "$subpkgdir"/usr/bin > =A0 =A0 =A0 =A0mv "$_builddir-pgsql"/src/zabbix_get/zabbix_get \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/bin > =A0 =A0 =A0 =A0mv "$_builddir-pgsql"/src/zabbix_sender/zabbix_sender \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/bin } > > webif() { > =A0 =A0 =A0 =A0pkgdesc=3D"Zabbix web-interface" > =A0 =A0 =A0 =A0depends=3D"php php-pgsql php-gd php-curl php-bcmath php-so= ckets > php-iconv" > =A0 =A0 =A0 =A0_wwwdir=3D"$subpkgdir"/usr/share/webapps/zabbix > =A0 =A0 =A0 =A0mkdir -p $_wwwdir > =A0 =A0 =A0 =A0mv "$_builddir"/frontends/php/* "$_wwwdir" > } > > agent() { > =A0 =A0 =A0 =A0pkgdesc=3D"Zabbix Network Monitoring Agent" > =A0 =A0 =A0 =A0depends=3D > =A0 =A0 =A0 =A0install=3D"$subpkgname.pre-install" > =A0 =A0 =A0 =A0install -d -m0750 -o zabbix -g zabbix \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/var/run/zabbix "$subpkgdir"/v= ar/log/zabbix > =A0 =A0 =A0 =A0install -D -m0644 "$srcdir"/zabbix_agentd.conf \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/etc/zabbix/zabbix_agentd.conf > =A0 =A0 =A0 =A0install -D -m0755 "$srcdir"/zabbix-agentd.initd \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/etc/init.d/zabbix-agentd > =A0 =A0 =A0 =A0mkdir -p "$subpkgdir"/usr/sbin > =A0 =A0 =A0 =A0mv "$_builddir-pgsql"/src/zabbix_agent/zabbix_agent \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/sbin/ > =A0 =A0 =A0 =A0mv "$_builddir-pgsql"/src/zabbix_agent/zabbix_agentd \ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"$subpkgdir"/usr/sbin/ > > } > > md5sums=3D"969ce09317c98b205bc96157e16f5c8c =A0zabbix-1.8.4.tar.gz > 26b0401a83bdb1dce29338e5b2786620 =A0zabbix_server.conf > 9832a81e134c8e2c11e2a06b7adbf88f =A0zabbix_trapper.conf > 0310b92afb3f35c1075fff53db737212 =A0zabbix_proxy.conf > 721c18077fa739f956340afca9f067f4 =A0zabbix_agentd.conf > d13166483792401be2d25b37b0170b82 =A0zabbix-dn_skipname.patch > 8d1d2e53479173aac0df0c38a4d6afda =A0zabbix-getloadavg.patch > e42394e798ab98a8ff4babe68e04633a =A0zabbix-server.initd > 88374bba8a8fdfabfcfe9be6dd12095f =A0zabbix-agentd.initd > 32abde1cc00c2eeccddb7e038117d0ab =A0zabbix-proxy.initd" > > > --- > Unsubscribe: =A0alpine-devel+unsubscribe@lists.alpinelinux.org > Help: =A0 =A0 =A0 =A0 alpine-devel+help@lists.alpinelinux.org > --- > > --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---