Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2012 13:46:12 -0600
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        Steve Wills <swills@FreeBSD.org>
Cc:        FreeBSD Ports List <freebsd-ruby@FreeBSD.org>
Subject:   Re: My first ruby-based port
Message-ID:  <26C59D2E8B3CE746FFAA4B5A@utd71538.campus.ad.utdallas.edu>
In-Reply-To: <50A2EA57.9070700@FreeBSD.org>
References:  <05D08C9ADA8C05A8ADC45777@utd71538.campus.ad.utdallas.edu> <50A2EA57.9070700@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--On November 13, 2012 7:48:23 PM -0500 Steve Wills <swills@FreeBSD.org> 
wrote:

> On 11/12/12 10:32, Paul Schmehl wrote:
>> I'm working on porting snorby.
>
> Great, glad to hear that!
>
>> It's a ruby rails application.  I've got
>> quite a bit sorted out, but I've run into a problem that has me stumped.
>
> Someone else was working on this but ran into an issue that I can't
> recall. Something to do with image libraries I think.
>
>> I'm copying the distro to ${PREFIX}/www/snorby and then running bundle
>> install, which is based on the author's instructions on installing the
>> app.
>
> Calling bundle install is probably not the way to go, for a number of
> reasons. Take a look at how other rubygem- ports are built.
>

Here's the problem.  In the Gemfile the following files are fetched:
'http://github.com/Snorby/snorby_cas_authenticatable.git'
'http://github.com/mephux/ezprint.git', :branch => 'rails3', :require => 
'ezprint'
'http://github.com/Snorby/delayed_job_data_mapper.git'

The developer is mephux, so all three of these files are related to the app.

None of these files come in the tarball, so how do I fetch them in the 
Makefile?  And what do I do with them after I've fetched them?

Here's the current Makefile:

# $FreeBSD$

PORTNAME=	snorby
PORTVERSION=	2.5.3
CATEGORIES=	security www ruby

MAINTAINER=	pauls@utdallas.edu
COMMENT=	Web frontend for IDSes

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	rubygem-pdfkit>=0.5:${PORTSDIR}/graphics/rubygem-pdfkit \
		rubygem-rails>=3:${PORTSDIR}/www/rubygem-rails \
		rubygem-rack-test>=0.6:${PORTSDIR}/www/rubygem-rack-test \
		rubygem-jruby-jars>=1.6:${PORTSDIR}/devel/rubygem-jruby-jars \
		rubygem-graphviz>=0.9:${PORTSDIR}/graphics/rubygem-graphviz \
		git:${PORTSDIR}/devel/git
RUN_DEPENDS=	passenger:${PORTSDIR}/www/rubygem-passenger

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

OPTIONS_DEFINE=	IMAGEMAGICK SAGAN SNORT SURICATA
IMAGEMAGICK_DESC=	Install Imagemagick with X11 support
SAGAN_DESC=	Install security/sagan
SNORT_DESC=	Install security/snort
SURICATA_DESC=	Install security/suricata

NO_BUILD=	yes
SUB_FILES=	pkg-message
USE_RUBY=	yes
RUBY_VER=	1.9
RUBY_REQUIRE=	Ruby >= 192
USE_RUBY_GEMS=	yes
RUBYGEM_AUTOPLIST=	yes

RUBY_SHEBANG_FILES=	script/delayed_job \
			script/rails

MD=	ChangeLog.md README.md

.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:MSAGAN}
RUN_DEPENDS+=	sagan:${PORTSDIR}/security/sagan
.endif

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

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

pre-patch:
	@${FIND} ${WRKSRC} -type f -name .git* -exec ${RM} {} \;
	@${RM} -fr ${WRKSRC}/spec ${WRKSRC}/test ${WRKSRC}/vendor

do-install:
	@${MKDIR} ${DOCSDIR}
	@${MKDIR} ${WWWDIR}
	(cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${WWWDIR} "! ( -name README.md \
		-or -name ChangeLog.md -or -name LICENSE )")
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}

.if ${PORT_OPTIONS:MDOCS
.for i in ${MD}
	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.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?26C59D2E8B3CE746FFAA4B5A>