From d1276f3d97325f62152fc03f5eb6e6363eab84ca Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Wed, 11 Jun 2014 14:41:49 +0200 Subject: [PATCH] DEB distribution. --- .gitignore | 13 +++++++------ Makefile | 18 ++++++++++++++++-- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 11 +++++++++++ debian/copyright | 7 +++++++ debian/install | 2 ++ debian/rules | 6 ++++++ 8 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/install create mode 100644 debian/rules diff --git a/.gitignore b/.gitignore index 6223f68..e09c27c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -*.exe -*.obj -*.html -*.1 -*.zip -*.dmg +xasm +xasm.exe +xasm.obj +xasm.html +xasm.1 +xasm-*-windows.zip +xasm-*-osx.dmg diff --git a/Makefile b/Makefile index 1e393d4..c2adb3a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ VERSION = 3.1.0 +prefix = /usr/local +bindir = $(prefix)/bin +mandir = $(prefix)/share/man/man1 + all: xasm xasm.html xasm: xasm.d @@ -14,6 +18,16 @@ xasm.1: xasm.1.txt 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 + +uninstall: + $(RM) $(DESTDIR)$(bindir)/xasm $(DESTDIR)$(mandir)/xasm.1 + +deb: + debuild -b -us -uc + osx: xasm-$(VERSION)-osx.dmg xasm-$(VERSION)-osx.dmg: osx/xasm osx/bin @@ -26,9 +40,9 @@ osx/bin: mkdir -p osx && ln -s /usr/bin $@ clean: - $(RM) xasm xasm.exe xasm.html xasm.1 xasm-$(VERSION)-windows.zip xasm-$(VERSION)-osx.dmg + $(RM) xasm xasm.exe xasm.obj xasm.html xasm.1 xasm-$(VERSION)-windows.zip xasm-$(VERSION)-osx.dmg rm -rf osx -.PHONY: all osx clean +.PHONY: all install uninstall deb osx clean .DELETE_ON_ERROR: diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..283aea0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +xasm (3.1.0-1) UNRELEASED; urgency=low + + * First deb packaging. + + -- Piotr Fusik Wed, 11 Jun 2014 10:46:15 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0bd1397 --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Source: xasm +Maintainer: Piotr Fusik +Section: devel +Priority: optional +Standards-Version: 3.9.3 +Build-Depends: debhelper (>= 7), dmd (>= 2), asciidoc + +Package: xasm +Architecture: any +Depends: ${shlibs:Depends} +Description: A 6502 cross-assembler with original syntax extensions. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2530d27 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Name: xasm +Source: https://github.com/pfusik/xasm + +Files: * +Copyright: 1998-2014 Piotr Fusik +License: Poetic diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..c68d1fd --- /dev/null +++ b/debian/install @@ -0,0 +1,2 @@ +usr/bin/xasm +usr/share/man/man1/xasm.1 diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..55b8968 --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_install: + $(MAKE) DESTDIR=$$(pwd)/debian/tmp prefix=/usr install