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