blob: ee762e8ce2a26c08eb6839ceffbd184ae1d2c93a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
PORTNAME= foreman-proxy
PORTVERSION= 1.10.0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://downloads.theforeman.org/foreman-proxy/
MAINTAINER= ruby@FreeBSD.org
COMMENT= Foreman Proxy Agent
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= rubygem-bundler_ext>=0.4:sysutils/rubygem-bundler_ext \
rubygem-json>=1.8.1:devel/rubygem-json \
rubygem-rack16>=1.4:www/rubygem-rack16 \
rubygem-sinatra>=1.4.3:www/rubygem-sinatra \
wget:ftp/wget
OPTIONS_DEFINE= BMC
OPTIONS_RADIO= PUPPET
OPTIONS_RADIO_PUPPET= PUPPET3 PUPPET4
BMC_DESC= Depend on rubyipmi for BMC support
PUPPET3_DESC= Depend on Puppet 3.8
PUPPET4_DESC= Depend on Puppet 4
USES= tar:bzip2
USE_RUBY= yes
USE_RC_SUBR= foreman-proxy
NO_BUILD= yes
NO_ARCH= yes
FOREMAN_PROXY_USER?= foreman_proxy
FOREMAN_PROXY_GROUP?= foreman_proxy
FOREMAN_PROXY_LOGDIR?= /var/log/foreman-proxy
FOREMAN_PROXY_RUNDIR?= /var/run/foreman-proxy
USERS= ${FOREMAN_PROXY_USER}
GROUPS= ${FOREMAN_PROXY_GROUP}
SUB_LIST= RUBY="${RUBY}" \
FOREMAN_PROXY_USER="${FOREMAN_PROXY_USER}" \
FOREMAN_PROXY_GROUP="${FOREMAN_PROXY_GROUP}" \
FOREMAN_PROXY_RUNDIR="${FOREMAN_PROXY_RUNDIR}" \
FOREMAN_PROXY_LOGDIR="${FOREMAN_PROXY_LOGDIR}"
PLIST_SUB= ${SUB_LIST} MKDIR="${MKDIR}"
BMC_RUN_DEPENDS= rubygem-rubyipmi>=0.10.0:sysutils/rubygem-rubyipmi
PUPPET3_RUN_DEPENDS= puppet:sysutils/puppet38 \
rubygem-ruby-augeas>=0.5:textproc/rubygem-ruby-augeas
PUPPET4_RUN_DEPENDS= puppet:sysutils/puppet4 \
rubygem-ruby-augeas>=0.5:textproc/rubygem-ruby-augeas
post-patch:
@${REINPLACE_CMD} \
-e "s|/usr/bin/env ruby|${RUBY}|g" \
-e "s|/usr/bin/ruby|${RUBY}|g" \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%DATADIR%%|${DATADIR}|g" \
${WRKSRC}/bin/smart-proxy \
${WRKSRC}/extra/migrate_settings.rb \
${WRKSRC}/extra/query.rb
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
${WRKSRC}/config/settings.d/*.yml.example \
${WRKSRC}/lib/proxy/http_download.rb
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.d
${MKDIR} ${STAGEDIR}${DATADIR}/extra
${LN} -s ${PREFIX}/etc/foreman-proxy ${STAGEDIR}${DATADIR}/config
${INSTALL_SCRIPT} ${WRKSRC}/bin/smart-proxy \
${STAGEDIR}${PREFIX}/sbin/smart-proxy
.for file in CHANGELOG Contributors Gemfile LICENSE README.md \
VERSION bundler.d config.ru lib modules public views
${CP} -r ${WRKSRC}/${file} ${STAGEDIR}${DATADIR}
.endfor
${LN} -s Gemfile ${STAGEDIR}${DATADIR}/Gemfile.in
.for script in migrate_settings.rb query.rb
${INSTALL_SCRIPT} ${WRKSRC}/extra/${script} \
${STAGEDIR}${DATADIR}/extra/${script}
.endfor
${CP} -r ${WRKSRC}/extra/migrations ${STAGEDIR}${DATADIR}/extra
${INSTALL_DATA} ${WRKSRC}/config/settings.yml.example \
${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.yml.sample
.for cfg in bmc dhcp dns dns_dnscmd dns_nsupdate_gss dns_nsupdate dns_virsh \
facts puppet puppetca realm templates tftp
${INSTALL_DATA} ${WRKSRC}/config/settings.d/${cfg}.yml.example \
${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.d/${cfg}.yml.sample
.endfor
${MKDIR} -m 0700 ${STAGEDIR}${FOREMAN_PROXY_LOGDIR} \
${STAGEDIR}${FOREMAN_PROXY_RUNDIR}
.include <bsd.port.mk>
|