%define nasm_version @@NASM_VER@@ Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax Name: nasm Version: @@NASM_MANGLED_VER@@ Release: 1 License: LGPL Group: Development/Languages Source: ftp://download.sourceforge.net/pub/sourceforge/nasm/nasm-%{nasm_version}.tar.bz2 URL: http://nasm.sourceforge.net/ BuildRoot: /tmp/rpm-build-nasm Prefix: %{_prefix} BuildPrereq: perl %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 -n nasm-%{nasm_version} %build %configure make %{?_smp_mflags} everything %install rm -rf "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT" mkdir -p "$RPM_BUILD_ROOT"/%{_bindir} mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1 mkdir -p "$RPM_BUILD_ROOT"/%{_infodir} DOC="$RPM_BUILD_ROOT"%{_docdir} mkdir -p "$DOC" mkdir -p "$DOC"/rdoff rm -f "$RPM_BUILD_ROOT"/%{_infodir}/nasm.* make INSTALLROOT="$RPM_BUILD_ROOT" \ docdir=%{_docdir} \ infodir=%{_infodir} \ install_everything gzip -9 "$RPM_BUILD_ROOT"/%{_infodir}/nasm.* gzip -9 "$DOC"/*.txt "$DOC"/*.ps cp AUTHORS CHANGES COPYING README TODO doc/*.doc "$DOC" cp rdoff/README "$DOC"/rdoff cp rdoff/doc/* "$DOC"/rdoff %clean rm -rf "$RPM_BUILD_ROOT" %post doc /sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir %preun doc if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir fi %files %attr(-,root,root) %{_bindir}/nasm %attr(-,root,root) %{_bindir}/ndisasm %attr(-,root,root) %doc %{_mandir}/man1/nasm.1* %attr(-,root,root) %doc %{_mandir}/man1/ndisasm.1* %files doc %attr(-,root,root) %doc %{_infodir}/nasm.info*.gz %attr(-,root,root) %doc %{_docdir}/* %files rdoff %attr(-,root,root) %{_bindir}/ldrdf %attr(-,root,root) %{_bindir}/rdf2bin %attr(-,root,root) %{_bindir}/rdf2com %attr(-,root,root) %{_bindir}/rdf2ihx %attr(-,root,root) %{_bindir}/rdfdump %attr(-,root,root) %{_bindir}/rdflib %attr(-,root,root) %{_bindir}/rdx %attr(-,root,root) %doc %{_docdir}/rdoff/*