mirror of
				https://github.com/netwide-assembler/nasm.git
				synced 2025-10-10 00:25:06 -04: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:
		
							
								
								
									
										13
									
								
								Makefile.in
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile.in
									
									
									
									
									
								
							| @@ -348,6 +348,7 @@ clean: | |||||||
| 	$(RM_F) nasm-*-installer-*.exe | 	$(RM_F) nasm-*-installer-*.exe | ||||||
| 	$(RM_F) tags TAGS | 	$(RM_F) tags TAGS | ||||||
| 	$(RM_F) nsis/arch.nsh | 	$(RM_F) nsis/arch.nsh | ||||||
|  | 	$(RM_F) perlbreq.si | ||||||
| 	$(RM_F) $(RDFPROGS) $(RDF2BINLINKS) | 	$(RM_F) $(RDFPROGS) $(RDF2BINLINKS) | ||||||
|  |  | ||||||
| distclean: clean | distclean: clean | ||||||
| @@ -417,8 +418,16 @@ tar: dist | |||||||
|  |  | ||||||
| spec: nasm.spec | spec: nasm.spec | ||||||
|  |  | ||||||
| nasm.spec: nasm.spec.in version.sed | ALLPERLSRC := $(shell find $(srcdir) -type f -name '*.p[lh]') | ||||||
| 	sed -f version.sed < nasm.spec.in > nasm.spec |  | ||||||
|  | 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: | ||||||
| 	splint -weak *.c | 	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 | Summary: The Netwide Assembler, a portable x86 assembler with Intel-like syntax | ||||||
| Name: nasm | Name: nasm | ||||||
| Version: @@NASM_MANGLED_VER@@ | Version: @@NASM_MANGLED_VER@@ | ||||||
| Release: 0 | Release: 0%{?dist} | ||||||
| License: BSD | License: BSD | ||||||
| Group: Development/Languages | Group: Development/Languages | ||||||
| Source: http://www.nasm.us/pub/nasm/releasebuilds/%{nasm_version}/nasm-%{nasm_version}.tar.xz | Source: http://www.nasm.us/pub/nasm/releasebuilds/%{nasm_version}/nasm-%{nasm_version}.tar.xz | ||||||
| URL: http://www.nasm.us/ | URL: http://www.nasm.us/ | ||||||
| BuildRoot: /tmp/rpm-build-nasm | BuildRoot: /tmp/rpm-build-nasm | ||||||
| Prefix: %{_prefix} | Prefix: %{_prefix} | ||||||
| BuildRequires: perl, asciidoc, xmlto, ghostscript, perl-Font-TTF | @@PERLBUILDREQS@@ | ||||||
| BuildRequires: adobe-source-sans-pro-fonts, adobe-source-code-pro-fonts | BuildRequires: autoconf | ||||||
| BuildRequires: fontconfig, xz | 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) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||||||
|  |  | ||||||
| %package doc | %package doc | ||||||
| @@ -41,26 +47,18 @@ include linker, library manager, loader, and information dump. | |||||||
| %setup -q -n nasm-%{nasm_version} | %setup -q -n nasm-%{nasm_version} | ||||||
|  |  | ||||||
| %build | %build | ||||||
| %configure --disable-pdf-compression | autoreconf | ||||||
|  | %configure --disable-pdf-compression --enable-lto | ||||||
| make %{?_smp_mflags} everything | make %{?_smp_mflags} everything | ||||||
|  | xz -9ef doc/nasmdoc.pdf | ||||||
|  |  | ||||||
| %install | %install | ||||||
| rm -rf "$RPM_BUILD_ROOT" | rm -rf "$RPM_BUILD_ROOT" | ||||||
| mkdir -p "$RPM_BUILD_ROOT"/%{_bindir} | mkdir -p "$RPM_BUILD_ROOT"/%{_bindir} | ||||||
| mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1 | mkdir -p "$RPM_BUILD_ROOT"/%{_mandir}/man1 | ||||||
| mkdir -p "$RPM_BUILD_ROOT"/usr/tempdoc | make INSTALLROOT="$RPM_BUILD_ROOT" install install_rdf | ||||||
| %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" |  | ||||||
|  |  | ||||||
| %files | %files | ||||||
| %defattr(-,root,root) |  | ||||||
| %doc AUTHORS CHANGES README TODO | %doc AUTHORS CHANGES README TODO | ||||||
| %{_bindir}/nasm | %{_bindir}/nasm | ||||||
| %{_bindir}/ndisasm | %{_bindir}/ndisasm | ||||||
| @@ -68,11 +66,9 @@ rm -rf "$RPM_BUILD_ROOT" | |||||||
| %{_mandir}/man1/ndisasm.1* | %{_mandir}/man1/ndisasm.1* | ||||||
|  |  | ||||||
| %files doc | %files doc | ||||||
| %defattr(-,root,root) | %doc doc/html doc/nasmdoc.pdf.xz | ||||||
| %doc html nasmdoc.pdf.xz |  | ||||||
|  |  | ||||||
| %files rdoff | %files rdoff | ||||||
| %defattr(-,root,root) |  | ||||||
| %{_bindir}/ldrdf | %{_bindir}/ldrdf | ||||||
| %{_bindir}/rdf2bin | %{_bindir}/rdf2bin | ||||||
| %{_bindir}/rdf2com | %{_bindir}/rdf2com | ||||||
| @@ -83,11 +79,7 @@ rm -rf "$RPM_BUILD_ROOT" | |||||||
| %{_bindir}/rdflib | %{_bindir}/rdflib | ||||||
| %{_bindir}/rdx | %{_bindir}/rdx | ||||||
| %{_mandir}/man1/ldrdf.1* | %{_mandir}/man1/ldrdf.1* | ||||||
| %{_mandir}/man1/rdf2bin.1* | %{_mandir}/man1/rd*.1* | ||||||
| %{_mandir}/man1/rdf2com.1* |  | ||||||
| %{_mandir}/man1/rdf2ihx.1* | # This is the upstream spec file; the change log is in git | ||||||
| %{_mandir}/man1/rdf2ith.1* | %changelog | ||||||
| %{_mandir}/man1/rdf2srec.1* |  | ||||||
| %{_mandir}/man1/rdfdump.1* |  | ||||||
| %{_mandir}/man1/rdflib.1* |  | ||||||
| %{_mandir}/man1/rdx.1* |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user