Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2012 11:53:04 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        FreeBSD Ports List <freebsd-ports@freebsd.org>
Subject:   Building a ruby-based port
Message-ID:  <D7A812C8EFEBF0D07676038F@localhost>

next in thread | raw e-mail | index | archive | help
I'm working on a new port (snorby), and it requires ruby.  I've never built 
a ruby-based port before and confess total ignorance of how ruby works and 
how freebsd ports can use ruby to install software.

I've looked at the Porter's Handbook, but it's very little help.  I've 
pored over /usr/ports/Mk/bsd.ruby.mk and think I have a decent grasp of it. 
I've been using www/tdiary as a template to help me understand how ruby 
ports work.  But am at a point where I have no clue what to do next.

This software says to build it like this (<https://snorby.org/>):
cd snorby && bundle install
This assumes ruby and ruby gems is installed properly. If bundler is not 
found `gem install bundler`

Huh?  All the prerequisites built fine.  I'm at the point where I need to 
type make install clean, but what the heck do I do to install it?

Here's the (admittedly incomplete) Makefile:
# $FreeBSD$

PORTNAME=	snorby
PORTVERSION=	2.5.3
CATEGORIES=	security www

MAINTAINER=	pauls@utdallas.edu
COMMENT=	Frontend for snort

LICENSE=	GPLv3

USE_GITHUB=	yes
GH_ACCOUNT=	Snorby
GH_PROJECT=	${PORTNAME}
GH_TAGNAME=	master
GH_COMMIT=	8b97843

OPTIONS_DEFINE=	IMAGEMAGICK SNORT SURICATA
IMAGEMAGICK_DESC=	Install Imagemagick with X11 support
SNORT_DESC=	Depend on Snort
SURICATA_DESC=	Depend on Suricata

RUN_DEPENDS=	wkhtmltopdf:${PORTSDIR}/converters/wkhtmltopdf \
		rubygem-rails>=3:${PORTSDIR}/www/rubygem-rails

NO_BUILD=	yes
USE_RUBY=	yes
RUBY_REQUIRE=	Ruby >= 192
USE_RUBY_GEMS=	yes
RUBYGEM_AUTOPLIST=	yes

RUBY_SHEBANG_FILES=	script/delayed_job \
			script/rails

MD=	ChangeLog.md README.md
PORTDOCS=	${MD}

SUB_FILES=	pkg-message

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MIMAGEMAGICK}
RUN_DEPENDS+=	convert:${PORTSDIR}/graphics/ImageMagick
.else
RUN_DEPENDS+=	convert:${PORTSDIR}/graphics/ImageMagick-nox11
.endif

.if ${PORT_OPTIONS:MSNORT}
RUN_DEPENDS+=	snort:${PORTSDIR}/security/snort
.endif

.if ${PORT_OPTIONS:MSURICATA}
RUN_DEPENDS+=	suricata:${PORTSDIR}/security/suricata
.endif

#	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>


-- 
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D7A812C8EFEBF0D07676038F>