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