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