[arch-commits] Commit in metasploit/repos (2 files)
Levente Polyak
anthraxx at gemini.archlinux.org
Wed Jun 1 17:38:41 UTC 2022
Date: Wednesday, June 1, 2022 @ 17:38:41
Author: anthraxx
Revision: 1218326
archrelease: copy trunk to community-testing-x86_64
Added:
metasploit/repos/community-testing-x86_64/
metasploit/repos/community-testing-x86_64/PKGBUILD
(from rev 1218325, metasploit/trunk/PKGBUILD)
----------+
PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
Copied: metasploit/repos/community-testing-x86_64/PKGBUILD (from rev 1218325, metasploit/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2022-06-01 17:38:41 UTC (rev 1218326)
@@ -0,0 +1,68 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
+# Contributor: Sabart Otto - Seberm <seberm[at]seberm[dot]com>
+# Contributor: Tobias Veit - nIcE <m.on.key.tobi[at]gmail[dot]com>
+
+pkgname=metasploit
+pkgver=6.2.0
+pkgrel=2
+pkgdesc='Advanced open-source platform for developing, testing, and using exploit code'
+url='https://www.metasploit.com/'
+arch=('x86_64')
+license=('BSD')
+depends=('ruby' 'ruby-bundler' 'libpcap' 'postgresql-libs' 'sqlite' 'libxslt' 'libxml2' 'inetutils' 'git')
+options=('!strip' '!emptydirs')
+source=(https://github.com/rapid7/metasploit-framework/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
+sha512sums=('98014297bc1601ebb8bfba2933607b709e5674f7f85f8e3934c82258d30c250ecdf49a6d99656894a6cec85d140bcd69ea47fd559d6ac44af36b44bdebfd6eee')
+b2sums=('57262140499d4b87b9b8d493ed45887bba30130b9c093b910ce1cf45343327cb60ddde82af731be29fd2c904ad556a6f7032f56a9f9f918d92709a8d60d208ab')
+
+prepare() {
+ cd ${pkgname}-framework-${pkgver}
+
+ # https://github.com/undler/bundler/issues/6882
+ sed -e '/BUNDLED WITH/,+1d' -i Gemfile.lock
+
+ bundle config build.nokogiri --use-system-libraries
+ bundle config set --local deployment 'true'
+ sed 's|git ls-files|find -type f|' -i metasploit-framework.gemspec
+}
+
+build() {
+ cd ${pkgname}-framework-${pkgver}
+ CFLAGS+=" -I/usr/include/libxml2"
+ bundle install -j"$(nproc)" --no-cache
+ find vendor/bundle/ruby -exec chmod o+r '{}' \;
+ find vendor/bundle/ruby \( -name gem_make.out -or -name mkmf.log \) -delete
+}
+
+package() {
+ cd ${pkgname}-framework-${pkgver}
+
+ install -d "${pkgdir}/opt/${pkgname}" "${pkgdir}/usr/bin"
+ cp -r . "${pkgdir}/opt/${pkgname}"
+
+ for f in "${pkgdir}"/opt/${pkgname}/msf*; do
+ local _msffile="${pkgdir}/usr/bin/`basename "${f}"`"
+ echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile exec bundle exec ruby /opt/${pkgname}/`basename "${f}"` \"\$@\"" > "${_msffile}"
+ chmod 755 "${_msffile}"
+ done
+
+ (cd "${pkgdir}/opt/${pkgname}"
+ for f in tools/*/*.rb; do
+ install -Dm 755 "${f}" ".${f}"
+ echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile exec bundle exec ruby /opt/${pkgname}/."${f}" \"\$@\"" > "${f}"
+ chmod 755 "${f}"
+ done
+ )
+
+ install -Dm 644 external/zsh/_* -t "${pkgdir}/usr/share/zsh/site-functions"
+ install -Dm 644 LICENSE COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -d "${pkgdir}/usr/share/doc"
+ mv "${pkgdir}/opt/${pkgname}/documentation" "${pkgdir}/usr/share/doc/${pkgname}"
+ rm "${pkgdir}/usr/bin/msfupdate"
+ rm -r "${pkgdir}"/opt/metasploit/vendor/bundle/ruby/*/cache
+ sed -e '/^BUNDLE_JOBS/d' -i "${pkgdir}/opt/metasploit/.bundle/config"
+ find "${pkgdir}/opt/metasploit/vendor/bundle/ruby/" -name Makefile -delete
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list