2003-08-30 05:03:44 +08:00
|
|
|
# $Id$
|
2002-05-01 04:58:18 +08:00
|
|
|
Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
|
|
|
|
Name: nasm
|
2002-05-04 13:14:03 +08:00
|
|
|
Version: @@VERSION@@
|
2002-05-01 04:58:18 +08:00
|
|
|
Release: 1
|
2007-09-05 14:48:38 +08:00
|
|
|
License: LGPL
|
2002-05-01 04:58:18 +08:00
|
|
|
Group: Development/Languages
|
2002-05-04 13:14:03 +08:00
|
|
|
Source: ftp://download.sourceforge.net/pub/sourceforge/nasm/nasm-%{version}.tar.bz2
|
2003-08-30 03:50:25 +08:00
|
|
|
URL: http://nasm.sourceforge.net/
|
2002-05-01 04:58:18 +08:00
|
|
|
BuildRoot: /tmp/rpm-build-nasm
|
|
|
|
Prefix: /usr
|
2002-05-04 13:14:03 +08:00
|
|
|
BuildPrereq: perl
|
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
|
|
|
|
%setup
|
|
|
|
|
|
|
|
%build
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr
|
|
|
|
make everything
|
|
|
|
|
|
|
|
%install
|
2002-05-04 13:14:03 +08:00
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
2002-05-01 04:58:18 +08:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"
|
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/usr/bin
|
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/usr/man/man1
|
2003-08-30 05:03:44 +08:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"/%{_infodir}
|
2002-05-01 04:58:18 +08:00
|
|
|
DOC="$RPM_BUILD_ROOT"/usr/doc/nasm-%{version}
|
|
|
|
mkdir -p "$DOC"
|
|
|
|
mkdir -p "$DOC"/rdoff
|
|
|
|
rm -f "$RPM_BUILD_ROOT"/usr/info/nasm.*
|
2003-08-30 05:03:44 +08:00
|
|
|
make INSTALLROOT="$RPM_BUILD_ROOT" \
|
|
|
|
docdir=/usr/doc/nasm-%{version} \
|
|
|
|
infodir=%{_infodir} \
|
|
|
|
install_everything
|
|
|
|
gzip -9 "$RPM_BUILD_ROOT"/%{_infodir}/nasm.*
|
2002-05-01 04:58:18 +08:00
|
|
|
gzip -9 "$DOC"/*.txt "$DOC"/*.ps
|
2002-05-04 13:14:03 +08:00
|
|
|
cp AUTHORS CHANGES COPYING README TODO doc/*.doc "$DOC"
|
|
|
|
cp rdoff/README "$DOC"/rdoff
|
|
|
|
cp rdoff/doc/* "$DOC"/rdoff
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
|
|
|
|
%post doc
|
2003-08-30 05:03:44 +08:00
|
|
|
/sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir
|
2002-05-01 04:58:18 +08:00
|
|
|
|
|
|
|
%preun doc
|
|
|
|
if [ $1 = 0 ]; then
|
2003-08-30 05:03:44 +08:00
|
|
|
/sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir
|
2002-05-01 04:58:18 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%attr(-,root,root) /usr/bin/nasm
|
|
|
|
%attr(-,root,root) /usr/bin/ndisasm
|
2002-05-04 13:14:03 +08:00
|
|
|
%attr(-,root,root) %doc /usr/man/man1/nasm.1*
|
|
|
|
%attr(-,root,root) %doc /usr/man/man1/ndisasm.1*
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2003-08-30 05:03:44 +08:00
|
|
|
%files doc
|
|
|
|
%attr(-,root,root) %doc %{_infodir}/nasm.info*.gz
|
|
|
|
%attr(-,root,root) %doc /usr/doc/nasm-%{version}/*
|
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
%files rdoff
|
|
|
|
%attr(-,root,root) /usr/bin/ldrdf
|
|
|
|
%attr(-,root,root) /usr/bin/rdf2bin
|
|
|
|
%attr(-,root,root) /usr/bin/rdf2com
|
2003-08-30 05:03:44 +08:00
|
|
|
%attr(-,root,root) /usr/bin/rdf2ihx
|
2002-05-01 04:58:18 +08:00
|
|
|
%attr(-,root,root) /usr/bin/rdfdump
|
|
|
|
%attr(-,root,root) /usr/bin/rdflib
|
|
|
|
%attr(-,root,root) /usr/bin/rdx
|
|
|
|
%attr(-,root,root) %doc /usr/doc/nasm-%{version}/rdoff/*
|