[arch-commits] Commit in metasploit/trunk (PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Thu Jan 4 02:58:42 UTC 2018


    Date: Thursday, January 4, 2018 @ 02:58:41
  Author: anatolik
Revision: 278418

Port Metasploit package to ruby-2.4 package

Metasploit does not build with ruby-2.5 yet

Modified:
  metasploit/trunk/PKGBUILD

----------+
 PKGBUILD |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-04 02:58:31 UTC (rev 278417)
+++ PKGBUILD	2018-01-04 02:58:41 UTC (rev 278418)
@@ -9,7 +9,7 @@
 url='https://www.metasploit.com/'
 arch=('x86_64')
 license=('BSD')
-depends=('ruby' 'libpcap' 'postgresql-libs' 'ruby-bundler' 'sqlite' 'libxslt' 'git')
+depends=('ruby2.4' 'libpcap' 'postgresql-libs' 'ruby2.4-bundler' 'sqlite' 'libxslt' 'git')
 optdepends=('ruby-pg: database support')
 options=('!strip' '!emptydirs')
 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/rapid7/metasploit-framework/archive/${pkgver}.tar.gz
@@ -21,7 +21,7 @@
 
 prepare() {
   cd ${pkgname}-framework-${pkgver}
-  bundle config build.nokogiri --use-system-libraries
+  bundle-2.4 config build.nokogiri --use-system-libraries
   sed 's|git ls-files|find -type f|' -i metasploit-framework.gemspec
   patch -R -p1 < "${srcdir}/metasploit-dont-restrict-aggregator.patch"
 }
@@ -28,7 +28,7 @@
 
 build() {
   cd ${pkgname}-framework-${pkgver}
-  bundle install -j"$(nproc)" --no-cache --deployment
+  bundle-2.4 install -j"$(nproc)" --no-cache --deployment
   find vendor/bundle/ruby -exec chmod o+r '{}' \;
 }
 
@@ -40,7 +40,7 @@
 
   for f in "${pkgdir}"/opt/${pkgname}/msf*; do
     local _msffile="${pkgdir}/usr/bin/`basename "${f}"`"
-    echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle exec ruby /opt/${pkgname}/`basename "${f}"` \"\$@\"" > "${_msffile}"
+    echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle-2.4 exec ruby /opt/${pkgname}/`basename "${f}"` \"\$@\"" > "${_msffile}"
     chmod 755 "${_msffile}"
   done
 
@@ -47,7 +47,7 @@
   (cd "${pkgdir}/opt/${pkgname}"
     for f in tools/*/*.rb; do
       install -Dm 755 "${f}" ".${f}"
-      echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle exec ruby /opt/${pkgname}/."${f}" \"\$@\"" > "${f}"
+      echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle exec ruby-2.4 /opt/${pkgname}/."${f}" \"\$@\"" > "${f}"
       chmod 755 "${f}"
     done
   )



More information about the arch-commits mailing list