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