nasm.spec.in: drop nasmdoc.ps.gz, compress .txt and .pdf with xz
[nasm.git] / nasm.spec.in
blob10d5a3f339059caf74c07826378c2fbb5106d676
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 BuildRequires: adobe-source-sans-pro-fonts, adobe-source-code-pro-fonts
15 BuildRequires: fontconfig, xz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 %package doc
19 Summary: Extensive documentation for NASM
20 Group: Development/Languages
21 BuildRequires: ghostscript, texinfo
22 Requires(post): /sbin/install-info
23 Requires(preun): /sbin/install-info
25 %package rdoff
26 Summary: Tools for the RDOFF binary format, sometimes used with NASM.
27 Group: Development/Tools
29 %description
30 NASM is the Netwide Assembler, a free portable assembler for the Intel
31 80x86 microprocessor series, using primarily the traditional Intel
32 instruction mnemonics and syntax.
34 %description doc
35 Extensive documentation for the Netwide Assembler, NASM, in HTML,
36 info, PostScript and text formats.
38 %description rdoff
39 Tools for the operating-system independent RDOFF binary format, which
40 is sometimes used with the Netwide Assembler (NASM). These tools
41 include linker, library manager, loader, and information dump.
43 %prep
44 %setup -q -n nasm-%{nasm_version}
46 %build
47 %configure
48 make %{?_smp_mflags} everything
50 %install
51 rm -rf "$RPM_BUILD_ROOT"
52 mkdir -p "$RPM_BUILD_ROOT"/%{_bindir}
53 mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1
54 mkdir -p "$RPM_BUILD_ROOT"/%{_infodir}
55 mkdir -p "$RPM_BUILD_ROOT"/usr/tempdoc
56 %makeinstall install_everything docdir="$RPM_BUILD_ROOT"/usr/tempdoc
57 cp -a $RPM_BUILD_ROOT/usr/tempdoc/html \
58 $RPM_BUILD_ROOT/usr/tempdoc/nasmdoc.{txt,pdf} .
59 xz -9ef nasmdoc.{pdf,txt}
60 # remove unpackaged files from the buildroot
61 rm -rf $RPM_BUILD_ROOT%{_prefix}/tempdoc
63 %clean
64 rm -rf "$RPM_BUILD_ROOT"
66 %post
67 /sbin/install-info %{_infodir}/nasm.info.gz %{_infodir}/dir || :
69 %preun
70 if [ $1 = 0 ]; then
71 /sbin/install-info --delete %{_infodir}/nasm.info.gz %{_infodir}/dir || :
74 %files
75 %defattr(-,root,root)
76 %doc AUTHORS CHANGES README TODO
77 %{_bindir}/nasm
78 %{_bindir}/ndisasm
79 %{_mandir}/man1/nasm.1*
80 %{_mandir}/man1/ndisasm.1*
81 %{_infodir}/nasm.info*.gz
83 %files doc
84 %defattr(-,root,root)
85 %doc html nasmdoc.txt.xz nasmdoc.pdf.xz
87 %files rdoff
88 %defattr(-,root,root)
89 %{_bindir}/ldrdf
90 %{_bindir}/rdf2bin
91 %{_bindir}/rdf2com
92 %{_bindir}/rdf2ihx
93 %{_bindir}/rdf2ith
94 %{_bindir}/rdf2srec
95 %{_bindir}/rdfdump
96 %{_bindir}/rdflib
97 %{_bindir}/rdx
98 %{_mandir}/man1/ldrdf.1*
99 %{_mandir}/man1/rdf2bin.1*
100 %{_mandir}/man1/rdf2com.1*
101 %{_mandir}/man1/rdf2ihx.1*
102 %{_mandir}/man1/rdf2ith.1*
103 %{_mandir}/man1/rdf2srec.1*
104 %{_mandir}/man1/rdfdump.1*
105 %{_mandir}/man1/rdflib.1*
106 %{_mandir}/man1/rdx.1*