mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
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>
This commit is contained in:
parent
3e555483b3
commit
cf96845bf6
13
Makefile.in
13
Makefile.in
@ -348,6 +348,7 @@ clean:
|
||||
$(RM_F) nasm-*-installer-*.exe
|
||||
$(RM_F) tags TAGS
|
||||
$(RM_F) nsis/arch.nsh
|
||||
$(RM_F) perlbreq.si
|
||||
$(RM_F) $(RDFPROGS) $(RDF2BINLINKS)
|
||||
|
||||
distclean: clean
|
||||
@ -417,8 +418,16 @@ tar: dist
|
||||
|
||||
spec: nasm.spec
|
||||
|
||||
nasm.spec: nasm.spec.in version.sed
|
||||
sed -f version.sed < nasm.spec.in > nasm.spec
|
||||
ALLPERLSRC := $(shell find $(srcdir) -type f -name '*.p[lh]')
|
||||
|
||||
perlbreq.si: $(ALLPERLSRC)
|
||||
sed -n -r -e 's/^use[[:space:]]+([^[:space:];]+).*$$/Build-Requires: perl(\1)/p' $(ALLPERLSRC) | \
|
||||
sed -r -e '/perl\((strict|warnings)\)/d' | \
|
||||
sort | uniq > perlbreq.si || ( rm -f perlbreq.si ; false )
|
||||
|
||||
nasm.spec: nasm.spec.in version.sed perlbreq.si
|
||||
sed -f version.sed -e '/@@PERLBUILDREQS@@/r perlbreq.si' \
|
||||
< nasm.spec.in > nasm.spec || ( rm -f nasm.spec ; false )
|
||||
|
||||
splint:
|
||||
splint -weak *.c
|
||||
|
46
nasm.spec.in
46
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
|
||||
|
Loading…
Reference in New Issue
Block a user