]>
Commit | Line | Data |
---|---|---|
a0eee946 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with flex_bison_c++ # use flex++/bison++ | |
4 | # | |
f56acf41 | 5 | Summary: A general, open source, retargetable decompiler of native executable files |
6a754711 | 6 | Summary(pl.UTF-8): Ogólny, otwarty dekompilator natywnych plików wykonywalnych |
cfcf678f | 7 | Name: boomerang |
7466cb14 | 8 | Version: 0.0.0.20040708 |
a0eee946 | 9 | Release: 0.2 |
cfcf678f AM |
10 | License: GPL |
11 | Group: Development/Languages | |
12 | Source0: %{name}.tar.gz | |
7466cb14 AM |
13 | # Source0-md5: a9f15806eb670686869f67a06e8a6fbb |
14 | Patch0: %{name}-path.patch | |
a0eee946 | 15 | Patch1: %{name}-types.patch |
cfcf678f | 16 | URL: http://boomerang.sourceforge.net/ |
a0eee946 | 17 | BuildRequires: automake |
9f2ad00e | 18 | %if %{with flex_bison_c++} |
cfcf678f | 19 | BuildRequires: bison++ |
720a611d | 20 | BuildRequires: flex |
9f2ad00e | 21 | %endif |
720a611d | 22 | BuildRequires: cppunit-devel |
cfcf678f | 23 | BuildRequires: expat-devel |
f56acf41 | 24 | BuildRequires: gc-devel |
cfcf678f | 25 | BuildRequires: libstdc++-devel |
38c21234 | 26 | BuildRequires: sed >= 4.0 |
cfcf678f AM |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
7466cb14 AM |
29 | %define no_install_post_chrpath 1 |
30 | ||
cfcf678f AM |
31 | %description |
32 | An attempt to develop a real decompiler through the open source | |
33 | community. A decompiler takes as input an executable file, and | |
34 | attempts to create a high level, compilable, even maintainable source | |
35 | file that does the same thing. It is therefore the opposite of a | |
36 | compiler, which of course takes a source file and makes an executable. | |
37 | It won't of course recreate the original source file; probably nothing | |
38 | like it. It does not matter if the executable file has symbols or not, | |
39 | or was compiled from any particular language. (However, languages like | |
40 | ML that are usually interpreted are not considered.) | |
41 | ||
42 | The intent is to create a retargetable decompiler (i.e. one that can | |
43 | work with different types of input executable files with modest | |
44 | effort, e.g. X86-windows, sparc-solaris, etc). It will be highly | |
45 | modular, so that different parts of the decompiler can be replaced | |
46 | with experimental modules. It is intended to eventually become | |
47 | interactive, a la IDA Pro, because some things (not just variable | |
48 | names and comments, though these are obviously very important) require | |
49 | expert intervention. | |
50 | ||
235c4395 JR |
51 | %description -l pl.UTF-8 |
52 | Próba stworzenia prawdziwego dekompilatora przez społeczność otwartego | |
53 | oprogramowania. Dekompilator przyjmuje na wejściu plik wykonywalny i | |
54 | próbuje stworzyć kompilowalny, a nawet zarządzalny, plik źródłowy w | |
55 | języku wyższego poziomu wykonujący to samo zadanie. Jest to więc | |
56 | przeciwieństwo kompilatora, który oczywiście przyjmuje plik źródłowy i | |
57 | tworzy wykonywalny. Oczywiście dekompilator nie odtworzy oryginalnego | |
58 | pliku źródłowego; raczej nic z tych rzeczy. Nie ma znaczenia, czy plik | |
59 | wykonywalny ma symbole czy nie, ani czy został skompilowany z jakiegoś | |
60 | konkretnego języka (jednak języki w rodzaju ML, które są zwykle | |
61 | interpretowane, nie są brane pod uwagę). | |
f56acf41 | 62 | |
235c4395 JR |
63 | Intencją jest stworzenie dekompilatora dla wielu architektur (czyli |
64 | takiego, który może działać z różnymi rodzajami wejściowych plików | |
f56acf41 | 65 | wykonywalnych z przyzwoitym efektem, np. x86-windows, sparc-solaris |
235c4395 JR |
66 | itp.). Będzie bardzo modularny, więc wiele części dekompilatora może |
67 | zostać zastąpiona eksperymentalnymi modułami. Być może stanie się | |
68 | interaktywny, jak IDA Pro, ponieważ niektóre rzeczy (nie tylko nazwy | |
69 | zmiennych i komentarze, chociaż te są oczywiście bardzo ważne) | |
70 | wymagają interwencji eksperta. | |
f56acf41 | 71 | |
cfcf678f AM |
72 | %prep |
73 | %setup -q -n %{name} | |
7466cb14 | 74 | %patch0 -p1 |
a0eee946 | 75 | %patch1 -p1 |
cfcf678f | 76 | |
7466cb14 AM |
77 | find . -type d -name CVS -exec rm -rf "{}" ";" 2> /dev/null || : |
78 | find . -type f -name 'Makefile*' -exec sed -i -e 's#^BOOMDIR=.*#BOOMDIR=%{_libdir}/%{name}#g' "{}" ";" | |
9f2ad00e | 79 | |
a0eee946 JB |
80 | %build |
81 | ln -sf %{_includedir}/cppunit include/cppunit | |
82 | cp -f /usr/share/automake/config.* . | |
cfcf678f AM |
83 | %configure |
84 | ||
9f2ad00e AM |
85 | %if ! %{with flex_bison_c++} |
86 | %{__make} remote | |
87 | %endif | |
88 | ||
cfcf678f | 89 | %{__make} \ |
720a611d AM |
90 | C="%{__cc} %{rpmcflags} -I%{_includedir}/gc" \ |
91 | CC="%{__cxx} %{rpmcflags} -I%{_includedir}/gc" | |
cfcf678f AM |
92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
7466cb14 | 95 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/frontend/machine} |
cfcf678f | 96 | |
9f2ad00e | 97 | install %{name} $RPM_BUILD_ROOT%{_bindir} |
7466cb14 AM |
98 | cp -a signatures transformations $RPM_BUILD_ROOT%{_libdir}/%{name} |
99 | cp -a frontend/machine/* $RPM_BUILD_ROOT%{_libdir}/%{name}/frontend/machine | |
100 | find $RPM_BUILD_ROOT%{_libdir}/%{name}/frontend/machine -type f ! -name '*.ssl' -exec rm -f "{}" ";" | |
101 | cp -a lib $RPM_BUILD_ROOT%{_libdir}/%{name}/lib | |
cfcf678f AM |
102 | |
103 | %clean | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
9f2ad00e | 108 | %attr(755,root,root) %{_bindir}/* |
9f2ad00e | 109 | %dir %{_libdir}/%{name} |
a0eee946 | 110 | %dir %{_libdir}/%{name}/lib |
7466cb14 | 111 | %attr(755,root,root) %{_libdir}/%{name}/lib/*.so |
a0eee946 | 112 | %dir %{_libdir}/%{name}/frontend |
7466cb14 AM |
113 | %dir %{_libdir}/%{name}/frontend/machine |
114 | %dir %{_libdir}/%{name}/frontend/machine/* | |
115 | %{_libdir}/%{name}/frontend/machine/*/*.ssl | |
a0eee946 JB |
116 | %{_libdir}/%{name}/signatures |
117 | %{_libdir}/%{name}/transformations |