File bin86.spec of Package vt.bin86

#
# 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
License:        --- several copyrights ---
Group:          Development/Languages/Other
Autoreqprov:    on
Version:        0.16.17
Release:        25
Summary:        An 8086 Assembler and Linker
URL:            http://www.cix.co.uk/~mayday/
Source:         Dev86src-%{version}.tar.bz2
Source1:        rpmlintrc
# Patch:          dev86-%{version}.dif
Patch0:         dev86-%{version}.dif
Patch1:         dev86-%{version}-x86_64_fixes.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define __bcclibdir %{_libdir}/bcc

%description
An 8086 assembler and linker.



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

%debug_package
%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
%patch0
%ifarch amd64 x86_64 ia32e em64t
%patch1
%endif

%build
# make GCCFLAG="$RPM_OPT_FLAGS -fno-strict-aliasing"
make GCCFLAG="$RPM_OPT_FLAGS -fno-strict-aliasing" LIBDIR=%{__bcclibdir} \
	INCLDIR=%{__bcclibdir}
## Problem 64bit SLES9 (Behebung?):
## + cd dev86-0.16.17
## + make 'GCCFLAG=-O2 -g -fno-strict-aliasing' LIBDIR=/usr/lib64/bcc INCLDIR=/usr/lib64/bcc
## make[1]: Entering directory `/usr/src/packages/BUILD/dev86-0.16.17'
## cc -O2 -m486 -fno-strength-reduce -DGNUMAKE -c ifdef.c
## `-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.


%install
# rm -rf $RPM_BUILD_ROOT
# make install DIST=$RPM_BUILD_ROOT PREFIX=/usr MANDIR=/usr/share/man
make install DIST=$RPM_BUILD_ROOT PREFIX=/usr MANDIR=/usr/share/man \
	LIBDIR=%{__bcclibdir} INCLDIR=%{__bcclibdir}
make other
# make install-other DIST=$RPM_BUILD_ROOT MANDIR=/usr/share/man
make install-other DIST=$RPM_BUILD_ROOT MANDIR=/usr/share/man \
	LIBDIR=%{__bcclibdir} INCLDIR=%{__bcclibdir}
mv bootblocks/README bootblocks/README.bootblocks
mv copt/README copt/README.copt
mv dis88/README dis88/README.dis88
mv elksemu/README elksemu/README.elksemu
mv unproto/README unproto/README.unproto 
mv bin86/README bin86/README.bin86
# mkdir $RPM_BUILD_ROOT/usr/lib/bcc/kinclude
# cp -a libc/kinclude/arch $RPM_BUILD_ROOT/usr/lib/bcc/kinclude
# cp -a libc/kinclude/linuxmt $RPM_BUILD_ROOT/usr/lib/bcc/kinclude
mkdir $RPM_BUILD_ROOT%{__bcclibdir}/kinclude
cp -a libc/kinclude/arch $RPM_BUILD_ROOT%{__bcclibdir}/kinclude
cp -a libc/kinclude/linuxmt $RPM_BUILD_ROOT%{__bcclibdir}/kinclude

%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 elksemu/README.elksemu unproto/README.unproto bin86/README-0.4
%ifnarch amd64 x86_64 ia32e em64t
%doc elksemu/README.elksemu
%endif
%doc unproto/README.unproto bin86/README-0.4
%doc bin86/README.bin86 bin86/ChangeLog
%ifnarch amd64 x86_64 ia32e em64t
/usr/bin/elksemu
%endif
/usr/bin/ar86
/usr/bin/bcc
/usr/bin/dis86
/usr/bin/makeboot
# /usr/lib/bcc
%{__bcclibdir}
%doc /usr/share/man/man1/bcc.1.gz
%doc /usr/share/man/man1/dis86.1.gz
%doc /usr/share/man/man1/elks.1.gz
%doc /usr/share/man/man1/elksemu.1.gz


%changelog
* Thu Jun 07 2007 - Marcus Hüwe <suse-tux@gmx.de>
- added my old %%changelog entry to the correct place
- update my spec patch to fit to the latest version
* Sat May 26 2007 - ro@suse.de
* Mon Apr 09 2007 Marcus Hüwe <suse-tux@gmx.de>
- disabled elksemu on x86_64 (it complains about missing sys/vm86.h which is
  not available on x86_64)
- other x86_64 fixes
- fixed spec for building on x86_64 (introduced %%{__bcclibdir} variable)
- removed "rm -rf \$RPM_BUILD_ROOT" from the %%install section
* Sun Jan 21 2007 - ro@suse.de
- update to 0.16.17 (thanks to rschiele)
  - Sorry forgot to flip this back: perror and strerror are back to using
  the /lib/liberror.txt file for all 8086 Elks modes. Only i386 has the
  file linked. Elksemu now traps accesses to this file and substitutes
  a fake.
  - Added vararg macros to new preprocessor.
  - Builtin CPP removed for __BCC__ compile, bcc-cc1 fit in 16bit but
  crashes. Thirty two bit works fine, gcc or bcc. (almost any 32bit.)
  - Added __BCC_VERSION__ macro, defined by bcc.c contains hex version no.
  - Bugfix for offsets generated by #asm when using -O option to bcc-cc1.
  Extra compile option ASM_USES_CALLEE_REGS.
  - Extra checking and bugfix for mixing char values with long shifts.
  - WARNING to distributions: I've altered the install scripts and paths
  you will want to check them.  Altered paths for bcc.c and normal
  installs, defaults should now be good for distributions where bcc is a
  cross compiler. If you set the PREFIX to / it'll install to suggested
  Native paths. As86_encap moved to LIBDIR.
  - I've altered 'perror' and 'strerror' to be normal when compiled for
  everything except libc_f.a. Only with that library will it look for the
  liberror.txt file and it now looks in "/lib/liberror.txt" only.
  This means there's no need to install it anywhere except ELKS itself.
  - Change -Mg option to use uclibc as glibc2 seems to have stopped working.
  - ar.c switch to using strerror.
  - Move elksemu, it's used like a shared library but is best treated like
  an emulator so it's now installed in DISTBIN. Also on Linux-386 it's
  compiled using the system compiler.
  - Use the POSIX -R argument to cp rather than the normal standard -r because
  some new systems have decided to stop supporting their '-r' option.
  - Oops, the constant error strings in the assembler were char pointers not
  char arrays, small waste of space.
  - Allow for Linux-2.6 32bit dev_t.
  - More changes so it compiles better on 'other' machines.
  Removed some GNU-Make'isms in the top header file.
  - It seems that CYGWin's problem with _P is inherited from BSD. It also
  seems most of my problems come from BSD recently, haven't they realised
  that they down own the 'Unix Standard' anymore and haven't since SYSV
  got popular.
  - Some changes for cygwin, it isn't quite as nasty as compiling for minix
  but it doesn't miss by much!
  - Compiling for the 'tcc' complier, nice and easy.
  - Hitting bcc.c again, bcc-cpp now the default.
  - Some bugfixes for DEC Alpha -- 64 bit longs!
  Constant folding still done with 64bit longs though.
  - The fopen function (and friends) is now a real function not a macro.
  - Ctype.h updated to ansi.
  - Libraries appear to compile properly with -O and -ansi now.
  - Copt's hash string table adjusted; should now have fewer pathological cases.
  - Order of copt's rule processing reversed; it now works from the top of a
  rule file to the bottom. Also comment lines may be include in the match
  lines. !BCC_EOS added to bcc-cc1 for 'end of statment'.
  - bcc-cc1's asm("") now works in declare mode too.
  - New independed cpp added, has both K&R and Ansi modes.
  Changes made to the embedded cpp too to try and fix some bad bits.
  - Conditional assembler added around push and pop of 'si' and 'di' if the
  optimiser (and as86's optimiser) are to be run.
  - Signed keyword added to bcc-cc1 for 'signed char' also works with other
  int types but is usually just a noiseword.
  - As86 macro syntax altered, you now don't have to include any brackets.
  - Gcc warnings in ar86 cleaned up.
  - Mk_dist now makes incremental patch files too.
  - Update magic file.
  - Various updates to the bios libc, the vt52 and ansi emulations are
  now seperated (and can be both included if needed) and don't have
  to be linked. Conio functions work properly in bios and msdos.
  - Added -v (version)
  - as86 and ld86 now delete their binary outputs if there were errors.
  - Added more 'set' commands generated by '#asm' lines. The new ones begin
  with '.' rather than '_' an are based off the 'bp' register rather than
  the 'sp' register.
  - Various unused, test and old document files removed.
  - as86 modified to use normal malloc routines - no longer has limited
  input file size.
  - as6809 repaired, appears to work.
  - as86 error display adjusted, some errors demoted to warnings.
  - Complete re-write of bcc.c driver program. Should now be easier to
  modify, does have more versatility so that things that were formerly
  compile time options are all run time.
  - #asm and #endasm now interact with statment processing inside functions.
  If statments and case labels no longer need special layout however #asm
  must be placed between statments now.
  - The __heap_top virtual constant added, allows the -H option to be used
  with the -d option in the linker.
  - Conio routines added, merged with bios_getc/bios_putc routines which
  now no longer exist under those names.
  - monitor.out now copes with very old zimages, like the memtest86 program,
  and has 'Retry' prompt for disk errors.
  - msdos.s and tarboot.s loading of non-a.out executables adjusted for
  dos BIN like files.
  - Standalone library startup adjusted to allow execution of a '-d'
  executable from DOS, if __argr.x.cflag is set this is running under
  DOS.
  - Compile for DOS again, disable cpm86 headers under DOS.
  - Minor bugfix for as86 binary output re sizeof(int)/K&R problem.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Sep 22 2005 - ro@suse.de
- fix implicit warnings
- do not strip during make install
* Sat Jul 16 2005 - meissner@suse.de
- fixed size of buffer passed to realpath.
* Wed Jan 19 2005 - ro@suse.de
- fixed more compiler warnings
* Tue Feb 03 2004 - kukuk@suse.de
- Fix compiler warnings
* Mon Oct 20 2003 - ro@suse.de
- use defattr
- don't build as root
* Wed Jun 18 2003 - ro@suse.de
- move buildroot entry to top in specfile
* Fri Jun 06 2003 - ro@suse.de
- pack include files
* Thu Jan 23 2003 - ro@suse.de
- downgrade to 0.16.0 since author claims 0.16.10 to be unstable
- use buildroot
* Mon Dec 16 2002 - ro@suse.de
- update to 0.16.10
- bzip source, add URL to specfile
* Sun Dec 01 2002 - ro@suse.de
- sys_errlist is deprecated, patch ar.c
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Sat Aug 24 2002 - ro@suse.de
- fix doc section for new cp behaviour
* Mon Sep 25 2000 - ro@suse.de
- sorted
* Wed Feb 09 2000 - ro@suse.de
- fixed prefix-path for bcc
* Mon Jan 17 2000 - ro@suse.de
- man to /usr/share/man
* Tue Dec 14 1999 - ro@suse.de
- build from full-source Dev86-0.14.9
- added subpackage dev86 containing elksemu and bcc
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Sun Sep 05 1999 - ro@suse.de
- updated to 0.14.9 with current src and manpages
* Thu Sep 10 1998 - ro@suse.de
- don't redeclare malloc for glibc
* Wed Apr 30 1997 - florian@suse.de
- update to version 0.4
openSUSE Build Service is sponsored by