227b498
Name:           xa
227b498
Version:        2.3.5
227b498
Release:        3%{?dist}
227b498
Summary:        6502/65816 cross-assembler
227b498
227b498
Group:          Development/Tools
227b498
License:        GPLv2+
227b498
URL:            http://www.floodgap.com/retrotech/xa/
227b498
Source0:        http://www.floodgap.com/retrotech/%{name}/dists/%{name}-%{version}.tar.gz
227b498
# fix conflict with recent glibc, reported in private email
227b498
Patch0:         %{name}-2.3.5-getline.patch
227b498
# update the build system, reported in private email
227b498
Patch1:         %{name}-2.3.5-make.patch
227b498
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
227b498
227b498
227b498
%description
227b498
xa is a high-speed, two-pass portable cross-assembler. It understands
227b498
mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507,
227b498
6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02)
227b498
and the 65816.
227b498
227b498
Key amongst its features:
227b498
227b498
    * C-like preprocessor (and understands cpp for additional feature support)
227b498
    * rich expression syntax and pseudo-op vocabulary
227b498
    * multiple character sets
227b498
    * binary linking
227b498
    * supports o65 relocatable objects with a full linker and relocation suite, 
227b498
      as well as "bare" plain binary object files
227b498
    * block structure for label scoping 
227b498
227b498
227b498
%prep
227b498
%setup -q
227b498
%patch0 -p1 -b .getline
227b498
%patch1 -p1 -b .make
227b498
227b498
# fix encoding
227b498
for f in ChangeLog
227b498
do
227b498
    iconv -f ISO-8859-1 -t UTF-8 < $f > $f.new
227b498
    touch -r $f $f.new
227b498
    mv $f.new $f
227b498
done
227b498
227b498
227b498
%build
227b498
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
227b498
227b498
227b498
%install
227b498
rm -rf $RPM_BUILD_ROOT
227b498
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} INSTALL="install -p"
227b498
227b498
227b498
%clean
227b498
rm -rf $RPM_BUILD_ROOT
227b498
227b498
227b498
%files
227b498
%defattr(-,root,root,-)
227b498
%doc COPYING ChangeLog README.1st doc/xa.txt
227b498
%{_bindir}/*
227b498
%{_mandir}/man1/*
227b498
227b498
227b498
%changelog
227b498
* Tue Apr 14 2009 Dan Horák <dan[at]danny.cz> - 2.3.5-3
227b498
- move the INSTALL override to "make install"
227b498
- comment the patches
227b498
227b498
* Tue Mar 31 2009 Dan Horák <dan[at]danny.cz> - 2.3.5-2
227b498
- don't use hardcoded /usr
227b498
- preserve timestamps when using "install"
227b498
227b498
* Sat Feb 21 2009 Dan Horák <dan[at]danny.cz> - 2.3.5-1
227b498
- initial Fedora version