Skip to content

Commit

Permalink
app-admin/puppetdb: bup
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.26
  • Loading branch information
prometheanfire committed Jan 12, 2016
1 parent 4987bbe commit c35169d
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-admin/puppetdb/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST puppetdb-3.2.2.tar.gz 25273184 SHA256 c6ed59055ef54a3af0fc571fae54f23a99e4f4781783c0a9be4ef0df1012b2dd SHA512 5fdd22c3a14e447a997bf223e7147be22c51e8dd44d636ab51bf35c44c813ac2898fbfe72efba3896189244d56abd9cbac3782c7c8ab2f1648b6b1f01b53de45 WHIRLPOOL e138e39a277fad9a0dc56a2c573515ca257b272356381ed5e4d031743e014c3605c9754bf07307389192bee8ed057d02697096102300c15c5ed83990171c61e0
DIST puppetdb-3.2.3.tar.gz 25469315 SHA256 3b9d121e54da1511834d708437c9c9ca15db2818314f442511bbb2e576a7afaa SHA512 d15a497bce10e1af989e1deaba99794929916362e13393814d2c5545f80ee4fb0976758c3bd0ae41466bd0364ba5df417fa69afde8bf24e6573119cdbe814aa9 WHIRLPOOL 031c14df0df52320926030e32290fb8ab5115e800711d90b2c5acdc712fa7bbcefbc83afc380bbeff4f1b30654d724a8db01c9b5ace3f6bc0deeeb31127e4443
91 changes: 91 additions & 0 deletions app-admin/puppetdb/puppetdb-3.2.3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit multilib systemd user

DESCRIPTION="PuppetDB collects data generated by Puppet."
HOMEPAGE="http://docs.puppetlabs.com/puppetdb/"
SRC_URI="https://downloads.puppetlabs.com/${PN}/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
# will need the same keywords as puppet
KEYWORDS="~amd64 ~x86"

RDEPEND+=">=virtual/jdk-1.7.0"
DEPEND+=""

pkg_setup() {
enewgroup puppetdb
enewuser puppetdb -1 -1 /opt/puppetlabs/server/data/puppetdb "puppetdb"
}

src_prepare() {
sed -i 's/sysconfig/conf\.d/g' ext/redhat/puppetdb.service || die
sed -i 's/sysconfig/conf\.d/g' ext/bin/puppetdb || die
sed -i 's/sysconfig/conf\.d/g' install.sh || die
sed -i 's/var\/run/run/g' ext/puppetdb.tmpfiles.conf || die
sed -i 's/var\/run/run/g' install.sh || die
}

src_compile() {
einfo "not compiling"
}

src_install() {
dodir /opt/puppetlabs/server/data/puppetdb
insinto /opt/puppetlabs/server/apps/puppetdb
insopts -m0744
doins ext/ezbake-functions.sh
insopts -m0644
doins ext/ezbake.manifest
doins puppetdb.jar
insinto /etc/puppetlabs/puppetdb
doins ext/config/logback.xml
doins ext/config/bootstrap.cfg
doins ext/config/request-logging.xml
insinto /etc/puppetlabs/puppetdb/conf.d
doins ext/config/conf.d/jetty.ini
doins ext/config/conf.d/repl.ini
doins ext/config/conf.d/database.ini
doins ext/config/conf.d/config.ini
insopts -m0755
insinto /opt/puppetlabs/server/apps/puppetdb/scripts
doins install.sh
insinto /opt/puppetlabs/server/apps/puppetdb/cli/apps
doins ext/cli/foreground
doins ext/cli/ssl-setup
doins ext/cli/export
doins ext/cli/config-migration
doins ext/cli/foreground
doins ext/cli/anonymize
doins ext/cli/import
insinto /opt/puppetlabs/server/apps/puppetdb/bin
doins ext/bin/puppetdb
insopts -m0644
dodir /opt/puppetlabs/server/bin
dosym ../apps/puppetdb/bin/puppetdb /opt/puppetlabs/server/bin/puppetdb
dodir /opt/puppetlabs/bin
dosym ../server/apps/puppetdb/bin/puppetdb /opt/puppetlabs/bin/puppetdb
dosym /opt/puppetlabs/server/apps/puppetdb/bin/puppetdb /usr/bin/puppetdb
# init type tasks
newconfd ext/default puppetdb
systemd_dounit ext/redhat/puppetdb.service
systemd_newtmpfilesd ext/puppetdb.tmpfiles.conf puppetdb.conf
newinitd "${FILESDIR}/puppetdb.initd" puppetdb
# misc
insinto /etc/logrotate.d
newins ext/puppetdb.logrotate.conf puppetdb
fowners -R puppetdb:puppetdb /opt/puppetlabs/server/data/puppetdb
fperms -R 770 /opt/puppetlabs/server/data/puppetdb
}

pkg_postinst() {
elog "to install please run '/opt/puppetlabs/server/bin/puppetdb ssl-setup'"
elog
elog "to upgrade please run '/opt/puppetlabs/server/bin/puppetdb config-migration'"
}

0 comments on commit c35169d

Please sign in to comment.