1
0
mirror of https://github.com/pfusik/xasm.git synced 2024-07-20 07:28:56 +00:00

RPM and tar.gz distributions.

This commit is contained in:
Piotr Fusik 2014-06-12 17:24:12 +02:00
parent d1276f3d97
commit cc5568795e
3 changed files with 53 additions and 8 deletions

3
.gitignore vendored
View File

@ -3,5 +3,4 @@ xasm.exe
xasm.obj
xasm.html
xasm.1
xasm-*-windows.zip
xasm-*-osx.dmg
MANIFEST

View File

@ -4,6 +4,8 @@ prefix = /usr/local
bindir = $(prefix)/bin
mandir = $(prefix)/share/man/man1
SEVENZIP = 7z a -mx=9 -bd
all: xasm xasm.html
xasm: xasm.d
@ -15,9 +17,6 @@ xasm.html: xasm.1.txt
xasm.1: xasm.1.txt
a2x -f manpage $<
xasm-$(VERSION)-windows.zip: xasm xasm.html xasm.properties
$(RM) $@ && 7z a -mx=9 -tzip $@ xasm.exe xasm.html xasm.properties
install: xasm xasm.1
mkdir -p $(DESTDIR)$(bindir) && install xasm $(DESTDIR)$(bindir)/xasm
mkdir -p $(DESTDIR)$(mandir) && install -m 644 xasm.1 $(DESTDIR)$(mandir)/xasm.1
@ -25,12 +24,23 @@ install: xasm xasm.1
uninstall:
$(RM) $(DESTDIR)$(bindir)/xasm $(DESTDIR)$(mandir)/xasm.1
dist: srcdist ../xasm-$(VERSION)-windows.zip
srcdist: MANIFEST
$(RM) ../xasm-$(VERSION).tar.gz && tar -c --numeric-owner --owner=0 --group=0 --mode=644 -T MANIFEST --transform=s,,xasm-$(VERSION)/, | $(SEVENZIP) -tgzip -si ../xasm-$(VERSION).tar.gz
MANIFEST:
if test -e .git; then (git ls-files | grep -vF .gitignore && echo MANIFEST) | sort >$@ ; fi
../xasm-$(VERSION)-windows.zip: xasm xasm.html xasm.properties
$(RM) $@ && $(SEVENZIP) -tzip $@ xasm.exe xasm.html xasm.properties
deb:
debuild -b -us -uc
osx: xasm-$(VERSION)-osx.dmg
xasm-$(VERSION)-osx.dmg: osx/xasm osx/bin
../xasm-$(VERSION)-osx.dmg: osx/xasm osx/bin
hdiutil create -volname xasm-$(VERSION)-osx -srcfolder osx -imagekey zlib-level=9 -ov $@
osx/xasm: xasm
@ -40,9 +50,9 @@ osx/bin:
mkdir -p osx && ln -s /usr/bin $@
clean:
$(RM) xasm xasm.exe xasm.obj xasm.html xasm.1 xasm-$(VERSION)-windows.zip xasm-$(VERSION)-osx.dmg
$(RM) xasm xasm.exe xasm.obj xasm.html xasm.1
rm -rf osx
.PHONY: all install uninstall deb osx clean
.PHONY: all install uninstall dist srcdist MANIFEST deb osx clean
.DELETE_ON_ERROR:

36
xasm.spec Normal file
View File

@ -0,0 +1,36 @@
Name: xasm
Version: 3.1.0
Release: 1
Summary: 6502 cross-assembler
License: Poetic
Group: Applications/Programming
Source: http://pfusik.github.io/xasm/xasm-%{version}.tar.gz
URL: https://github.com/pfusik/xasm
BuildRequires: dmd >= 2, asciidoc
BuildRoot: %{_tmppath}/%{name}-root
%description
xasm is a 6502 cross-assembler with original syntax extensions.
%prep
%setup -q
%build
make xasm xasm.1
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/xasm
%{_mandir}/man1/xasm.1.gz
%changelog
* Thu Jun 12 2014 Piotr Fusik <fox@scene.pl>
- 3.1.0-1
- Initial packaging