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