]> git.pld-linux.org Git - packages/boomerang.git/blob - boomerang.spec
- BR: sed 4.0
[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 BuildRequires:  sed >= 4.0
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         no_install_post_chrpath         1
30
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
51 %description -l pl
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ê).
62
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
65 wykonywalnych z przyzwoitym efektem, np. x86-windows, sparc-solaris
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.
71
72 %prep
73 %setup -q -n %{name}
74 %patch0 -p1
75 %patch1 -p1
76
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' "{}" ";"
79
80 %build
81 ln -sf %{_includedir}/cppunit include/cppunit
82 cp -f /usr/share/automake/config.* .
83 %configure
84
85 %if ! %{with flex_bison_c++}
86 %{__make} remote
87 %endif
88
89 %{__make} \
90         C="%{__cc} %{rpmcflags} -I%{_includedir}/gc" \
91         CC="%{__cxx} %{rpmcflags} -I%{_includedir}/gc"
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/frontend/machine}
96
97 install %{name} $RPM_BUILD_ROOT%{_bindir}
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
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %files
107 %defattr(644,root,root,755)
108 %attr(755,root,root) %{_bindir}/*
109 %dir %{_libdir}/%{name}
110 %dir %{_libdir}/%{name}/lib
111 %attr(755,root,root) %{_libdir}/%{name}/lib/*.so
112 %dir %{_libdir}/%{name}/frontend
113 %dir %{_libdir}/%{name}/frontend/machine
114 %dir %{_libdir}/%{name}/frontend/machine/*
115 %{_libdir}/%{name}/frontend/machine/*/*.ssl
116 %{_libdir}/%{name}/signatures
117 %{_libdir}/%{name}/transformations
This page took 0.077318 seconds and 3 git commands to generate.