]> git.pld-linux.org Git - SPECS.git/blob - metasploit.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / metasploit.spec
1 # TODO:
2 # - add R: rails and RubyGems (msfweb)
3 # - some docs redundant
4 # - package stuff for current arch, require tools from system
5 Summary:        The Metasploit Framework - a powerful tool for penetration testing
6 Summary(pl.UTF-8):      Metasploit Framework - narzędzie wspomagające testy penetracyjne
7 Name:           metasploit
8 Version:        4.5.2
9 Release:        0.5
10 License:        MFL v1.2+
11 Group:          Applications
12 Source0:        http://downloads.metasploit.com/data/releases/archive/framework-%{version}.tar.bz2
13 # Source0-md5:  d0aa92a67fd01f2ec79d05db18ac451c
14 Patch0:         %{name}-datadir.patch
15 URL:            http://www.metasploit.com/framework/
16 BuildRequires:  sed >= 4.0
17 #Requires:      rails
18 Requires:       ruby
19 #Requires:      ruby-RubyGems
20 BuildArch:      noarch
21 # currently archive contains mixed arch files, do not generate any dependencies at all
22 AutoReqProv:    no
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # Shellcode templates for various arches
26 %define         _noautostrip    .*%{_datadir}/%{name}/data/templates
27
28 # data/john/run.linux.x64.mmx/calc_stat' probably isn't a 32-bit LSB-first ELF file.
29 %define         _noautochrpath  .*%{_datadir}/%{name}/data/john
30
31 # blah, disable stripping, the above didn't work
32 %define         no_install_post_strip 1
33 %define         no_install_post_chrpath 1
34 %define         _enable_debug_packages  0
35
36 %description
37 The Metasploit Framework 3.1 is an advanced open-source platform for
38 developing, testing, and using exploit code. This project initially
39 started off as a portable network game and has evolved into a powerful
40 tool for penetration testing, exploit development, and vulnerability
41 research.
42
43 FYI: not all exploit modules are ported to ruby based 3.1 version, so
44 it is not a full replacement for Perl based Metasploit Framework 2.7.
45
46 %description -l pl.UTF-8
47 Metasploit Framework 3.1 to zaawansowana platforma do tworzenia,
48 testowania i wykorzystywania kodu exploitów. Projekt ten początkowo
49 maił być przenośną grą sieciową, a wyewoluował do potężnego narzędzia
50 do testów penetracyjnych, tworzenia exploitów i wyszukiwania luk.
51
52 INFO: Dla wykorzystującej język ruby wersji 3.1 nie przeniesiono
53 jeszcze wszystkich exploitów. Nie jest to pełny zamiennik Perlowego
54 Metasploit Framework 2.7.
55
56 %package doc
57 Summary:        Manual for %{name}
58 Summary(fr.UTF-8):      Documentation pour %{name}
59 Summary(it.UTF-8):      Documentazione di %{name}
60 Summary(pl.UTF-8):      Podręcznik dla %{name}
61 Group:          Documentation
62
63 %description doc
64 Documentation for %{name}.
65
66 %prep
67 %setup -q -n msf3
68 find -name .svn -type d -print0 | xargs -0 rm -rf
69 grep -Erl '/usr/local/bin/ruby|/''usr/bin/env' . | xargs %{__sed} -i -e '
70         1s,#!.*/bin/ruby,#!/''usr/bin/ruby,
71         1s,#!/''usr/bin/env ruby,#!/''usr/bin/ruby,
72 '
73 # junk
74 %{__rm} -r documentation/rpm
75
76 # cleanup backups after patching
77 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
78
79 # win32 binary with source
80 rm -rf tools/memdump
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name}}
85
86 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
87 l=''
88 if cp -al README $RPM_BUILD_ROOT/README 2>/dev/null; then
89         l=l
90         rm -f $RPM_BUILD_ROOT/README
91 fi
92
93 cp -a$l . $RPM_BUILD_ROOT%{_datadir}/%{name}
94
95 # use symlinks
96 for a in $RPM_BUILD_ROOT%{_datadir}/%{name}/msf*; do
97         ln -s ${a#$RPM_BUILD_ROOT} $RPM_BUILD_ROOT%{_bindir}
98 done
99
100 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/.{gitignore,rspec,travis.yml}
101 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/{*.md,COPYING,HACKING,LICENSE}
102 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/test
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc *.md COPYING HACKING LICENSE
110 %attr(755,root,root) %{_bindir}/msfbinscan
111 %attr(755,root,root) %{_bindir}/msfcli
112 %attr(755,root,root) %{_bindir}/msfconsole
113 %attr(755,root,root) %{_bindir}/msfd
114 %attr(755,root,root) %{_bindir}/msfelfscan
115 %attr(755,root,root) %{_bindir}/msfencode
116 %attr(755,root,root) %{_bindir}/msfgui
117 %attr(755,root,root) %{_bindir}/msfmachscan
118 %attr(755,root,root) %{_bindir}/msfpayload
119 %attr(755,root,root) %{_bindir}/msfpescan
120 %attr(755,root,root) %{_bindir}/msfrop
121 %attr(755,root,root) %{_bindir}/msfrpc
122 %attr(755,root,root) %{_bindir}/msfrpcd
123 %attr(755,root,root) %{_bindir}/msfupdate
124 %attr(755,root,root) %{_bindir}/msfvenom
125
126 %dir %{_datadir}/%{name}
127 %attr(755,root,root) %{_datadir}/%{name}/msf*
128 %{_datadir}/%{name}/armitage
129 %{_datadir}/%{name}/data
130 %{_datadir}/%{name}/external
131 %{_datadir}/%{name}/lib
132 %{_datadir}/%{name}/modules
133 %{_datadir}/%{name}/plugins
134 %{_datadir}/%{name}/scripts
135 %{_datadir}/%{name}/spec
136 %{_datadir}/%{name}/tools
137
138 # FIXME?
139 %{_datadir}/%{name}/Gemfile*
140 %{_datadir}/%{name}/Rakefile
141
142 %files doc
143 %defattr(644,root,root,755)
144 %{_datadir}/%{name}/documentation
This page took 1.138369 seconds and 3 git commands to generate.