forked from archive/andrewferrier_email2pdf
Get homebrew recipe in place for email2pdf.
This commit is contained in:
parent
70987ada02
commit
4549d81293
3 changed files with 23 additions and 0 deletions
8
Makefile
8
Makefile
|
@ -1,3 +1,4 @@
|
|||
ROOTDIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
TEMPDIR := $(shell mktemp -t tmp.XXXXXX -d)
|
||||
FLAKE8 := $(shell which flake8)
|
||||
UNAME := $(shell uname)
|
||||
|
@ -7,6 +8,7 @@ determineversion:
|
|||
$(eval GITDESCRIBE := $(shell git describe --dirty))
|
||||
sed 's/Version: .*/Version: $(GITDESCRIBE)/' debian/DEBIAN/control_template > debian/DEBIAN/control
|
||||
$(eval GITDESCRIBE_ABBREV := $(shell git describe --abbrev=0))
|
||||
sed 's/X\.Y/$(GITDESCRIBE_ABBREV)/' brew/email2pdf_template.rb > brew/email2pdf.rb
|
||||
sed 's/pkgver=X/pkgver=$(GITDESCRIBE_ABBREV)/' PKGBUILD_template > PKGBUILD
|
||||
|
||||
ifeq ($(UNAME),Linux)
|
||||
|
@ -54,6 +56,12 @@ unittest:
|
|||
unittest_verbose:
|
||||
python3 -m unittest discover -f -v
|
||||
|
||||
install_osx_brew: determineversion
|
||||
brew install -f file://$(ROOTDIR)/brew/email2pdf.rb
|
||||
|
||||
reinstall_osx_brew: determineversion
|
||||
brew reinstall file://$(ROOTDIR)/brew/email2pdf.rb
|
||||
|
||||
analysis:
|
||||
# Debian version is badly packaged, make sure we are using Python 3.
|
||||
-/usr/bin/env python3 $(FLAKE8) --max-line-length=132 email2pdf tests/
|
||||
|
|
1
brew/.gitignore
vendored
Normal file
1
brew/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
email2pdf.rb
|
14
brew/email2pdf_template.rb
Normal file
14
brew/email2pdf_template.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class Email2pdf < Formula
|
||||
desc "Email2PDF"
|
||||
homepage "http://github.com/andrewferrier/email2pdf"
|
||||
url "https://github.com/andrewferrier/email2pdf/archive/X.Y.zip"
|
||||
version "X.Y"
|
||||
|
||||
depends_on "python@3"
|
||||
depends_on "libmagic"
|
||||
|
||||
def install
|
||||
bin.install "email2pdf"
|
||||
doc.install "README.md", "LICENSE.txt"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue