summaryrefslogtreecommitdiff
path: root/nasm.spec.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-23 18:33:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-23 18:33:53 -0700
commitcf96845bf645266d7ec6e77a92086c8ed7a7803f (patch)
treeaa9a9c30e26ed993a34ff166deecd1c563bca62d /nasm.spec.in
parent3e555483b30c6f0bd4b348861f694f73e487c134 (diff)
downloadnasm-cf96845bf645266d7ec6e77a92086c8ed7a7803f.tar.gz
nasm.spec: sync with Fedora spec file, auto-generate Perl depends
Sync up with how the Fedora spec file has evolved. Auto-generate the Perl build dependencies. Add --enable-lto: it makes especally the rdoff files much smaller. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasm.spec.in')
-rw-r--r--nasm.spec.in46
1 files changed, 19 insertions, 27 deletions
diff --git a/nasm.spec.in b/nasm.spec.in
index 9ca198ea..1d1e6d7d 100644
--- a/nasm.spec.in
+++ b/nasm.spec.in
@@ -3,16 +3,22 @@
Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax
Name: nasm
Version: @@NASM_MANGLED_VER@@
-Release: 0
+Release: 0%{?dist}
License: BSD
Group: Development/Languages
Source: http://www.nasm.us/pub/nasm/releasebuilds/%{nasm_version}/nasm-%{nasm_version}.tar.xz
URL: http://www.nasm.us/
BuildRoot: /tmp/rpm-build-nasm
Prefix: %{_prefix}
-BuildRequires: perl, asciidoc, xmlto, ghostscript, perl-Font-TTF
-BuildRequires: adobe-source-sans-pro-fonts, adobe-source-code-pro-fonts
-BuildRequires: fontconfig, xz
+@@PERLBUILDREQS@@
+BuildRequires: autoconf
+BuildRequires: asciidoc
+BuildRequires: xmlto
+BuildRequires: ghostscript
+BuildRequires: fontconfig
+BuildRequires: adobe-source-sans-pro-fonts
+BuildRequires: adobe-source-code-pro-fonts
+BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%package doc
@@ -41,26 +47,18 @@ include linker, library manager, loader, and information dump.
%setup -q -n nasm-%{nasm_version}
%build
-%configure --disable-pdf-compression
+autoreconf
+%configure --disable-pdf-compression --enable-lto
make %{?_smp_mflags} everything
+xz -9ef doc/nasmdoc.pdf
%install
rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"/%{_bindir}
mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1
-mkdir -p "$RPM_BUILD_ROOT"/usr/tempdoc
-%makeinstall install_everything docdir="$RPM_BUILD_ROOT"/usr/tempdoc
-cp -a $RPM_BUILD_ROOT/usr/tempdoc/html \
- $RPM_BUILD_ROOT/usr/tempdoc/nasmdoc.pdf .
-xz -9ef nasmdoc.pdf
-# remove unpackaged files from the buildroot
-rm -rf $RPM_BUILD_ROOT%{_prefix}/tempdoc
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
+make INSTALLROOT="$RPM_BUILD_ROOT" install install_rdf
%files
-%defattr(-,root,root)
%doc AUTHORS CHANGES README TODO
%{_bindir}/nasm
%{_bindir}/ndisasm
@@ -68,11 +66,9 @@ rm -rf "$RPM_BUILD_ROOT"
%{_mandir}/man1/ndisasm.1*
%files doc
-%defattr(-,root,root)
-%doc html nasmdoc.pdf.xz
+%doc doc/html doc/nasmdoc.pdf.xz
%files rdoff
-%defattr(-,root,root)
%{_bindir}/ldrdf
%{_bindir}/rdf2bin
%{_bindir}/rdf2com
@@ -83,11 +79,7 @@ rm -rf "$RPM_BUILD_ROOT"
%{_bindir}/rdflib
%{_bindir}/rdx
%{_mandir}/man1/ldrdf.1*
-%{_mandir}/man1/rdf2bin.1*
-%{_mandir}/man1/rdf2com.1*
-%{_mandir}/man1/rdf2ihx.1*
-%{_mandir}/man1/rdf2ith.1*
-%{_mandir}/man1/rdf2srec.1*
-%{_mandir}/man1/rdfdump.1*
-%{_mandir}/man1/rdflib.1*
-%{_mandir}/man1/rdx.1*
+%{_mandir}/man1/rd*.1*
+
+# This is the upstream spec file; the change log is in git
+%changelog