summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/gdb/install.add
blob: 09991c427fde3f15e6ea684b2ff7fee31a364eb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%install
%if "%{_prefix}" != "/usr"
  export PATH="%{_bindir}:${PATH}"
%endif
  rm -rf $RPM_BUILD_ROOT

  cd build
  make DESTDIR=$RPM_BUILD_ROOT install

%if %build_infos
  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
  touch $RPM_BUILD_ROOT%{_infodir}/dir

# These come from other packages
  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
%else
# Conflict with a native gdb's infos
  rm -rf $RPM_BUILD_ROOT%{_infodir}
%endif

# We don't ship host files
  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*

# host library, installed to a bogus directory
  rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib@tool_target@-sim.a

# Bug in gdb-7.0, bogusly installs linux-only files
  somethinguseful=0
  for f in ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls/*.xml; do
    case $f in
    *linux.xml) rm -f $f;;
    *.xml) somethinguseful=1;;
    esac
  done
  if test $somethinguseful -eq 0; then
    rm -rf "${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/syscalls"
  fi

%if "{gdb_version}" >= "7.3"
%if ! %{with python}
# gdb-7.3 doesn't honor --without-python correctly
  rm -rf ${RPM_BUILD_ROOT}%{_datadir}/@tool_target@-gdb/python
%endif
%endif

%if "%{gdb_version}" == "7.3.91"
# gdb-7.3.91, installs host files, we don't want
  rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
%endif

  cd ..