diff --git a/.travis.yml b/.travis.yml index 4d39287..13cee1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,12 @@ addons: packages: - pandoc - libxml2-utils + - devscripts + - build-essential + - lintian + - debhelper script: - - bash -n mdcheckr - - (cd tests && ./test.sh) + - make test - ./mdcheckr README.md + - make unsigned-package diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..67e138d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +# Contributors guide + +## Packaging + +## Source release + +A source tarball can be created from the `Makefile`: + +```bash +git checkout v1.0 +make source-release +``` + +This is suitable as a "pristine" source for downstream packagers. + +## Debian unsigned package + +An unsigned Debian package can also be created from the repository in a few steps. + +Check out the version you want: + +```bash +git checkout v1.0 +make unsigned-package +``` + +You will then have source and binary packages in the current directory. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..90364e7 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +VERSION=1.0 + +.PHONY: default test offline-test source-tarball unsigned-package + +default: test + +test: + bash -n mdcheckr + (cd tests && ./test.sh) + +source-tarball: mdcheckr_$(VERSION).orig.tar.gz + +mdcheckr_$(VERSION).orig.tar.gz: + tar --transform "s,^,mdcheckr-$(VERSION)/," -cvzf \ + mdcheckr_$(VERSION).orig.tar.gz \ + LICENSE.md \ + README.md \ + mdcheckr \ + mdcheckr.1 \ + tests + +unsigned-package: mdcheckr_$(VERSION)-1_all.deb + +mdcheckr_$(VERSION)-1_all.deb: mdcheckr_$(VERSION).orig.tar.gz + tar -xvzf mdcheckr_$(VERSION).orig.tar.gz + cp -Rf debian/ mdcheckr-$(VERSION)/ + (cd mdcheckr-$(VERSION)/ && debuild -us -uc) + rm -Rf mdcheckr-$(VERSION)/ + +clean: + rm -Rf mdcheckr-$(VERSION)* mdcheckr_$(VERSION)* diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..94ecb7e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mdcheckr (1.0-1) UNRELEASED; urgency=low + + * Initial release. + + -- Michael Billington Sun, 04 Jun 2017 17:33:37 +1000 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..f9abd04 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: mdcheckr +Maintainer: Michael Billington +Section: misc +Priority: optional +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) + +Package: mdcheckr +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, pandoc, curl, libxml2-utils, which +Description: + check markdown files for broken links and other errors diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..68a0489 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/mike42/mdcheckr + +Files: * +Copyright: 2017 Michael Billington +License: MIT + diff --git a/debian/debhelper-build-stamp b/debian/debhelper-build-stamp new file mode 100644 index 0000000..a9f005f --- /dev/null +++ b/debian/debhelper-build-stamp @@ -0,0 +1 @@ +mdcheckr diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..2f210c0 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +mdcheckr usr/bin diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..a7cccc8 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +mdcheckr.1 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4f2c774 --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f +%: + dh $@ + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)