From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6DB2813888F for ; Sat, 3 Jan 2015 00:36:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BBA92E0653; Sat, 3 Jan 2015 00:36:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5242AE0653 for ; Sat, 3 Jan 2015 00:36:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2092D340663 for ; Sat, 3 Jan 2015 00:36:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BCA85EBEE for ; Sat, 3 Jan 2015 00:36:29 +0000 (UTC) From: "Jorge Manuel B. S. Vicetto" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jorge Manuel B. S. Vicetto" Message-ID: <1420242090.2e6fd3e61fd6ca202db840355e2869aec03d9796.jmbsvicetto@gentoo> Subject: [gentoo-commits] dev/jmbsvicetto:master commit in: net-analyzer/ocsng/ X-VCS-Repository: dev/jmbsvicetto X-VCS-Files: net-analyzer/ocsng/Manifest net-analyzer/ocsng/ocsng-2.2_beta1.ebuild X-VCS-Directories: net-analyzer/ocsng/ X-VCS-Committer: jmbsvicetto X-VCS-Committer-Name: Jorge Manuel B. S. Vicetto X-VCS-Revision: 2e6fd3e61fd6ca202db840355e2869aec03d9796 X-VCS-Branch: master Date: Sat, 3 Jan 2015 00:36:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bf5036ce-59d0-4894-be5f-6424f1f9bea6 X-Archives-Hash: e7ffb8787de2412349c30a798ab74b40 commit: 2e6fd3e61fd6ca202db840355e2869aec03d9796 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo org> AuthorDate: Fri Jan 2 23:41:30 2015 +0000 Commit: Jorge Manuel B. S. Vicetto gentoo org> CommitDate: Fri Jan 2 23:41:30 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=dev/jmbsvicetto.git;a=commit;h=2e6fd3e6 Bump to the 2.2_beta1 release. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo.org> --- net-analyzer/ocsng/Manifest | 2 + net-analyzer/ocsng/ocsng-2.2_beta1.ebuild | 182 ++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+) diff --git a/net-analyzer/ocsng/Manifest b/net-analyzer/ocsng/Manifest index 7b5ed18..f77444f 100644 --- a/net-analyzer/ocsng/Manifest +++ b/net-analyzer/ocsng/Manifest @@ -8,3 +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.2beta1.tar.gz 3259493 SHA256 ff81e135c07d89d9608f4549d3dfe57e677d0da9a510f8e2b5d14f5c82c33f20 SHA512 34a1d9b52d6403bc4946f4909ef9829acbc24c546623b2460b25017c575de0773dd0a3a8e64b801c0ee542b2754795544a0a741e92a110dd33bb3f9b7eb77356 WHIRLPOOL 3d5ec5d4380399dc3522ee3b70f273824fb161c43b736cb15d947b6f05d128aeeddd38b1a8077316e0cd5b1b7db1388a0132462a66876dae4f9d7bb07f5b8327 + diff --git a/net-analyzer/ocsng/ocsng-2.2_beta1.ebuild b/net-analyzer/ocsng/ocsng-2.2_beta1.ebuild new file mode 100644 index 0000000..ac65d28 --- /dev/null +++ b/net-analyzer/ocsng/ocsng-2.2_beta1.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +inherit depend.php eutils versionator + +MY_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" +MY_PV="${PV//[_]/}" +MY_P="OCSNG_UNIX_SERVER-${MY_PV}" +MY_LPN="ocsinventory-server" + +DESCRIPTION="OCS Inventory NG Management Server" +HOMEPAGE="http://ocsinventory.sourceforge.net/" +SRC_URI="http://launchpad.net/${MY_LPN}/stable-${MY_PV_MAJOR}/${MY_PV}/+download/${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_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." +}