]> git.pld-linux.org Git - packages/boomerang.git/blob - boomerang.spec
- added types patch (for 64-bit size_t), fixed build on amd64
[packages/boomerang.git] / boomerang.spec
1 #
2 # Conditional build:
3 %bcond_with     flex_bison_c++  # use flex++/bison++
4 #
5 Summary:        A general, open source, retargetable decompiler of native executable files
6 Summary(pl):    Ogólny, otwarty dekompilator natywnych plików wykonywalnych
7 Name:           boomerang
8 Version:        0.0.0.20040708
9 Release:        0.2
10 License:        GPL
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++
20 BuildRequires:  flex
21 %endif
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)
27
28 %define         no_install_post_chrpath         1
29
30 %description
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.)
40
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
48 expert intervention.
49
50 %description -l pl
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ê).
61
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.
70
71 %prep
72 %setup -q -n %{name}
73 %patch0 -p1
74 %patch1 -p1
75
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' "{}" ";"
78
79 %build
80 ln -sf %{_includedir}/cppunit include/cppunit
81 cp -f /usr/share/automake/config.* .
82 %configure
83
84 %if ! %{with flex_bison_c++}
85 %{__make} remote
86 %endif
87
88 %{__make} \
89         C="%{__cc} %{rpmcflags} -I%{_includedir}/gc" \
90         CC="%{__cxx} %{rpmcflags} -I%{_includedir}/gc"
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/frontend/machine}
95
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
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %files
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
This page took 0.038115 seconds and 3 git commands to generate.