source: rtems/contrib/crossrpms/gcc/install.add @ 00f13ee

4.104.114.84.95
Last change on this file since 00f13ee was 36c8e140, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/24/07 at 02:58:23

Remove %{_libdir}/libiberty.a

  • Property mode set to 100644
File size: 3.9 KB
Line 
1%install
2%if "%{_prefix}" != "/usr"
3  export PATH="%{_bindir}:${PATH}"
4%endif
5  rm -rf $RPM_BUILD_ROOT
6
7  cd build
8
9  make DESTDIR=$RPM_BUILD_ROOT install
10  cd ..
11
12%if %build_newlib
13  cd build/@tool_target@/newlib
14  make DESTDIR=$RPM_BUILD_ROOT install-info
15  cd ../../..
16%endif
17
18%if "%{gcc_version}" <= "4.1.2"
19# Misplaced header file
20  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
21    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
22      $RPM_BUILD_ROOT%{gcclib}/@tool_target@/%{gcc_version}/include/
23  fi
24%endif
25
26  # host library
27  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
28
29  # We use the version from binutils
30  rm -f $RPM_BUILD_ROOT%{_bindir}/@tool_target@-c++filt%{_exeext}
31
32%if %build_gnat
33  # Seemingly a VAX tool. Not meaningful, here.
34  rm -f $RPM_BUILD_ROOT%{_bindir}/vxaddr2line%{_exeext}
35%endif
36
37%if %build_infos
38  # We don't ship info/dir
39  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
40  touch $RPM_BUILD_ROOT%{_infodir}/dir
41%else
42# Conflict with a native GCC's infos
43  rm -rf $RPM_BUILD_ROOT%{_infodir}
44
45# Conflict with a native GCC's man pages
46  rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
47%endif
48
49%if %build_f95
50#  # Bug in gcc-4.0.0pre
51#  mv $RPM_BUILD_ROOT%{_bindir}/gfortran $RPM_BUILD_ROOT%{_bindir}/@tool_target@-gfortran
52%endif
53
54%if "%{gcc_version}" >= "3.4"
55  # Bug in gcc-3.4.0pre
56  rm -f $RPM_BUILD_ROOT%{_bindir}/@tool_target@-@tool_target@-gcjh%{_exeext}
57%endif
58
59%if "%{gcc_version}" >= "3.3"
60  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
61  # the fixinclude-install-tools
62  rm -rf ${RPM_BUILD_ROOT}%{gcclib}/@tool_target@/%{gcc_version}/install-tools
63  rm -rf ${RPM_BUILD_ROOT}%{gccexec}/@tool_target@/%{gcc_version}/install-tools
64%endif
65
66  # Collect multilib subdirectories
67  f=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
68
69%if %build_newlib
70  echo "%defattr(-,root,root,-)" > build/files.newlib
71  TGTDIR="%{_exec_prefix}/@tool_target@/lib"
72  for i in $f; do
73    case $i in
74    \.) echo "%dir ${TGTDIR}" >> build/files.newlib
75      ;;
76    *)  echo "%dir ${TGTDIR}/$i" >> build/files.newlib
77      ;;
78    esac
79  done
80%endif
81
82  rm -f dirs ;
83  echo "%defattr(-,root,root,-)" >> dirs
84%if "%{_prefix}" != "/usr"
85  echo "%dir %{_prefix}" >> dirs
86  echo "%dir %{_libdir}" >> dirs
87%if "%{gcc_version}" >= "3.4"
88  echo "%dir %{_libexecdir}" >> dirs
89%endif
90%endif
91  echo "%dir %{gcclib}" >> dirs
92  echo "%dir %{gcclib}/@tool_target@" >> dirs
93
94  TGTDIR="%{gcclib}/@tool_target@/%{gcc_version}"
95  for i in $f; do
96    case $i in
97    \.) echo "%dir ${TGTDIR}" >> dirs
98      ;;
99    *)  echo "%dir ${TGTDIR}/$i" >> dirs
100      ;;
101    esac
102  done
103
104  # Collect files to go into different packages
105  cp dirs build/files.gcc
106  cp dirs build/files.g77
107  cp dirs build/files.gfortran
108  cp dirs build/files.objc
109  cp dirs build/files.gcj
110  cp dirs build/files.g++
111
112  TGTDIR="%{gcclib}/@tool_target@/%{gcc_version}"
113  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
114  for i in $f; do
115    case $i in
116    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
117    *f771) ;;
118    *f951) ;;
119    *cc1) ;;
120    *cc1obj) ;;
121    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
122    *collect2) ;;
123    *libobjc*) echo "$i" >> build/files.objc ;;
124    *include/objc*) ;;
125    *include/g++*);;
126    *include/c++*);;
127    *adainclude*);;
128    *adalib*);;
129    *gnat1);;
130    *jc1) ;;
131    *jvgenmain) ;;
132    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
133    */libstdc++.*) echo "$i" >> build/files.g++ ;;
134    */libsupc++.*) echo "$i" >> build/files.g++ ;;
135    *) echo "$i" >> build/files.gcc ;;
136    esac
137  done
138
139  TGTDIR="%{_exec_prefix}/@tool_target@/lib"
140  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
141  for i in $f; do
142    case $i in
143    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
144    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
145# all other files belong to newlib
146    *) echo "$i" >> build/files.newlib ;;
147    esac
148  done
Note: See TracBrowser for help on using the repository browser.