2007-10-20 01:44:56 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
2007-09-23 07:35:11 +08:00
|
|
|
%define nasm_version @@NASM_VER@@
|
2002-05-01 04:58:18 +08:00
|
|
|
Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
|
|
|
|
Name: nasm
|
2007-09-23 07:35:11 +08:00
|
|
|
Version: @@NASM_MANGLED_VER@@
|
2002-05-01 04:58:18 +08:00
|
|
|
Release: 1
|
2009-07-07 02:14:38 +08:00
|
|
|
License: BSD
|
2002-05-01 04:58:18 +08:00
|
|
|
Group: Development/Languages
|
2009-05-27 07:06:57 +08:00
|
|
|
Source: http://www.nasm.us/pub/nasm/releasebuilds/%{nasm_version}/nasm-%{nasm_version}.tar.bz2
|
|
|
|
URL: http://www.nasm.us/
|
2002-05-01 04:58:18 +08:00
|
|
|
BuildRoot: /tmp/rpm-build-nasm
|
2007-09-23 07:35:11 +08:00
|
|
|
Prefix: %{_prefix}
|
2002-05-04 13:14:03 +08:00
|
|
|
BuildPrereq: perl
|
2007-10-20 01:44:56 +08:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
Requires(post): /sbin/install-info
|
|
|
|
Requires(preun): /sbin/install-info
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Extensive documentation for NASM
|
|
|
|
Group: Development/Languages
|
|
|
|
Prereq: /sbin/install-info
|
|
|
|
|
|
|
|
%package rdoff
|
|
|
|
Summary: Tools for the RDOFF binary format, sometimes used with NASM.
|
|
|
|
Group: Development/Tools
|
|
|
|
|
|
|
|
%description
|
|
|
|
NASM is the Netwide Assembler, a free portable assembler for the Intel
|
|
|
|
80x86 microprocessor series, using primarily the traditional Intel
|
|
|
|
instruction mnemonics and syntax.
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Extensive documentation for the Netwide Assembler, NASM, in HTML,
|
|
|
|
info, PostScript and text formats.
|
|
|
|
|
|
|
|
%description rdoff
|
|
|
|
Tools for the operating-system independent RDOFF binary format, which
|
|
|
|
is sometimes used with the Netwide Assembler (NASM). These tools
|
|
|
|
include linker, library manager, loader, and information dump.
|
|
|
|
|
|
|
|
%prep
|
2007-10-20 01:44:56 +08:00
|
|
|
%setup -q -n nasm-%{nasm_version}
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%build
|
2007-09-23 07:35:11 +08:00
|
|
|
%configure
|
2007-09-23 07:44:56 +08:00
|
|
|
make %{?_smp_mflags} everything
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%install
|
2002-05-04 13:14:03 +08:00
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
2007-09-23 07:35:11 +08:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/%{_bindir}
|
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1
|
2003-08-30 05:03:44 +08:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/%{_infodir}
|
2007-10-20 01:44:56 +08:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/usr/tempdoc
|
|
|
|
%makeinstall install_everything docdir="$RPM_BUILD_ROOT"/usr/tempdoc
|
|
|
|
cp -a $RPM_BUILD_ROOT/usr/tempdoc/html \
|
|
|
|
$RPM_BUILD_ROOT/usr/tempdoc/nasmdoc.{ps,txt,pdf} .
|
|
|
|
gzip -9f nasmdoc.{ps,txt}
|
|
|
|
# remove unpackaged files from the buildroot
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/tempdoc
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
|
2007-10-20 01:44:56 +08:00
|
|
|
%post
|
|
|
|
/sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir || :
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2007-10-20 01:44:56 +08:00
|
|
|
%preun
|
2002-05-01 04:58:18 +08:00
|
|
|
if [ $1 = 0 ]; then
|
2007-10-20 01:44:56 +08:00
|
|
|
/sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir || :
|
2002-05-01 04:58:18 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
2007-10-20 01:44:56 +08:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS CHANGES README TODO
|
|
|
|
%{_bindir}/nasm
|
|
|
|
%{_bindir}/ndisasm
|
2007-12-27 02:18:01 +08:00
|
|
|
%{_mandir}/man1/nasm.1*
|
|
|
|
%{_mandir}/man1/ndisasm.1*
|
2007-10-20 01:44:56 +08:00
|
|
|
%{_infodir}/nasm.info*.gz
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2003-08-30 05:03:44 +08:00
|
|
|
%files doc
|
2007-10-20 01:44:56 +08:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc html nasmdoc.txt.gz nasmdoc.pdf nasmdoc.ps.gz
|
2003-08-30 05:03:44 +08:00
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
%files rdoff
|
2007-10-20 01:44:56 +08:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/ldrdf
|
|
|
|
%{_bindir}/rdf2bin
|
|
|
|
%{_bindir}/rdf2com
|
|
|
|
%{_bindir}/rdf2ihx
|
2009-07-04 12:12:05 +08:00
|
|
|
%{_bindir}/rdf2ith
|
|
|
|
%{_bindir}/rdf2srec
|
2007-10-20 01:44:56 +08:00
|
|
|
%{_bindir}/rdfdump
|
|
|
|
%{_bindir}/rdflib
|
|
|
|
%{_bindir}/rdx
|
2007-12-27 02:18:01 +08:00
|
|
|
%{_mandir}/man1/ldrdf.1*
|
|
|
|
%{_mandir}/man1/rdf2bin.1*
|
|
|
|
%{_mandir}/man1/rdf2com.1*
|
2009-07-04 12:12:05 +08:00
|
|
|
%{_mandir}/man1/rdf2ihx.1*
|
|
|
|
%{_mandir}/man1/rdf2ith.1*
|
|
|
|
%{_mandir}/man1/rdf2srec.1*
|
2007-12-27 02:18:01 +08:00
|
|
|
%{_mandir}/man1/rdfdump.1*
|
|
|
|
%{_mandir}/man1/rdflib.1*
|
|
|
|
%{_mandir}/man1/rdx.1*
|