1
0
Fork 0

New dradis ebuild

This commit is contained in:
Stefan Reimer 2011-12-10 22:02:03 -08:00
parent 1277c38381
commit 1b03d41e84
6 changed files with 101 additions and 0 deletions

6
app-misc/dradis/Manifest Normal file
View File

@ -0,0 +1,6 @@
AUX dradis 94 RMD160 c5bda854facb00e8727a680fac1ad07fb73282a0 SHA1 7708b9614a57cce163f165ad3a878e8671ba5bdf SHA256 63cfaadeb5bde0f3461ef0151d4a0c29a8173021d77b36dcf565b9b89daf5238
AUX dradis.confd 190 RMD160 212def04e6b7a68285aaf27ef7dd618b3c2f3141 SHA1 0d3868ac0a17946c20538aebe6c483427ad1d91d SHA256 a0eafa1b766ee0e8274974a89759c71299eef16223ed890c8c0721b617ba7838
AUX dradis.initd 598 RMD160 ee8f2ea548a91636529d31bf41f7ceb3762fb1dd SHA1 f87407ad9f5eaf950959ee7979b7fbff4bac248e SHA256 21283f9965a7f49ec3d04812de63af7edc7c65613ff8f2f86b3f70788cca6243
AUX jquery-rails-1.0.13.gem 254976 RMD160 d5912ae0df4b32ba3ac905685f7e12d1c316035a SHA1 c0045bd09a4844d8bd2245a9a2665aa265e3f913 SHA256 101d0336b9c2c0587b9af4fa16ba42a8385b692617cfd36f478c642e65dbb63d
DIST dradis-v2.8.0.tar.bz2 11582518 RMD160 8499be68367d111931de3946678558273d5c1c85 SHA1 60ac20c7fcf2111391e0cd84a21dfd3bd3509d76 SHA256 f03f8e863e4316a40384ddd1bf57874712807e76562f11c99d2079f57c9c1210
EBUILD dradis-2.8.0.ebuild 1254 RMD160 688a410f145b419dd9246c45ce628b1a79f86e3c SHA1 3043e08924da39fdb608787b01294e99e94924fd SHA256 c211462ca0fdbd97b1eeb250ff4e03a8f96d7ba2708ee3c0faae9a58e649052e

View File

@ -0,0 +1,55 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils
DESCRIPTION="A framework for effective information sharing"
HOMEPAGE="http://dradisframework.org/"
SRC_URI="mirror://sourceforge/$PN/$PN-v$PV.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="mysql"
DEPEND="dev-ruby/sqlite3-ruby
dev-ruby/rubygems
dev-ruby/bundler
mysql? ( dev-ruby/mysql-ruby )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-2.8"
src_compile() {
# Inject missing jquery-rails-1.0.13.gem
cp ${FILESDIR}/jquery-rails-1.0.13.gem server/vendor/cache
export RAILS_ENV=production
cd server
bundle check > /dev/null || bundle install --local || die
}
src_install() {
insinto /usr/lib/$PN
doins -r server/* || die "install failed"
dodoc readme.txt CHANGELOG
dosbin "${FILESDIR}"/$PN
newinitd "${FILESDIR}"/${PN}.initd $PN
newconfd "${FILESDIR}"/${PN}.confd $PN
}
pkg_postinst() {
einfo "Setting up sqlite database."
cd /usr/lib/$PN/
export RAILS_ENV=production
echo y | bundle exec thor dradis:reset
if use mysql; then
einfo "If you want to use a MySQL database check the dradis\
documentation: http://dradisframework.org/configure.html"
fi
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
export RAILS_ENV=production
cd /usr/lib/dradis
bundle exec rails server webrick $*

View File

@ -0,0 +1,7 @@
# /etc/conf.d/dradis: config file for /etc/init.d/dradis
# Bind to specified address
# You can set to 0.0.0.0 to accept requests anywhere
DRADIS_ADDRESS="localhost"
# Port
DRADIS_PORT=3004

View File

@ -0,0 +1,28 @@
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
export RAILS_ENV=production
depend() {
need net
use mysql
}
start() {
ebegin "Starting dradis"
cd /usr/lib/dradis/
start-stop-daemon --start --quiet \
--pidfile /usr/lib/dradis/tmp/pids/server.pid \
--exec /usr/sbin/dradis -- \
--daemon --binding ${DRADIS_ADDRESS} --port ${DRADIS_PORT}
eend $?
}
stop() {
ebegin "Stopping dradis"
cd /usr/lib/dradis/
start-stop-daemon --stop --quiet --pidfile /usr/lib/dradis/tmp/pids/server.pid
eend $?
}

Binary file not shown.