Created
August 18, 2014 14:36
-
-
Save axper/a6bb4884fd3c575c82e1 to your computer and use it in GitHub Desktop.
metasploit-git pkgbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Babken Vardanyan - axper <483ken 4t gma1l | |
# Contributor: Sabart Otto - Seberm <seberm[at]seberm[dot]com> | |
# Contributor: Tobias Veit - nIcE <m.on.key.tobi[at]gmail[dot]com> | |
# Contributor: al.janitor <al.janitor [at] sdf [dot] org> | |
pkgname=metasploit-git | |
pkgver=20140818.25928.c5c63f4 | |
pkgrel=1 | |
pkgdesc='An advanced platform for using exploits (git version)' | |
arch=('any') | |
url='http://www.metasploit.com/' | |
license=('BSD') | |
depends=( | |
'postgresql'\ | |
'ruby1.9'\ | |
'ruby1.9-bundler'\ | |
'ruby1.9-arel'\ | |
'ruby1.9-bcrypt'\ | |
'ruby1.9-builder'\ | |
'ruby1.9-coderay'\ | |
'ruby1.9-diff-lcs'\ | |
'ruby1.9-erubis'\ | |
'ruby1.9-fivemat'\ | |
'ruby1.9-hike'\ | |
'ruby1.9-i18n'\ | |
'ruby1.9-journey'\ | |
'ruby1.9-json'\ | |
'ruby1.9-method_source'\ | |
'ruby1.9-mini_portile'\ | |
'ruby1.9-msgpack'\ | |
'ruby1.9-multi_json'\ | |
'ruby1.9-network_interface'\ | |
'ruby1.9-packetfu'\ | |
'ruby1.9-pcaprub'\ | |
'ruby1.9-pg'\ | |
'ruby1.9-rack'\ | |
'ruby1.9-rack-cache'\ | |
'ruby1.9-rack-ssl'\ | |
'ruby1.9-rack-test'\ | |
'ruby1.9-rake'\ | |
'ruby1.9-rdoc'\ | |
'ruby1.9-redcarpet'\ | |
'ruby1.9-rkelly-remix'\ | |
'ruby1.9-robots'\ | |
'ruby1.9-rspec-core'\ | |
'ruby1.9-rspec-expectations'\ | |
'ruby1.9-rspec-mocks'\ | |
'ruby1.9-rspec-collection_matchers'\ | |
'ruby1.9-rspec'\ | |
'ruby1.9-rubyntlm'\ | |
'ruby1.9-rubyzip'\ | |
'ruby1.9-slop'\ | |
'ruby1.9-sqlite3'\ | |
'ruby1.9-thor'\ | |
'ruby1.9-tilt'\ | |
'ruby1.9-sprockets'\ | |
'ruby1.9-timecop'\ | |
'ruby1.9-tzinfo'\ | |
'ruby1.9-yard'\ | |
'ruby1.9-activesupport'\ | |
'ruby1.9-activemodel'\ | |
'ruby1.9-actionpack'\ | |
'ruby1.9-shoulda-matchers'\ | |
'ruby1.9-metasploit-concern'\ | |
'ruby1.9-factory_girl'\ | |
'ruby1.9-railties'\ | |
'ruby1.9-factory_girl_rails'\ | |
'ruby1.9-activerecord'\ | |
'ruby1.9-arel-helpers'\ | |
'ruby1.9-nokogiri'\ | |
'ruby1.9-pry'\ | |
'ruby1.9-rspec-rails'\ | |
'ruby1.9-simplecov-html'\ | |
'ruby1.9-simplecov'\ | |
'ruby1.9-metasploit-model'\ | |
'ruby1.9-metasploit_data_models'\ | |
'ruby1.9-metasploit-credential'\ | |
'ruby1.9-meterpreter_bins' | |
) | |
makedepends=('git') | |
provides=('metasploit') | |
conflicts=('metasploit') | |
options=('!strip') | |
source=("$pkgname::git+https://github.com/rapid7/metasploit-framework.git") | |
md5sums=('SKIP') | |
pkgver () { | |
cd "$srcdir/$pkgname" | |
_date=$(date +"%Y%m%d") | |
echo "$_date.$(git rev-list --count master).$(git rev-parse --short master)" | |
} | |
package() { | |
mkdir -p "$pkgdir/usr/share" "$pkgdir/usr/bin" | |
install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
install -Dm644 "$srcdir/$pkgname/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING" | |
mv "$srcdir/$pkgname" "$pkgdir/usr/share/$pkgname" | |
cp "$pkgdir/usr/share/$pkgname/config/database.yml.example" "$pkgdir/usr/share/$pkgname/config/database.yml" | |
sed -i \ | |
-e 's/database: metasploit_framework_development/database: msf/' \ | |
-e 's/username: metasploit_framework_development/username: msf_user/' \ | |
"$pkgdir/usr/share/$pkgname/config/database.yml" | |
for f in $pkgdir/usr/share/$pkgname/msf*; do | |
local _msffile="$pkgdir/usr/bin/`basename "$f"`" | |
echo "ruby-1.9 /usr/share/$pkgname/`basename "$f"` \"\$@\"" > $_msffile | |
chmod 755 $_msffile | |
done | |
} | |
# vim:set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment