From: "Jorge Manuel B. S. Vicetto" <jmbsvicetto@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/jmbsvicetto:master commit in: net-analyzer/ocsng/
Date: Wed, 7 Oct 2015 22:26:03 +0000 (UTC) [thread overview]
Message-ID: <1444256743.2c1aeee22ce2be88a3da114329a894cdac5f5982.jmbsvicetto@gentoo> (raw)
commit: 2c1aeee22ce2be88a3da114329a894cdac5f5982
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 7 22:25:43 2015 +0000
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Wed Oct 7 22:25:43 2015 +0000
URL: https://gitweb.gentoo.org/dev/jmbsvicetto.git/commit/?id=2c1aeee2
Add initial ebuild for the 2.2_rc1 release.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>
net-analyzer/ocsng/Manifest | 2 +-
net-analyzer/ocsng/ocsng-2.2_rc1.ebuild | 191 ++++++++++++++++++++++++++++++++
2 files changed, 192 insertions(+), 1 deletion(-)
diff --git a/net-analyzer/ocsng/Manifest b/net-analyzer/ocsng/Manifest
index f77444f..8f061eb 100644
--- a/net-analyzer/ocsng/Manifest
+++ b/net-analyzer/ocsng/Manifest
@@ -8,5 +8,5 @@ DIST OCSNG_UNIX_SERVER-2.0.5.tar.gz 1966036 SHA256 3e5c7ce7ee6320d143e0dafa30909
DIST OCSNG_UNIX_SERVER-2.0.tar.gz 6348697 SHA256 f9d2912f6e6af6b6c5bee44cab057300d11ca0907a467e8dd2da301bfd6619d9 SHA512 00b0617a37487cdd37b91679cb32d61a1262cbb0f1daf0849d98d046157d4c316ba3183af1c768a55b4529109ea46eb8cddf05c308bba94067bb3f65828f04d7 WHIRLPOOL 17414aba00083745ea68a564365c6857ab3639be3cecee5691ead8ea3a417ab8e181ad3c12a7cbbce3e0b6294e7e34ded7395ec11ae5a5b844f97f3b4cad6858
DIST OCSNG_UNIX_SERVER-2.1.2.tar.gz 2890912 SHA256 714db972a775a427b24a2ea03b3f5cca672646a3c445118d7645222a0ab8614e SHA512 cdd0cecb67b8fc36430dfbe77e135e3875dd2d15f5a24a51d68bc4a4e0493f3635894013d10dbb0c750799fb747aa664604e59e0ea796a3df8220b0aa92f67eb WHIRLPOOL d7232cc67090caa98974ca7541e8b0234aa86707fa72e98cdcd872f44b27c428ddaeadac53241df5faac166176b0043b82601658fedee0f7659f5306ee4e3e87
DIST OCSNG_UNIX_SERVER-2.1rc1.tar.gz 2883610 SHA256 6c39f4870fa2a0b005880fb1ac69538b3545eb6a1a0b4a167e3db136a0a0d0bc SHA512 59a308dd5286c5eb35141efb36c9b5b13526c2d32b939c5ef2073dc3e18dcedea27143d6cd183954df50a85a61d6ad20dc813e4ce9b28c960f41fe7fb05feed7 WHIRLPOOL 8af2852f38dbbfb7e02fd6ce0d566f6d52cec080ff6071c5d6ece073941bcca23aa232492f88706e5b63f2fba4684c229ebe592974478b95a9ce9f8b31d38681
+DIST OCSNG_UNIX_SERVER-2.2RC1.tar.gz 3557086 SHA256 3b334f3eca20fe526bd6f5f51c0c7fbc7ee505365379b1259b3be14747c04b0a SHA512 5d088c3b81690cad349ac68ea3e547e3800ff39f566bbbc303e5e94bda09657a766a0bc2db6173de7a6bc699317f68e73c1ddf994211d86ac1bc027d607ebe8e WHIRLPOOL 04ba66d30947c28cb382b8175765e19822cf417bca72641c949e2cfddd9b85ab8ea2fb7eee61dad7705ef87755d374da95fc5f4a94f4855516e375f2611a1324
DIST OCSNG_UNIX_SERVER-2.2beta1.tar.gz 3259493 SHA256 ff81e135c07d89d9608f4549d3dfe57e677d0da9a510f8e2b5d14f5c82c33f20 SHA512 34a1d9b52d6403bc4946f4909ef9829acbc24c546623b2460b25017c575de0773dd0a3a8e64b801c0ee542b2754795544a0a741e92a110dd33bb3f9b7eb77356 WHIRLPOOL 3d5ec5d4380399dc3522ee3b70f273824fb161c43b736cb15d947b6f05d128aeeddd38b1a8077316e0cd5b1b7db1388a0132462a66876dae4f9d7bb07f5b8327
-
diff --git a/net-analyzer/ocsng/ocsng-2.2_rc1.ebuild b/net-analyzer/ocsng/ocsng-2.2_rc1.ebuild
new file mode 100644
index 0000000..1c696f4
--- /dev/null
+++ b/net-analyzer/ocsng/ocsng-2.2_rc1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: $
+
+EAPI=5
+
+inherit depend.php eutils versionator
+
+MY_PV_MAJOR="$(get_version_component_range 1-2 ${PV})"
+MY_PV="${PV//[_]/}"
+MY_PV="${MY_PV//rc/RC}"
+MY_P="OCSNG_UNIX_SERVER-${MY_PV}"
+MY_PN="OCSInventory-NG"
+MY_LPN="ocsinventory-server"
+
+DESCRIPTION="OCS Inventory NG Management Server"
+HOMEPAGE="http://www.ocsinventory-ng.org/"
+SRC_URI="https://github.com/${MY_PN}/Releases/raw/master/${MY_P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+KEYWORDS="~amd64"
+IUSE="+comm admin logrotate soap"
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND="
+ dev-lang/perl
+ comm? ( sys-devel/make )
+"
+RDEPEND="${DEPEND}
+ >=dev-perl/Apache-DBI-0.93
+ >=dev-perl/DBI-1.40
+ >=dev-perl/DBD-mysql-2.9004
+ >=dev-perl/Net-IP-1.21
+ >=dev-perl/XML-Simple-2.12
+ virtual/perl-Compress-Raw-Zlib
+ www-apache/mod_perl
+ >=www-servers/apache-1.3
+ admin? ( dev-lang/php[mysqli,xml] )
+ logrotate? ( app-admin/logrotate )
+ soap? (
+ dev-perl/SOAP-Lite
+ )
+"
+REQUIRED_USE="|| ( admin comm )"
+
+src_unpack() {
+
+ default
+
+ mv OCSNG_UNIX_SERVER-master "${MY_P}"
+}
+
+src_compile() {
+
+ if ( use comm ); then
+
+ pushd "Apache"
+ perl Makefile.PL || die "perl Makefile.PL failed"
+ emake || die "emake failed"
+ popd
+ fi
+}
+
+src_install() {
+
+ LOGDIR="/var/log/ocsng"
+
+ # Communication server
+ PLUGINS_CONFIG_DIR="/usr/share/ocsng/config"
+ PLUGINS_PERL_DIR="/usr/share/ocsng/plugins"
+
+ # Administration server
+ ADM_STATIC_DIR="/usr/share/ocsng/reports"
+ ADM_REPORTS_ALIAS="/ocsreports"
+ ADM_VAR_DIR="/var/lib/ocsng"
+ IPD_DIR="ipd"
+ IPD_ALIAS="/ipd"
+ PACKAGES_DIR="download"
+ PACKAGES_ALIAS="/download"
+ SNMP_DIR="snmp"
+ SNMP_ALIAS="/snmp"
+
+ if ( use comm ); then
+
+ pushd "Apache"
+ emake DESTDIR="${D}" install || die "Install failed"
+ popd
+
+ if use logrotate; then
+
+ insinto "/etc/logrotate.d"
+ doins "${FILESDIR}/ocsng"
+ fi
+
+ # Configure OCS (communication server)
+ # set mod_perl version > 1.999_21
+ sed -i -e "s/VERSION_MP/2/" etc/ocsinventory/ocsinventory-server.conf
+ sed -i -e "s:PATH_TO_LOG_DIRECTORY:${LOGDIR}:" etc/ocsinventory/ocsinventory-server.conf
+ sed -i -e "s:PATH_TO_PLUGINS_CONFIG_DIRECTORY:${PLUGINS_CONFIG_DIR}:" etc/ocsinventory/ocsinventory-server.conf
+ sed -i -e "s:PATH_TO_PLUGINS_PERL_DIRECTORY:${PLUGINS_PERL_DIR}:" etc/ocsinventory/ocsinventory-server.conf
+
+ dodoc "etc/ocsinventory/ocsinventory-server.conf"
+
+ # Create dirs
+ for dir in ${PLUGINS_CONFIG_DIR} ${PLUGINS_PERL_DIR} ; do
+ dodir "${dir}" || die "Unable to create ${dir}"
+ done
+
+ fi
+
+ if ( use admin ); then
+
+ # Create ocsreports dirs
+ elog "Creating ${D}/${ADM_STATIC_DIR} dir"
+ dodir "${ADM_STATIC_DIR}" || die "Unable to create ${ADM_STATIC_DIR}"
+
+ # copy ocsreports
+ insinto "${ADM_STATIC_DIR}"
+ doins -r ocsreports/*
+
+ # Create dirs (/var)
+ elog "Creating ${ADM_VAR_DIR}/{${IPD_DIR},${PACKAGES_DIR},${SNMP_DIR}} dirs"
+ for dir in ${IPD_DIR} ${PACKAGES_DIR} ${SNMP_DIR} ; do
+ dodir "${ADM_VAR_DIR}/${dir}" || die "Unable to create ${ADM_VAR_DIR}/${dir}"
+ done
+
+ # install ipdiscover-util.pl script
+ elog "Install ipdiscover-util.pl script"
+ insinto "${ADM_STATIC_DIR}"
+ doins binutils/ipdiscover-util.pl
+
+ # Configure OCS (Administration server)
+ sed -i -e "s:OCSREPORTS_ALIAS:${ADM_REPORTS_ALIAS}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:PATH_TO_OCSREPORTS_DIR:${ADM_STATIC_DIR}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:IPD_ALIAS:${IPD_ALIAS}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:PATH_TO_IPD_DIR:${IPD_DIR}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:PACKAGES_ALIAS:${PACKAGES_ALIAS}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:PATH_TO_PACKAGES_DIR:${PACKAGES_DIR}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:SNMP_ALIAS:${SNMP_ALIAS}:" etc/ocsinventory/ocsinventory-reports.conf
+ sed -i -e "s:PATH_TO_SNMP_DIR:${SNMP_DIR}:" etc/ocsinventory/ocsinventory-reports.conf
+
+ dodoc "etc/ocsinventory/ocsinventory-reports.conf"
+
+ fi
+
+ # create log dir
+ elog "Creating log dir"
+ dodir "${LOGDIR}"
+
+ dodoc "${FILESDIR}/postinstall-en.txt"
+}
+
+pkg_preinst () {
+
+ # Fix dir permissions
+ if ( use comm ); then
+ for dir in ${PLUGINS_CONFIG_DIR} ${PLUGINS_PERL_DIR} ; do
+ fowners -R root:apache "${dir}"
+ fperms g+w,o-rwx "${dir}"
+ done
+ fi
+
+ if ( use admin ); then
+
+ # Protect the db config file and ocsreports
+ fowners -R root:apache "${ADM_STATIC_DIR}"
+ fperms -R g-w,o-rwx "${ADM_STATIC_DIR}"
+
+ if [[ -f "${D}/${ADM_STATIC_DIR}/dbconfig.inc.php" ]] ; then
+ fperms g+w,o-rwx "${ADM_STATIC_DIR}/dbconfig.inc.php"
+ fi
+
+ for dir in ${IPD_DIR} ${PACKAGES_DIR} ${SNMP_DIR} ; do
+ fowners -R apache:apache "${ADM_VAR_DIR}/${dir}"
+ fperms g-w,o-rwx "${ADM_VAR_DIR}/${dir}"
+ done
+
+ fowners root:apache "${ADM_STATIC_DIR}/ipdiscover-util.pl"
+ fperms ug+x,o-rwx "${ADM_STATIC_DIR}/ipdiscover-util.pl"
+ fi
+
+ fowners root:apache "${LOGDIR}"
+ fperms ug+rwx,o-rwx "${LOGDIR}"
+}
+
+pkg_postinst () {
+
+ elog "If you want to run ocsng in this system make sure to install"
+ elog "at least mysql-4.1."
+}
next reply other threads:[~2015-10-07 22:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 22:26 Jorge Manuel B. S. Vicetto [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-03 0:36 [gentoo-commits] dev/jmbsvicetto:master commit in: net-analyzer/ocsng/ Jorge Manuel B. S. Vicetto
2014-11-10 21:05 Jorge Manuel B. S. Vicetto
2014-10-09 15:48 Jorge Manuel B. S. Vicetto
2013-07-03 18:31 Jorge Manuel B. S. Vicetto
2012-12-21 15:05 Jorge Manuel B. S. Vicetto
2012-03-11 2:35 Jorge Manuel B. S. Vicetto
2011-11-30 19:48 Jorge Manuel B. S. Vicetto
2011-11-28 13:43 Jorge Manuel B. S. Vicetto
2011-08-24 14:16 Jorge Manuel B. S. Vicetto
2011-04-18 2:26 Jorge Manuel B. S. Vicetto
2011-04-18 2:18 Jorge Manuel B. S. Vicetto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444256743.2c1aeee22ce2be88a3da114329a894cdac5f5982.jmbsvicetto@gentoo \
--to=jmbsvicetto@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox