File jwasm.spec of Package jwasm

# spec file for package jwasm
# Copyright (c) 2013 Peter Conrad
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:		jwasm
Version:	2.11a
Release:	1
License:	Watcom-1.0
Summary:	MASM-compatible assembler
Group:		Development/Languages/Other
Patch:		jwasm-undef.patch
Patch1:		jwasm-bof.patch
BuildRequires:  unzip dos2unix
BuildRoot:	%{_tmppath}/%{name}-%{version}-build

JWasm is a free MASM-compatible assembler with these features:

* native support for output formats Intel OMF, MS Coff (32/64-bit),
  Elf (32/64-bit), Binary, Windows PE (32/64-bit) and DOS MZ.
* Instructions up to AVX are supported.
* JWasm is written in C. The source is portable and has successfully been
  tested with Open Watcom, MS VC, GCC and more.
* C header files can be converted to include files for JWasm with h2incX.
* JWasm's source code is released under the Sybase Open Watcom Public License,
  which allows free commercial and non-commercial use.

JWasm started as a fork of Open Watcom's Wasm in March 2008. Today, the part of
Wasm source lines still contained in JWasm is approximately 20%.

%setup -q -c %{name}-%{version}
%patch -p1
%patch1 -p1
%__sed -i '/instruction table/a#include "expreval.h"' H/parser.h

dos2unix *.txt Doc/*
%ifarch x86_64
%__make DEBUG=1 extra_c_flags="%{optflags} -DDEBUG_OUT -fno-strict-aliasing $IS_64" -f GccUnix.mak GccUnixD GccUnixD/omfint.o
%__make DEBUG=1 extra_c_flags="%{optflags} -DDEBUG_OUT $IS_64" -f GccUnix.mak %{?_smp_mflags}

%__install -dm 755 "%{buildroot}%{_bindir}"
%__install -m 0755 GccUnixD/jwasm "%{buildroot}%{_bindir}/"


%doc *.txt Doc/*