mirror of
https://git.freebsd.org/ports.git
synced 2025-06-20 20:20:30 -04:00
To be utilized by sysutils/puppetserver, here we add a symlink to point at the gem directory. This allows puppetserver to use facter as a library without knowing the version installed. Approved by: swills(mentor), robak Differential Revision: D13803
46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
# Created by: Tomoyuki Sakurai <cherry@trombik.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= facter
|
|
PORTVERSION= 2.5.1
|
|
PORTREVISION= 2
|
|
CATEGORIES= sysutils rubygems
|
|
MASTER_SITES= RG \
|
|
http://downloads.puppetlabs.com/facter/
|
|
|
|
MAINTAINER= robak@FreeBSD.org
|
|
COMMENT= Cross-platform Ruby library for retrieving facts from OS
|
|
|
|
LICENSE= APACHE20
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
USE_RUBY= yes
|
|
USES= gem
|
|
|
|
PLIST_FILES= bin/facter ${GEMS_DIR}/facter
|
|
|
|
OPTIONS_DEFINE= EC2_FACTS ZFS_FACTS
|
|
EC2_FACTS_DESC= Generate AWS EC2 related facts
|
|
ZFS_FACTS_DESC= Generate ZFS related facts
|
|
|
|
OPTIONS_DEFAULT= EC2_FACTS ZFS_FACTS
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# Restrict dmidecode dependency to x86-based systems
|
|
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
|
|
RUN_DEPENDS+= dmidecode:sysutils/dmidecode
|
|
.endif
|
|
|
|
post-patch-EC2_FACTS-off:
|
|
@${REINPLACE_CMD} -e 's/\,\ \"lib\/facter\/ec2.rb\"//' ${WRKSRC}/${PORTNAME}.gemspec
|
|
@${REINPLACE_CMD} -e 's/\,\ \"lib\/facter\/ec2\/rest.rb\"//' ${WRKSRC}/${PORTNAME}.gemspec
|
|
|
|
post-patch-ZFS_FACTS-off:
|
|
@${REINPLACE_CMD} -e 's/\,\ \"lib\/facter\/zfs_version.rb\"//' ${WRKSRC}/${PORTNAME}.gemspec
|
|
@${REINPLACE_CMD} -e 's/\,\ \"lib\/facter\/zpool_version.rb\"//' ${WRKSRC}/${PORTNAME}.gemspec
|
|
|
|
post-install:
|
|
${RLN} ${STAGEDIR}/${PREFIX}/${GEMS_DIR}/facter-${PORTVERSION} ${STAGEDIR}/${PREFIX}/${GEMS_DIR}/facter
|
|
|
|
.include <bsd.port.post.mk>
|