sysutils/rubygem-smart_proxy_salt: fix various bugs to make port functional

PR:		194014
Submitted by:	Michael Moll <kvedulv@kvedulv.de>
This commit is contained in:
Steve Wills 2014-09-29 21:12:11 +00:00
parent 37b5ed38b0
commit 2bdfe66b98
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=369556
4 changed files with 34 additions and 1 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= smart_proxy_salt
PORTVERSION= 0.0.2
PORTREVISION= 1
CATEGORIES= sysutils ruby
MASTER_SITES= RG
@ -12,14 +13,22 @@ COMMENT= SaltStack Plug-In for Foreman's Smart Proxy
LICENSE= GPLv3
RUN_DEPENDS= foreman-proxy>=1.6.0:${PORTSDIR}/net/foreman-proxy \
${PYTHON_PKGNAMEPREFIX}salt:${PORTSDIR}/sysutils/py-salt
${PYTHON_PKGNAMEPREFIX}salt>0:${PORTSDIR}/sysutils/py-salt
USE_PYTHON= yes
USE_RUBY= yes
USE_RUBYGEMS= yes
RUBYGEM_AUTOPLIST= yes
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} \
-e "s|/usr/bin/env ruby|${RUBY}|g" \
-e "s|/usr/bin/env python|${PYTHON_CMD}|g" \
-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
${WRKSRC}/bin/foreman-node
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/foreman-proxy
${MKDIR} ${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.d
@ -27,5 +36,7 @@ post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/share/foreman-proxy
${MKDIR} ${STAGEDIR}${PREFIX}/share/foreman-proxy/bundler.d
${INSTALL_DATA} ${FILESDIR}/salt.rb ${STAGEDIR}${PREFIX}/share/foreman-proxy/bundler.d/salt.rb
${MKDIR} ${STAGEDIR}${PREFIX}/etc/salt
${INSTALL_DATA} ${FILESDIR}/foreman.yaml.sample ${STAGEDIR}${PREFIX}/etc/salt/foreman.yaml.sample
.include <bsd.port.post.mk>

View file

@ -0,0 +1,10 @@
---
:proto: http
:host: foreman.example.com
:port: 3000
:ssl_ca: ""
:ssl_cert: ""
:ssl_key: ""
:timeout: 10
:salt: /usr/local/bin/salt
:upload_grains: true

View file

@ -0,0 +1,11 @@
--- bin/foreman-node.orig 2014-09-27 23:35:54.000000000 +0200
+++ bin/foreman-node 2014-09-27 23:39:19.000000000 +0200
@@ -5,7 +5,7 @@
require 'yaml'
-$settings_file = "/etc/salt/foreman.yaml"
+$settings_file = "%%LOCALBASE%%/etc/salt/foreman.yaml"
SETTINGS = YAML.load_file($settings_file)
require 'net/http'

View file

@ -1,3 +1,4 @@
bin/foreman-node
share/foreman-proxy/bundler.d/salt.rb
@sample etc/foreman-proxy/settings.d/salt.yml.sample
@sample etc/salt/foreman.yaml.sample