Fix this port:

* depend on ruby18 and do not let the ruby module handles FLAVORs
* enable regression tests
* fix path to the default hiera database; and create its directory
* install the yaml configuration file for the cli under SYSCONFDIR
* configure hiera.yaml the same way it is done in the hiera tarball
distributed by puppetlabs
* tweak DESCR
* take MAINTAINER

Hiera now works out of the box with Puppet.

ok jasper@
This commit is contained in:
ajacoutot 2013-03-02 13:59:20 +00:00
parent cd449ffa52
commit a2bc03e7ea
4 changed files with 43 additions and 25 deletions

View File

@ -1,13 +1,17 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/02/03 16:44:03 jasper Exp $
# $OpenBSD: Makefile,v 1.2 2013/03/02 13:59:20 ajacoutot Exp $
COMMENT= simple pluggable hierarchical database
DISTNAME= hiera-1.1.2
V= 1.1.2
DISTNAME= hiera-${V}
PKGNAME= ruby-hiera-${V}
REVISION= 0
CATEGORIES= databases
HOMEPAGE= https://github.com/puppetlabs/hiera
HOMEPAGE= http://projects.puppetlabs.com/projects/hiera
MODULES= lang/ruby
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# Apachev2
PERMIT_PACKAGE_CDROM= Yes
@ -15,15 +19,28 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MODULES= lang/ruby
MODRUBY_HANDLE_FLAVORS= No
CONFIGURE_STYLE= ruby gem
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= devel/ruby-json_pure,${MODRUBY_FLAVOR}
EXAMPLE_DIR= ${PREFIX}/share/examples/ruby-${GEM_MAN_SUFFIX}-hiera/
REGRESS_DEPENDS= devel/ruby-mocha,${MODRUBY_FLAVOR}
MODRUBY_REGRESS= rspec2
pre-configure:
perl -pi -e 's,/var/lib,/var/db,g' \
${WRKSRC}/lib/hiera/backend.rb \
${WRKSRC}/lib/hiera/util.rb \
${WRKSRC}/spec/unit/util_spec.rb \
${WRKSRC}/README.md
post-install:
${INSTALL_DATA_DIR} ${EXAMPLE_DIR}
${INSTALL_DATA} ${FILESDIR}/hiera.yaml ${EXAMPLE_DIR}
${INSTALL_DATA_DIR} ${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-hiera
${INSTALL_DATA} ${FILESDIR}/hiera.yaml \
${PREFIX}/${MODRUBY_RELEXAMPLEDIR}-hiera
.include <bsd.port.mk>

View File

@ -1,17 +1,17 @@
# $OpenBSD: hiera.yaml,v 1.1.1.1 2013/02/03 16:44:03 jasper Exp $
# $OpenBSD: hiera.yaml,v 1.2 2013/03/02 13:59:20 ajacoutot Exp $
---
:backends:
- yaml
:logger: console
:hierarchy:
- "%{location}"
- common
- defaults
- %{clientcert}
- %{environment}
- global
:yaml:
:datadir: /etc/puppet/hieradata
:puppet:
:datasource: data
# datadir is empty here, so hiera uses its defaults:
# - /var/db/hiera on *nix
# - %CommonAppData%\PuppetLabs\hiera\var on Windows
# When specifying a datadir, make sure the directory exists.
:datadir:

View File

@ -1,4 +1,2 @@
Hiera is a simple pluggable Hierarchical Database. It can be used to
store various information and therefor is a good fit for the
representation of infrastructure information. It can be used to querying
multiple data backends e.g. YAML or Puppet.
Hiera is a pluggable (YAML, JSON, Puppet) hierarchical database for
storing infrastructure representation data.

View File

@ -1,5 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/02/03 16:44:03 jasper Exp $
${GEM_BIN}/hiera${GEM_BIN_SUFFIX}
@comment $OpenBSD: PLIST,v 1.2 2013/03/02 13:59:20 ajacoutot Exp $
@extraunexec rm -rf /var/db/hiera/*
${GEM_BIN}/hiera
${GEM_LIB}/cache/${DISTNAME}.gem
${GEM_LIB}/gems/${DISTNAME}/
${GEM_LIB}/gems/${DISTNAME}/COPYING
@ -31,5 +32,7 @@ ${GEM_LIB}/gems/${DISTNAME}/spec/unit/console_logger_spec.rb
${GEM_LIB}/gems/${DISTNAME}/spec/unit/hiera_spec.rb
${GEM_LIB}/gems/${DISTNAME}/spec/unit/util_spec.rb
${GEM_LIB}/specifications/${DISTNAME}.gemspec
share/examples/ruby-${GEM_MAN_SUFFIX}-hiera/
share/examples/ruby-${GEM_MAN_SUFFIX}-hiera/hiera.yaml
${MODRUBY_RELEXAMPLEDIR}-hiera/
${MODRUBY_RELEXAMPLEDIR}-hiera/hiera.yaml
@sample ${SYSCONFDIR}/hiera.yaml
@sample /var/db/hiera