blob: c5475134378f1824a484cf75dd4b986105c084c3 [file] [log] [blame]
H. Peter Anvin41bf8002002-04-30 20:58:18 +00001Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
2Name: nasm
3Version: 0.98
4Release: 1
5Copyright: Freely Distributable
6Group: Development/Languages
7Source: ftp://ftp.us.kernel.org/pub/software/devel/nasm/source/nasm-%{version}.tar.gz
8URL: http://www.cryogen.com/Nasm/
9BuildRoot: /tmp/rpm-build-nasm
10Prefix: /usr
11
12%package doc
13Summary: Extensive documentation for NASM
14Group: Development/Languages
15Prereq: /sbin/install-info
16
17%package rdoff
18Summary: Tools for the RDOFF binary format, sometimes used with NASM.
19Group: Development/Tools
20
21%description
22NASM is the Netwide Assembler, a free portable assembler for the Intel
2380x86 microprocessor series, using primarily the traditional Intel
24instruction mnemonics and syntax.
25
26%description doc
27Extensive documentation for the Netwide Assembler, NASM, in HTML,
28info, PostScript and text formats.
29
30%description rdoff
31Tools for the operating-system independent RDOFF binary format, which
32is sometimes used with the Netwide Assembler (NASM). These tools
33include linker, library manager, loader, and information dump.
34
35%prep
36%setup
37
38%build
39CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s ./configure --prefix=/usr
40make everything
41
42%install
43mkdir -p "$RPM_BUILD_ROOT"
44mkdir -p "$RPM_BUILD_ROOT"/usr/bin
45mkdir -p "$RPM_BUILD_ROOT"/usr/man/man1
46mkdir -p "$RPM_BUILD_ROOT"/usr/info
47DOC="$RPM_BUILD_ROOT"/usr/doc/nasm-%{version}
48rm -rf "$DOC"
49mkdir -p "$DOC"
50mkdir -p "$DOC"/rdoff
51rm -f "$RPM_BUILD_ROOT"/usr/info/nasm.*
52make INSTALLROOT="$RPM_BUILD_ROOT" docdir=/usr/doc/nasm-%{version} install_everything
53gzip -9 "$RPM_BUILD_ROOT"/usr/info/nasm.*
54gzip -9 "$DOC"/*.txt "$DOC"/*.ps
55cp Changes Licence MODIFIED Readme Wishlist *.doc changed.asm "$DOC"
56cp rdoff/README rdoff/Changes "$DOC"/rdoff
57
58%clean
59rm -rf "$RPM_BUILD_ROOT"
60
61%post doc
62/sbin/install-info "$RPM_INSTALL_PREFIX"/info/nasm.info.gz "$RPM_INSTALL_PREFIX"/info/dir
63
64%preun doc
65if [ $1 = 0 ]; then
66 /sbin/install-info --delete "$RPM_INSTALL_PREFIX"/info/nasm.info.gz "$RPM_INSTALL_PREFIX"/info/dir
67fi
68
69%files
70%attr(-,root,root) /usr/bin/nasm
71%attr(-,root,root) /usr/bin/ndisasm
72%attr(-,root,root) %doc /usr/man/man1/nasm.1
73%attr(-,root,root) %doc /usr/man/man1/ndisasm.1
74%attr(-,root,root) %doc /usr/doc/nasm-%{version}/Licence
75
76%files doc
77%attr(-,root,root) %doc /usr/info/nasm.info*.gz
78%attr(-,root,root) %doc /usr/doc/nasm-%{version}/*
79
80%files rdoff
81%attr(-,root,root) /usr/bin/ldrdf
82%attr(-,root,root) /usr/bin/rdf2bin
83%attr(-,root,root) /usr/bin/rdf2com
84%attr(-,root,root) /usr/bin/rdfdump
85%attr(-,root,root) /usr/bin/rdflib
86%attr(-,root,root) /usr/bin/rdx
87%attr(-,root,root) %doc /usr/doc/nasm-%{version}/rdoff/*