]>
Commit | Line | Data |
---|---|---|
0dbcf2b0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
5 | Summary: Capstone engine - dissassembly framework | |
6 | Summary(pl.UTF-8): Silnik Capstone - szkielet do disasemblacji | |
7 | Name: capstone | |
4c79359f | 8 | Version: 4.0.2 |
0dbcf2b0 JB |
9 | Release: 1 |
10 | License: BSD | |
11 | Group: Libraries | |
12 | #Source0Download: https://github.com/aquynh/capstone/releases | |
13 | Source0: https://github.com/aquynh/capstone/archive/%{version}/%{name}-%{version}.tar.gz | |
4c79359f | 14 | # Source0-md5: 8894344c966a948f1248e66c91b53e2c |
0dbcf2b0 | 15 | Patch0: %{name}-shared.patch |
0dbcf2b0 JB |
16 | URL: http://www.capstone-engine.org/ |
17 | BuildRequires: cmake >= 2.6 | |
13096ec3 | 18 | BuildRequires: rpmbuild(macros) >= 1.605 |
0dbcf2b0 JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | Capstone is a disassembly framework with the target of becoming the | |
23 | ultimate disasm engine for binary analysis and reversing in the | |
24 | security community. Capstone offers some unparalleled features: | |
25 | - Support for multiple hardware architectures: ARM, ARM64 (ARMv8), | |
26 | Ethereum VM, M68K, MIPS, PPC, SPARC, SystemZ, TMS320C64X, M680X, | |
27 | XCore and X86 (including X86_64). | |
28 | - Having clean/simple/lightweight/intuitive architecture-neutral API. | |
29 | - Provide details on disassembled instruction ("decomposer"). | |
30 | - Provide semantics of the disassembled instruction, such as list of | |
31 | implicit registers read & written. | |
32 | - Implemented in pure C language, with lightweight bindings for many | |
33 | languages. | |
34 | - Native support for all popular platforms: Windows, MacOS X, iOS, | |
35 | Android, Linux, *BSD, Solaris, etc. | |
36 | - Thread-safe by design. | |
37 | - Special support for embedding into firmware or OS kernel. | |
38 | - High performance & suitable for malware analysis (capable of | |
39 | handling various X86 malware tricks). | |
40 | - Distributed under the open source BSD license. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Capstone to szkielet do disasemblacji o aspiracjach do stania się | |
44 | standardowym silnikiem disasemblującym do analizy binariów i | |
45 | inżynierii wstecznej wśród społeczności związanej z bezpieczeństwem. | |
46 | Oferuje trochę niespotykanych możliwości: | |
47 | - obsługę wielu architektur sprzętowych: ARM, ARM64 (ARMv8), Ethereum | |
48 | VM, M68K, MIPS, PPC, SPARC, SystemZ, TMS320C64X, M680X, XCore oraz | |
49 | X86 (w tym X86_64) | |
50 | - czyste/proste/lekkie/intuicyjne API niezależne od architektury | |
51 | - podaje szczegóły disasemblowanej instrukcji ("dekompozycję") | |
52 | - podaje semantykę disasemblowanej instrukcji - np. listę niejawnych | |
53 | odczytywanych i zapisywanych rejestrów | |
54 | - jest zaimplementowany w czystym C z lekkimi wiązaniami do wielu | |
55 | innych języków | |
56 | - natywną obsługę wielu popularnych platform: Windows, MacOS X, iOS, | |
57 | Android, Linux, *BSD, Solaris itp. | |
58 | - jest bezpieczny pod kątem wątków | |
59 | - specjalną obsługę osadzania w firmwarze lub jądrze systemu | |
60 | - wysoką wydajność, przydatność przy analizie podejrzanego | |
61 | oprogramowania (obsługę różnych sztuczek architektury X86) | |
62 | - jest udostępniony z otwartymi źródłami na licencji BSD. | |
63 | ||
64 | %package devel | |
65 | Summary: Header files for Capstone dissassembler library | |
66 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki disasemblera Capstone | |
67 | Group: Development/Libraries | |
68 | Requires: %{name} = %{version}-%{release} | |
69 | ||
70 | %description devel | |
71 | Header files for Capstone dissassembler library. | |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Pliki nagłówkowe biblioteki disasemblera Capstone. | |
75 | ||
76 | %package static | |
77 | Summary: Static Capstone dissassembler library | |
78 | Summary(pl.UTF-8): Biblioteka statyczna disasemblera Capstone | |
79 | Group: Development/Libraries | |
80 | Requires: %{name}-devel = %{version}-%{release} | |
81 | ||
82 | %description static | |
83 | Static Capstone dissassembler library. | |
84 | ||
85 | %description static -l pl.UTF-8 | |
86 | Biblioteka statyczna disasemblera Capstone. | |
87 | ||
88 | %prep | |
89 | %setup -q | |
90 | %patch0 -p1 | |
0dbcf2b0 JB |
91 | |
92 | %build | |
93 | install -d build | |
94 | cd build | |
95 | %cmake .. \ | |
96 | %{!?with_static_libs:-DCAPSTONE_BUILD_STATIC=OFF} | |
97 | ||
98 | %{__make} | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %{__make} -C build install \ | |
104 | DESTDIR=$RPM_BUILD_ROOT | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post -p /sbin/ldconfig | |
110 | %postun -p /sbin/ldconfig | |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc CREDITS.TXT ChangeLog LICENSE.TXT LICENSE_LLVM.TXT README.md SPONSORS.TXT TODO | |
115 | %attr(755,root,root) %{_bindir}/cstool | |
116 | %attr(755,root,root) %{_libdir}/libcapstone.so.*.*.* | |
117 | %attr(755,root,root) %ghost %{_libdir}/libcapstone.so.4 | |
118 | ||
119 | %files devel | |
120 | %defattr(644,root,root,755) | |
121 | %attr(755,root,root) %{_libdir}/libcapstone.so | |
122 | %{_includedir}/capstone | |
123 | %{_pkgconfigdir}/capstone.pc | |
124 | ||
125 | %if %{with static_libs} | |
126 | %files static | |
127 | %defattr(644,root,root,755) | |
128 | %{_libdir}/libcapstone.a | |
129 | %endif |