Merge
[fedora-mingw.git] / gdb / mingw-gdb.spec
1 %define __strip %{_mingw_strip}
2 %define __objdump %{_mingw_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw_findrequires}
5 %define __find_provides %{_mingw_findprovides}
6
7 Name:           mingw-gdb
8 Version:        6.8
9 Release:        2%{?dist}
10 Summary:        MinGW port of the GNU debugger (gdb)
11
12 License:        GPLv2+
13 Group:          Development/Libraries
14 URL:            http://www.mingw.org/MinGWiki/index.php/gdb
15 Source0:        http://dl.sourceforge.net/sourceforge/mingw/gdb-%{version}.tar.bz2
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17
18 Patch0:         mingw-gdb-6.8-no-getcwd-error.patch
19
20 BuildRequires:  mingw-filesystem >= 23
21 BuildRequires:  flex
22
23
24 %description
25 This is the MinGW port of the GNU debugger (gdb).
26
27 Note this is a Fedora native binary which debugs Windows target
28 executables.
29
30
31 %prep
32 %setup -q -n gdb-%{version}
33 %patch0 -p1
34
35
36 %build
37 # Using echo normalizes spaces between the flags.
38 PKG_CONFIG_PATH="%{_mingw_libdir}/pkgconfig" \
39 CC="%{_mingw_cc}" \
40 CFLAGS=`echo %{_mingw_cflags}` \
41 ./configure \
42   --build=%_build --host=%{_mingw_host} --target=%{_mingw_target} \
43   --prefix=%{_mingw_prefix} \
44   --infodir=%{_mingw_datadir}/info \
45   --mandir=%{_mingw_mandir}
46
47 make
48
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 make DESTDIR=$RPM_BUILD_ROOT install
53
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58
59 %files
60 %defattr(-,root,root)
61 %{_mingw_bindir}/gdb.exe
62 %{_mingw_bindir}/gdbserver.exe
63 %{_mingw_libdir}/libbfd.a
64 %{_mingw_libdir}/libbfd.la
65 %{_mingw_libdir}/libiberty.a
66 %{_mingw_libdir}/libopcodes.a
67 %{_mingw_libdir}/libopcodes.la
68 %{_mingw_includedir}/*
69 %{_mingw_datadir}/info/*
70 %{_mingw_mandir}/man1/*.1*
71 %{_mingw_datadir}/locale/*/LC_MESSAGES/*
72
73
74 %changelog
75 * Fri Sep 12 2008 Richard W.M. Jones <rjones@redhat.com> - 6.8-2
76 - Initial RPM release.