]> git.pld-linux.org Git - packages/crossm68k-binutils.git/blob - crossm68k-binutils.spec
- adapterized (killed trailing spaces/tabs)
[packages/crossm68k-binutils.git] / crossm68k-binutils.spec
1
2 %define         toolkit_date    20050221
3 %define         elf2flt_date    20041205
4
5 Summary:        Cross  GNU binary utility development utilities - binutils
6 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - m68k binutils
7 Summary(fr):    Utilitaires de développement binaire de GNU - m68k binutils
8 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla m68k - binutils
9 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - m68k binutils
10 Summary(tr):    GNU geliþtirme araçlarý - m68k binutils
11 Name:           crossm68k-binutils
12 Version:        2.16.91.0.5
13 Release:        1
14 License:        GPL
15 Group:          Development/Tools
16 Source0:        ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
17 # Source0-md5:  29fdde06e229672daaaacbf52362520a
18 Source1:        http://www.develer.com/uclinux/uclinux-tools-%{toolkit_date}/elf2flt-%{elf2flt_date}.tar.bz2
19 # Source1-md5:  fee884cc589de2febf5749a85b05403a
20 URL:            http://sources.redhat.com/binutils/
21 BuildRequires:  automake
22 BuildRequires:  bash
23 BuildRequires:  bison
24 BuildRequires:  flex
25 BuildRequires:  sed
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         target          m68k-elf
29 %define         arch            %{_prefix}/%{target}
30
31 %description
32 Binutils is a collection of binary utilities, including:
33 - ar - create, modify and extract from archives,
34 - nm - lists symbols from object files,
35 - objcopy - copy and translate object files,
36 - objdump - display information from object files,
37 - ranlib - generate an index for the contents of an archive,
38 - size - list the section sizes of an object or archive file,
39 - strings - list printable strings from files,
40 - strip - discard symbols,
41 - c++filt - a filter for demangling encoded C++ symbols,
42 - addr2line - convert addresses to file and line,
43 - nlmconv - convert object code into an NLM.
44
45 This package contains the cross version for m68k.
46
47 %description -l pl
48 Pakiet binutils zawiera zestaw narzêdzi umo¿liwiaj±cych kompilacjê
49 programów. Znajduj± siê tutaj miêdzy innymi assembler, konsolidator
50 (linker), a tak¿e inne narzêdzia do manipulowania binarnymi plikami
51 programów i bibliotek.
52
53 Ten pakiet zawiera wersjê skro¶n± generuj±c± kod dla m68k.
54
55 %prep
56 %setup -q -n binutils-%{version} -a1
57 sed -i 's/-static//g'            elf2flt-%{elf2flt_date}/Makefile.in
58 sed -i 's@LDSCRIPTPATH="${TOOLDIR}/../lib"@LDSCRIPTPATH="${TOOLDIR}/../lib/ldscripts"@g'        \
59     elf2flt-%{elf2flt_date}/ld-elf2flt.in
60
61 %build
62 cp /usr/share/automake/config.sub .
63
64 # ldscripts won't be generated properly if SHELL is not bash...
65 CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
66 LDFLAGS="%{rpmldflags}" \
67 CONFIG_SHELL="/bin/bash" \
68 ./configure \
69         --disable-shared \
70         --disable-nls \
71         --prefix=%{_prefix} \
72         --libdir=%{_libdir} \
73         --mandir=%{_mandir} \
74         --infodir=%{_infodir} \
75         --target=%{target}
76
77 %{__make} all \
78         tooldir=%{_prefix} \
79         EXEEXT=""
80
81 # Build elf2lft
82 cd elf2flt-%{elf2flt_date}
83
84 CFLAGS="%{rpmcflags} -fno-strict-aliasing" \
85 LDFLAGS="%{rpmldflags}" \
86 ./configure \
87         --with-libbfd=../bfd/libbfd.a \
88         --with-libiberty=../libiberty/libiberty.a \
89         --with-bfd-include-dir=../bfd \
90         --with-binutils-include-dir=../include \
91         --target=%{target} \
92         --prefix=%{_prefix}
93
94 %{__make}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_prefix}
99
100 %{__make} install \
101         prefix=$RPM_BUILD_ROOT%{_prefix} \
102         mandir=$RPM_BUILD_ROOT%{_mandir} \
103         infodir=$RPM_BUILD_ROOT%{_infodir} \
104         libdir=$RPM_BUILD_ROOT%{_libdir}
105
106 # remove these man pages unless we cross-build for win*/netware platforms.
107 # however, this should be done in Makefiles.
108 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{*dlltool,*nlmconv,*windres}.1
109
110 # Install elf2flt
111 mv $RPM_BUILD_ROOT%{arch}/bin/ld                \
112         $RPM_BUILD_ROOT%{arch}/bin/ld.real
113
114 mv $RPM_BUILD_ROOT%{_bindir}/%{target}-ld       \
115         $RPM_BUILD_ROOT%{_bindir}/%{target}-ld.real
116
117 for prog in flthdr elf2flt; do
118         install elf2flt-%{elf2flt_date}/$prog \
119                 $RPM_BUILD_ROOT%{arch}/bin/$prog
120         ln $RPM_BUILD_ROOT%{arch}/bin/$prog \
121                 $RPM_BUILD_ROOT%{_bindir}/%{target}-$prog
122 done
123
124 install elf2flt-%{elf2flt_date}/ld-elf2flt      \
125         $RPM_BUILD_ROOT%{arch}/bin/ld
126
127 ln $RPM_BUILD_ROOT%{arch}/bin/ld \
128         $RPM_BUILD_ROOT%{_bindir}/%{target}-ld
129
130 install elf2flt-%{elf2flt_date}/elf2flt.ld      \
131         $RPM_BUILD_ROOT%{arch}/lib/ldscripts/elf2flt.ld
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %files
137 %defattr(644,root,root,755)
138 %doc README
139 %attr(755,root,root) %{_bindir}/%{target}-*
140 %dir %{arch}
141 %dir %{arch}/bin
142 %attr(755,root,root) %{arch}/bin/*
143 %dir %{arch}/lib
144 %dir %{arch}/lib/*
145 %{arch}/lib/ldscripts/*
146 %{_mandir}/man?/%{target}-*
This page took 0.073634 seconds and 3 git commands to generate.