beeef3abd074608a049648bd47a47006b83024ad
[fedora-mingw.git] / gdb / mingw-gdb.spec
1 Name:           mingw-gdb
2 Version:        6.8
3 Release:        1%{?dist}
4 Summary:        MinGW port of the GNU debugger (gdb)
5
6 License:        GPLv2+
7 Group:          Development/Libraries
8 URL:            http://www.mingw.org/MinGWiki/index.php/gdb
9 Source0:        http://dl.sourceforge.net/sourceforge/mingw/gdb-%{version}-mingw-src.tar.gz
10 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12 Patch0:         mingw-gdb-6.8-no-getcwd-error.patch
13
14 BuildRequires:  mingw-filesystem >= 23
15 BuildRequires:  flex
16 BuildRequires:  chrpath
17
18 Requires:       mingw-filesystem >= 23
19 Requires:       mingw-binutils
20 Requires:       mingw-runtime
21
22
23 %description
24 This is the MinGW port of the GNU debugger (gdb).
25
26 Note this is a Fedora native binary which debugs Windows target
27 executables.
28
29
30 %prep
31 %setup -q -n gdb-%{version}
32 %patch0 -p1
33
34
35 %build
36 CC="%{__cc} ${RPM_OPT_FLAGS}" \
37 ./configure \
38   --prefix=%{_prefix} \
39   --bindir=%{_bindir} \
40   --includedir=%{_includedir} \
41   --libdir=%{_libdir} \
42   --mandir=%{_mandir} \
43   --infodir=%{_infodir} \
44   --datadir=%{_datadir} \
45   --build=%_build --host=%_host \
46   --target=%{_mingw_target}
47 make
48
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 make DESTDIR=$RPM_BUILD_ROOT install
53
54 # Remove files that clash with other installed stuff.
55 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
56 rm -rf $RPM_BUILD_ROOT%{_infodir}/*
57 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
58
59 # Remove rpaths
60 chrpath --delete $RPM_BUILD_ROOT%{_bindir}/*
61
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66
67 %files
68 %defattr(-,root,root)
69 %{_bindir}/i686-pc-mingw32-gdb
70 %{_bindir}/i686-pc-mingw32-gdbtui
71 %{_mandir}/man1/*.1*
72
73
74 %changelog
75 * Thu Sep 11 2008 Richard W.M. Jones <rjones@redhat.com> - 6.8-1
76 - Initial RPM release.