Blob Blame History Raw
# spec file for package asl
# 
# Copyright (c) 2006 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.
#
# Spec file for Fedora modified by Eric Smith <eric@brouhaha.com>

%global patchlevel bld92

Name:           asl
URL:            http://john.ccac.rwth-aachen.de:8000/as/index.html
Version:        1.42
Release:        0.19.%{patchlevel}%{?dist}
Group:          Development/Languages
License:        GPLv2+
Summary:        Macro Assembler AS
Source:         http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current-142-%{patchlevel}.tar.bz2
Patch0:         asl-Makefile.def.patch
Patch1:         asl-sysdefs.h.patch
Patch2:         asl-install.sh.patch
Patch3:         asl-Makefile-DESTDIR.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  tex(latex)
%if 0%{?fedora} > 18 || 0%{?rhel} > 6
BuildRequires:  tex(german.sty)
%endif


%description
AS is a portable macro cross-assembler for a variety of
microprocessors and controllers. Although it is mainly targeted at
embedded processors and single-board computers, CPU families that are
used in workstations and PCs in the target list.

%prep
# It's a shame that the directory name has 142 instead of 1.42, and Bld82
# instead of bld82. Makes use of variable substitution difficult.
# Also, sometimes the directory name is just "asl-current"
#%setup -q -n asl-142-Bld82
%setup -q -n asl-current

%patch0 -p0 -b .m-def
%patch1 -p0 -b .sysdefs
%patch2 -p1 -b .install
%patch3 -p0 -b .destdir

%build
# make seems to have problems with %{_smp_mflags}
make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# make docs isn't SMP-safe, so can't use %{_smp_mflags}
make docs

%check
make test

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# convert doc files from ISO-8859-1 to UTF-8 encoding
for f in changelog doc/as-EN.txt doc/as-DE.txt
do
  iconv -fiso88591 -tutf8 $f >$f.new
  touch -r $f $f.new
  mv $f.new $f
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_bindir}/asl
%{_bindir}/alink
%{_bindir}/p2bin
%{_bindir}/p2hex
%{_bindir}/pbind
%{_bindir}/plist
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/include/
%{_datadir}/%{name}/lib/
%{_mandir}/man1/asl.1*
%{_mandir}/man1/p2bin.1*
%{_mandir}/man1/p2hex.1*
%{_mandir}/man1/pbind.1*
%{_mandir}/man1/plist.1*
%{_mandir}/man1/alink.1*
%doc COPYING README README.LANGS TODO BENCHES changelog
%doc doc/as-EN.html doc/as-EN.txt doc/as-EN.ps doc/as-EN.pdf doc/as-EN.dvi
%lang(de) %doc doc/as-DE.html doc/as-DE.txt doc/as-DE.ps doc/as-DE.pdf doc/as-DE.dvi

%changelog -n asl
* Sat Mar 08 2014 Eric Smith <spacewar@gmail.com> 1.42-0.19.bld92
- Updated to latest upstream snapshot, which fixes a problem with
  string quoting.

* Wed Mar 05 2014 Eric Smith <spacewar@gmail.com> 1.42-0.18.bld91
- Fixed problem building on EL6; don't require tex(german.sty) on EL6.

* Wed Mar 05 2014 Eric Smith <spacewar@gmail.com> 1.42-0.17.bld91
- Updated to latest upstream snapshot.

* Thu Aug 15 2013 Eric Smith <spacewar@gmail.com> 1.42-0.16.bld89
- Updated to latest upstream snapshot.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.42-0.15.bld88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Jun 06 2013 Eric Smith <spacewar@gmail.com> 1.42-0.14.bld88
- Updated to latest upstream snapshot.

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.42-0.13.bld84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Oct 29 2012 Eric Smith <eric@brouhaha.com> 1.42-0.12.bld84
- Updated to latest upstream snapshot.
- Added BuildRequires for tex(german.sty), formerly part of texlive-texmf,
  but post-F18 moved into texlive-german.

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.42-0.11.bld83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Jun 06 2012 Eric Smith <eric@brouhaha.com> 1.42-0.11.bld83
- updated to latest upstream snapshot

* Sat Jan 21 2012 Eric Smith <eric@brouhaha.com> 1.42-0.10.bld82
- updated to latest upstream snapshot

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.42-0.9.bld81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Nov 10 2011 Eric Smith <eric@brouhaha.com> 1.42-0.8.bld81
- updated to latest upstream snapshot

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.42-0.7.bld79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jan 02 2011 Eric Smith <eric@brouhaha.com> 1.42-0.6.bld79
- updated to latest upstream snapshot
- upstream has removed doc_DE/dina4.sty, so we no longer need to use
  a cleaned tarball

* Sat Apr 24 2010 Eric Smith <eric@brouhaha.com> 1.42-0.5.bld77
- rebuilding because cvs-import.sh failed to import one patch for F-12

* Wed Apr 21 2010 Eric Smith <eric@brouhaha.com> 1.42-0.4.bld77
- use cleaned source tarball until upstream removes doc_DE/dina4.sty
- removed strcpy() patch

* Tue Apr 20 2010 Eric Smith <eric@brouhaha.com> 1.42-0.3.bld77
- updated to latest upstream snapshot
- removed doc_DE/dina4.sty due to unacceptable license
- added lang tag for de docs
- changed BuildRequires for latex to a virtual provides name

* Mon Apr 12 2010 Eric Smith <eric@brouhaha.com> 1.42-0.2.bld75
- removed obsolete PPC64 patch

* Sun Apr 11 2010 Eric Smith <eric@brouhaha.com> 1.42-0.1.bld75
- spec based on earlier review request 240807
- updated to latest upstream
- fixed strcpy() usage bug in KillPrefBlanks