File bin86.spec of Package dev86

#
# spec file for package bin86 (Version 0.16.17)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           bin86
ExclusiveArch:  %ix86 x86_64
License:        GPL v2 or later
Group:          Development/Languages/Other
AutoReqProv:    on
Version:        0.16.17
Release:        43
Summary:        An 8086 Assembler and Linker
Url:            http://www.cix.co.uk/~mayday/
Source:         Dev86src-%{version}.tar.bz2
Source1:        rpmlintrc
Patch:          dev86-%{version}.dif
Patch2:         dev86-noelks.patch
Patch3:         dev86-x86_64.patch
%if 0%suse_version > 1020
BuildRequires:  fdupes
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Linux 8086 development environment based on Bruce Evans's C compiler

This is based on Bruce Evans's C compiler with additonal code, including a reasonable C library for ELKS DOS or standalone.

It is used to combile and assemble BIOS images like the BOCHS BIOS used by KVM and qemu


Authors:
--------
    Robert de Bath <rdebath@poboxes.com>
    Bruce Evans <bde@runx.oz.au>
    Linus Torvalds <torvalds@transmeta.com>
    H.J. Lu <hjl@nynexst.com>

%package -n dev86
Summary:        8086 Development Suite
Requires:       bin86 
Group:          Development/Languages/Other

%description -n dev86
This package contains tools for generating Elks/8086 programs and the
Elksemu for execution of these programs in Linux.



Authors:
--------
    Robert de Bath <rdebath@poboxes.com>
    Bruce Evans <bde@runx.oz.au>
    Linus Torvalds <torvalds@transmeta.com>
    H.J. Lu <hjl@nynexst.com>

%prep
%setup -n dev86-%{version}
%patch
%patch2 -p1 -b .noelks
%ifarch x86_64
%patch3 -p1 -b .x86_64
%endif

%build
make GCCFLAG="$RPM_OPT_FLAGS -fno-strict-aliasing"

%install
rm -rf $RPM_BUILD_ROOT
make install DIST=$RPM_BUILD_ROOT PREFIX=/usr MANDIR=/usr/share/man \
	LIBDIR=%_libdir/bcc \
	INCLDIR=%_libdir/bcc
make other
make install-other DIST=$RPM_BUILD_ROOT MANDIR=/usr/share/man
mv bootblocks/README bootblocks/README.bootblocks
mv copt/README copt/README.copt
mv dis88/README dis88/README.dis88
mv unproto/README unproto/README.unproto 
mv bin86/README bin86/README.bin86
mkdir $RPM_BUILD_ROOT/%_libdir/bcc/kinclude
cp -a libc/kinclude/arch $RPM_BUILD_ROOT/%_libdir/bcc/kinclude
cp -a libc/kinclude/linuxmt $RPM_BUILD_ROOT/%_libdir/bcc/kinclude
%if 0%suse_version > 1020
%fdupes %buildroot
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README
/usr/bin/as86
/usr/bin/ld86
/usr/bin/nm86
/usr/bin/objdump86
/usr/bin/size86
%doc /usr/share/man/man1/as86.1.gz
%doc /usr/share/man/man1/ld86.1.gz

%files -n dev86
%defattr(-,root,root)
%doc MAGIC Contributors bootblocks/README.bootblocks copt/README.copt
%doc dis88/README.dis88
%doc unproto/README.unproto bin86/README-0.4
%doc bin86/README.bin86 bin86/ChangeLog
/usr/bin/ar86
/usr/bin/bcc
/usr/bin/dis86
/usr/bin/makeboot
%_libdir/bcc
%doc /usr/share/man/man1/bcc.1.gz
%doc /usr/share/man/man1/dis86.1.gz
%exclude /usr/share/man/man1/elks.1.gz
%exclude /usr/share/man/man1/elksemu.1.gz

%changelog
* Thu Feb 21 2008 bk@suse.de
- support build native on x86_64: no need for glibc-32bit on x86_64
- don't build elks (not happy on x86_64, from fc: no elks since fc7)
openSUSE Build Service is sponsored by