Makefile.in: add ttfmetrics.ph as a dependency
[nasm.git] / nasm.spec.in
blob0cd21c73f2b391c3a0b8b678be6114f2b55472d8
1 # -*- coding: utf-8 -*-
2 %define nasm_version @@NASM_VER@@
3 Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
4 Name: nasm
5 Version: @@NASM_MANGLED_VER@@
6 Release: 0
7 License: BSD
8 Group: Development/Languages
9 Source: http://www.nasm.us/pub/nasm/releasebuilds/%{nasm_version}/nasm-%{nasm_version}.tar.xz
10 URL: http://www.nasm.us/
11 BuildRoot: /tmp/rpm-build-nasm
12 Prefix: %{_prefix}
13 BuildRequires: perl, asciidoc, xmlto, ghostscript, texinfo, perl-Font-TTF, \
14 adobe-source-sans-pro-fonts, adobe-source-code-pro-fonts
15 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17 %package doc
18 Summary: Extensive documentation for NASM
19 Group: Development/Languages
20 BuildRequires: ghostscript, texinfo
21 Requires(post): /sbin/install-info
22 Requires(preun): /sbin/install-info
24 %package rdoff
25 Summary: Tools for the RDOFF binary format, sometimes used with NASM.
26 Group: Development/Tools
28 %description
29 NASM is the Netwide Assembler, a free portable assembler for the Intel
30 80x86 microprocessor series, using primarily the traditional Intel
31 instruction mnemonics and syntax.
33 %description doc
34 Extensive documentation for the Netwide Assembler, NASM, in HTML,
35 info, PostScript and text formats.
37 %description rdoff
38 Tools for the operating-system independent RDOFF binary format, which
39 is sometimes used with the Netwide Assembler (NASM). These tools
40 include linker, library manager, loader, and information dump.
42 %prep
43 %setup -q -n nasm-%{nasm_version}
45 %build
46 %configure
47 make %{?_smp_mflags} everything
49 %install
50 rm -rf "$RPM_BUILD_ROOT"
51 mkdir -p "$RPM_BUILD_ROOT"/%{_bindir}
52 mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1
53 mkdir -p "$RPM_BUILD_ROOT"/%{_infodir}
54 mkdir -p "$RPM_BUILD_ROOT"/usr/tempdoc
55 %makeinstall install_everything docdir="$RPM_BUILD_ROOT"/usr/tempdoc
56 cp -a $RPM_BUILD_ROOT/usr/tempdoc/html \
57 $RPM_BUILD_ROOT/usr/tempdoc/nasmdoc.{ps,txt,pdf} .
58 gzip -9f nasmdoc.{ps,txt}
59 # remove unpackaged files from the buildroot
60 rm -rf $RPM_BUILD_ROOT%{_prefix}/tempdoc
62 %clean
63 rm -rf "$RPM_BUILD_ROOT"
65 %post
66 /sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir || :
68 %preun
69 if [ $1 = 0 ]; then
70 /sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir || :
73 %files
74 %defattr(-,root,root)
75 %doc AUTHORS CHANGES README TODO
76 %{_bindir}/nasm
77 %{_bindir}/ndisasm
78 %{_mandir}/man1/nasm.1*
79 %{_mandir}/man1/ndisasm.1*
80 %{_infodir}/nasm.info*.gz
82 %files doc
83 %defattr(-,root,root)
84 %doc html nasmdoc.txt.gz nasmdoc.pdf nasmdoc.ps.gz
86 %files rdoff
87 %defattr(-,root,root)
88 %{_bindir}/ldrdf
89 %{_bindir}/rdf2bin
90 %{_bindir}/rdf2com
91 %{_bindir}/rdf2ihx
92 %{_bindir}/rdf2ith
93 %{_bindir}/rdf2srec
94 %{_bindir}/rdfdump
95 %{_bindir}/rdflib
96 %{_bindir}/rdx
97 %{_mandir}/man1/ldrdf.1*
98 %{_mandir}/man1/rdf2bin.1*
99 %{_mandir}/man1/rdf2com.1*
100 %{_mandir}/man1/rdf2ihx.1*
101 %{_mandir}/man1/rdf2ith.1*
102 %{_mandir}/man1/rdf2srec.1*
103 %{_mandir}/man1/rdfdump.1*
104 %{_mandir}/man1/rdflib.1*
105 %{_mandir}/man1/rdx.1*