blob: 081a1dc009f1e8031125e3a28d3235fc9bef645c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Distributed under the terms of the GNU General Public License v2
EAPI="1"
inherit eutils autotools subversion
DESCRIPTION="NetXMS is new and rapidly developing monitoring system"
HOMEPAGE="http://netxms.org/"
SRC_URI=""
RESTRICT="mirror"
IUSE="server client console +agent nxhttpd mdebug sqlite odbc oracle mysql pgsql openssl gd unstable debug"
SLOT="live"
LICENSE="GPL-2"
KEYWORDS=""
ESVN_REPO_URI="https://svn.netxms.org/public/netxms/trunk"
ESVN_STORE_DIR="${DISTDIR}/svn-src"
ESVN_PROJECT="${PN/-svn}"
ESVN_BOOTSTRAP="./reconf"
RDEPEND="${DEPEND}
"
DEPEND="${COMMON_DEPEND}
sys-devel/autoconf:2.5
sys-devel/automake:1.10
mysql? ( virtual/mysql )
openssl? ( dev-libs/openssl )
postgres? ( virtual/postgresql-base )
console? ( x11-libs/wxGTK )
gd? ( media-libs/gd )
sqlite? ( >=dev-db/sqlite-3 )
"
S="${WORKDIR}/${P/_/}"
src_unpack(){
subversion_src_unpack
cd "${S}"
# eautoreconf
}
src_compile() {
econf \
$(useq server && echo --with-server ) \
$(useq client && echo --with-client ) \
$(useq agent && echo --with-agent ) \
$(useq console && echo --with-console ) \
$(useq nxhttpd && echo --with-nxhttpd ) \
$(useq mdebug && echo --with-mdebug ) \
$(useq sqlite && echo --with-sqlite ) \
$(useq odbc && echo --with-odbc ) \
$(useq oracle && echo --with-oracle ) \
$(useq mysql && echo --with-mysql ) \
$(useq pgsql && echo --with-pgsql ) \
$(use_enable openssl encryption) \
$(useq gd && echo --with-gd ) \
$(useq unstable && echo --enable-unstable ) \
$(useq debug && echo --enable-debug ) || die "econf failed"
emake CONFDIR="/etc/netxms" || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" CONFDIR="${D}/etc/netxms" install || die "install failed"
}
pkg_postinst() {
dodir /etc/netxms
keepdir /etc/netxms
if ( use server )
then
if ( test -e /etc/netxms/netxmsd.conf )
then
elog "Keeping your existing config /etc/netxms/netxmsd.conf"
else
elog "Installing initial server config file to /etc/netxms/netxmsd.conf"
cp ${FILESDIR}/netxmsd.conf /etc/netxms/netxmsd.conf
fi
fi
if ( use agent )
then
if ( test -e /etc/netxms/nxagentd.conf )
then
elog "Keeping your existing config /etc/netxms/nxagentd.conf"
else
elog "Installing initial server config file to /etc/netxms/nxagentd.conf"
cp ${FILESDIR}/nxagentd.conf /etc/netxms/nxagentd.conf
fi
fi
$(useq server && cp ${FILESDIR}/netxmsd /etc/init.d/netxmsd )
$(useq agent && cp ${FILESDIR}/nxagentd /etc/init.d/nxagentd )
elog
elog "Startup scripts installed to /etc/init.d"
elog
}
|