My first ruby-based port
Paul Schmehl
pschmehl_lists at tx.rr.com
Wed Nov 14 19:46:18 UTC 2012
--On November 13, 2012 7:48:23 PM -0500 Steve Wills <swills at 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 at 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
More information about the freebsd-ruby
mailing list