summaryrefslogtreecommitdiffstats
path: root/cygwin-gdb.spec
blob: 4874ba3fa8a8530c9c234f614e577e31ed56e791 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Name:           cygwin-gdb
Version:        7.2
Release:        1%{?dist}
Summary:        Cygwin GNU debugger

License:        GPLv3+
Group:          Development/Utilities
URL:            http://www.gnu.org/software/gdb/
Source0:        http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  expat-devel
BuildRequires:  ncurses-devel
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  texinfo
BuildRequires:  cygwin-filesystem

# NB: This must be left in.
Requires:       cygwin-filesystem


%description
GNU debugger which understands Cygwin PE executables and DLLs,
using a gdbserver(1) instance on a Cygwin machine to run the executable.


%prep
%setup -q -n gdb-%{version}


%build
mkdir -p build
cd build
CFLAGS="$RPM_OPT_FLAGS" \
../configure \
  --build=%_build --host=%_host \
  --target=%{_cygwin_target} \
  --verbose --disable-nls \
  --without-included-gettext \
  --disable-win32-registry \
  --disable-werror \
  --with-sysroot=%{_cygwin_sysroot} \
  --prefix=%{_prefix} --bindir=%{_bindir} \
  --includedir=%{_includedir} --libdir=%{_libdir} \
  --mandir=%{_mandir} --infodir=%{_infodir}

make all


%install
rm -rf $RPM_BUILD_ROOT

cd build
make DESTDIR=$RPM_BUILD_ROOT install

# This file conflicts with ordinary binutils.
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a

# These files conflict with ordinary gdb.
rm -rf $RPM_BUILD_ROOT%{_datadir}/gdb/syscalls
rm -rf $RPM_BUILD_ROOT%{_infodir}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING3 COPYING3.LIB COPYING COPYING.LIB README
%{_bindir}/i686-pc-cygwin-*
%{_mandir}/man1/i686-pc-cygwin-*


%changelog
* Mon Mar 21 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 7.2-1
- Initial RPM release.