zabbix-server: add new optional build options

This commit is contained in:
Longrin Wischnewski 2014-11-03 16:51:09 +01:00
parent ce8e1a278b
commit 7fb934c4d0
1 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,10 @@
{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib, gettext { stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib, gettext
, enableJabber ? false, minmay ? null }: , net_snmp , libssh2, openldap
, enableJabber ? false, minmay ? null
, enableSnmp ? false
, enableSsh ? false
, enableLdap ? false
}:
assert enableJabber -> minmay != null; assert enableJabber -> minmay != null;
@ -38,7 +43,11 @@ in
"--with-postgresql" "--with-postgresql"
"--with-libcurl" "--with-libcurl"
"--with-gettext" "--with-gettext"
] ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}"; ]
++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}"
++ stdenv.lib.optional enableSnmp "--with-net-snmp"
++ stdenv.lib.optional enableSsh "--with-ssh2=${libssh2}"
++ stdenv.lib.optional enableLdap "--with-ldap=${openldap}";
postPatch = '' postPatch = ''
sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c
@ -48,7 +57,10 @@ in
-e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c -e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c
''; '';
buildInputs = [ pkgconfig postgresql curl openssl zlib ]; buildInputs = [ pkgconfig postgresql curl openssl zlib ]
++ stdenv.lib.optional enableSnmp net_snmp
++ stdenv.lib.optional enableSsh libssh2
++ stdenv.lib.optional enableLdap openldap;
postInstall = postInstall =
'' ''