1 | # |
---|
2 | # Binutils 2.xx Version 1. |
---|
3 | # |
---|
4 | # This configuration file configure's, make's and install's binutils. |
---|
5 | # |
---|
6 | |
---|
7 | %include %{_configdir}/checks.cfg |
---|
8 | |
---|
9 | # |
---|
10 | # Select Snapshot Macro Maps |
---|
11 | # |
---|
12 | %select binutils-snapshot |
---|
13 | |
---|
14 | # |
---|
15 | # The description. |
---|
16 | # |
---|
17 | Name: %{_target}-binutils-%{binutils_version}-%{_host}-%{release} |
---|
18 | Summary: Binutils v%{binutils_version} for target %{_target} on host %{_host} |
---|
19 | Version: %{binutils_version} |
---|
20 | Release: %{release} |
---|
21 | URL: http://sources.redhat.com/binutils |
---|
22 | BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) |
---|
23 | |
---|
24 | # |
---|
25 | # Supports Candian Cross (Cxc). |
---|
26 | # |
---|
27 | %define allow_cxc |
---|
28 | |
---|
29 | # |
---|
30 | # Source |
---|
31 | # |
---|
32 | %source set binutils ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_version}.tar.bz2 |
---|
33 | |
---|
34 | # |
---|
35 | # Prepare the source code. |
---|
36 | # |
---|
37 | %prep |
---|
38 | build_top=$(pwd) |
---|
39 | |
---|
40 | source_dir_binutils="binutils-%{binutils_version}" |
---|
41 | %source setup binutils -q -n binutils-%{binutils_version} |
---|
42 | %patch setup binutils -p1 |
---|
43 | |
---|
44 | cd ${build_top} |
---|
45 | |
---|
46 | %build |
---|
47 | build_top=$(pwd) |
---|
48 | |
---|
49 | %{build_directory} |
---|
50 | |
---|
51 | mkdir -p ${build_dir} |
---|
52 | cd ${build_dir} |
---|
53 | |
---|
54 | %{host_build_flags} |
---|
55 | |
---|
56 | ../${source_dir_binutils}/configure \ |
---|
57 | --build=%{_build} --host=%{_host} \ |
---|
58 | --target=%{_target} \ |
---|
59 | --verbose --disable-nls \ |
---|
60 | %{?with_deterministic_archives:--enable-deterministic-archives} \ |
---|
61 | --without-included-gettext \ |
---|
62 | --disable-win32-registry \ |
---|
63 | --disable-werror \ |
---|
64 | --prefix=%{_prefix} --bindir=%{_bindir} \ |
---|
65 | --exec-prefix=%{_exec_prefix} \ |
---|
66 | --includedir=%{_includedir} --libdir=%{_libdir} \ |
---|
67 | --mandir=%{_mandir} --infodir=%{_infodir} |
---|
68 | |
---|
69 | %{__make} %{?_smp_mflags} all |
---|
70 | |
---|
71 | cd ${build_top} |
---|
72 | |
---|
73 | %install |
---|
74 | cd ${build_top} |
---|
75 | |
---|
76 | %{__rmdir} $SB_BUILD_ROOT |
---|
77 | |
---|
78 | cd ${build_dir} |
---|
79 | %{__make} DESTDIR=$SB_BUILD_ROOT install |
---|
80 | |
---|
81 | # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it. |
---|
82 | %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info* |
---|
83 | |
---|
84 | %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir |
---|
85 | touch $SB_BUILD_ROOT%{_infodir}/dir |
---|
86 | |
---|
87 | # binutils does not install share/locale, however it uses it |
---|
88 | mkdir -p $SB_BUILD_ROOT%{_prefix}/share/locale |
---|
89 | |
---|
90 | # We don't ship host files |
---|
91 | %{__rmfile} ${SB_BUILD_ROOT}%{_libdir}/libiberty* |
---|
92 | |
---|
93 | # manpages without corresponding tools |
---|
94 | if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-dlltool%{_exeext}; then |
---|
95 | %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-dlltool* |
---|
96 | fi |
---|
97 | if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-nlmconv%{_exeext}; then |
---|
98 | %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-nlmconv* |
---|
99 | fi |
---|
100 | if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windres%{_exeext}; then |
---|
101 | %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windres* |
---|
102 | fi |
---|
103 | if test ! -f ${SB_BUILD_ROOT}%{_bindir}/%{_target}-windmc%{_exeext}; then |
---|
104 | %{__rmfile} ${SB_BUILD_ROOT}%{_mandir}/man1/%{_target}-windmc* |
---|
105 | fi |
---|
106 | |
---|
107 | cd ${build_top} |
---|