NASM 0.99.05
[nasm/avx512.git] / nasm.spec.in
blobb00bf4bc248889f9c839dd90e109404e4d791a54
1 %define nasm_version @@NASM_VER@@
2 Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
3 Name: nasm
4 Version: @@NASM_MANGLED_VER@@
5 Release: 1
6 License: LGPL
7 Group: Development/Languages
8 Source: ftp://download.sourceforge.net/pub/sourceforge/nasm/nasm-%{nasm_version}.tar.bz2
9 URL: http://nasm.sourceforge.net/
10 BuildRoot: /tmp/rpm-build-nasm
11 Prefix: %{_prefix}
12 BuildPrereq: perl
14 %package doc
15 Summary: Extensive documentation for NASM
16 Group: Development/Languages
17 Prereq: /sbin/install-info
19 %package rdoff
20 Summary: Tools for the RDOFF binary format, sometimes used with NASM.
21 Group: Development/Tools
23 %description
24 NASM is the Netwide Assembler, a free portable assembler for the Intel
25 80x86 microprocessor series, using primarily the traditional Intel
26 instruction mnemonics and syntax.
28 %description doc
29 Extensive documentation for the Netwide Assembler, NASM, in HTML,
30 info, PostScript and text formats.
32 %description rdoff
33 Tools for the operating-system independent RDOFF binary format, which
34 is sometimes used with the Netwide Assembler (NASM). These tools
35 include linker, library manager, loader, and information dump.
37 %prep
38 %setup -n nasm-%{nasm_version}
40 %build
41 %configure
42 make %{?_smp_mflags} everything
44 %install
45 rm -rf "$RPM_BUILD_ROOT"
46 mkdir -p "$RPM_BUILD_ROOT"
47 mkdir -p "$RPM_BUILD_ROOT"/%{_bindir}
48 mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1
49 mkdir -p "$RPM_BUILD_ROOT"/%{_infodir}
50 DOC="$RPM_BUILD_ROOT"%{_docdir}
51 mkdir -p "$DOC"
52 mkdir -p "$DOC"/rdoff
53 rm -f "$RPM_BUILD_ROOT"/%{_infodir}/nasm.*
54 make INSTALLROOT="$RPM_BUILD_ROOT" \
55 docdir=%{_docdir} \
56 infodir=%{_infodir} \
57 install_everything
58 gzip -9 "$RPM_BUILD_ROOT"/%{_infodir}/nasm.*
59 gzip -9 "$DOC"/*.txt "$DOC"/*.ps
60 cp AUTHORS CHANGES COPYING README TODO doc/*.doc "$DOC"
61 cp rdoff/README "$DOC"/rdoff
62 cp rdoff/doc/* "$DOC"/rdoff
64 %clean
65 rm -rf "$RPM_BUILD_ROOT"
67 %post doc
68 /sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir
70 %preun doc
71 if [ $1 = 0 ]; then
72 /sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir
75 %files
76 %attr(-,root,root) %{_bindir}/nasm
77 %attr(-,root,root) %{_bindir}/ndisasm
78 %attr(-,root,root) %doc %{_mandir}/man1/nasm.1*
79 %attr(-,root,root) %doc %{_mandir}/man1/ndisasm.1*
81 %files doc
82 %attr(-,root,root) %doc %{_infodir}/nasm.info*.gz
83 %attr(-,root,root) %doc %{_docdir}/*
85 %files rdoff
86 %attr(-,root,root) %{_bindir}/ldrdf
87 %attr(-,root,root) %{_bindir}/rdf2bin
88 %attr(-,root,root) %{_bindir}/rdf2com
89 %attr(-,root,root) %{_bindir}/rdf2ihx
90 %attr(-,root,root) %{_bindir}/rdfdump
91 %attr(-,root,root) %{_bindir}/rdflib
92 %attr(-,root,root) %{_bindir}/rdx
93 %attr(-,root,root) %doc %{_docdir}/rdoff/*