-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
109 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
.idea | ||
build | ||
*.iml | ||
build | ||
obj* | ||
debian/notify-mail | ||
debian/debhelper-build-stamp | ||
debian/.debhelper | ||
debian/files | ||
debian/notify-mail.debhelper.log | ||
debian/notify-mail.substvars | ||
release |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
notify-mail (1.2.2) unstable; urgency=medium | ||
|
||
* implement message template. | ||
* validate variables parameter. | ||
* fix message delivery | ||
|
||
-- Andoni del Olmo <[email protected]> Sat, 06 Jun 2020 18:22:45 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Source: notify-mail | ||
Section: extras | ||
Priority: standard | ||
Maintainer: Andoni del Olmo <[email protected]> | ||
Build-Depends: debhelper (>=9), golang-go:native (>= 1.3.3), dh-golang | ||
Standards-Version: 3.9.4 | ||
Homepage: https://github.com/adelolmo/notify-mail | ||
|
||
Package: notify-mail | ||
Architecture: any | ||
Description: Send mail notifications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/make -f | ||
|
||
export DH_OPTIONS | ||
|
||
## | ||
# From git-lfs/git-lfs repo: | ||
# Looks like dh_golang doesn't set diffrent archs, so you have to do them semi-manually. | ||
## | ||
|
||
## This if-structure is decided on what is passed by the -a flag by dpkg-buildpackage command. | ||
ifeq ($(DEB_HOST_ARCH), i386) | ||
export GOARCH := 386 | ||
else ifeq ($(DEB_HOST_ARCH), amd64) | ||
export GOARCH := amd64 | ||
else ifeq ($(DEB_HOST_ARCH), armhf) | ||
export GOARCH := arm | ||
# May need to set GOARM as well if your going to target ARM. But for now this works. | ||
else ifeq ($(DEB_HOST_ARCH), arm64) | ||
export GOARCH := arm64 | ||
endif | ||
|
||
# Or add your arch that your targeting, these are just examples. | ||
|
||
# Directory where compiled binary is placed + debian setup files. | ||
# Note: If your doing building thru git, you may want to add obj-* to .gitignore | ||
BUILD_DIR := obj-$(DEB_HOST_GNU_TYPE) | ||
|
||
# Required: Put the url (without http://) of your git repo. | ||
export DH_GOPKG := github.com/adelolmo/notify-mail | ||
|
||
# Required: Put the name of your git repo below. | ||
GIT_REPO_NAME := notify-mail | ||
|
||
export PATH := $(CURDIR)/$(BUILD_DIR)/bin:$(PATH) | ||
|
||
## | ||
# From git-lfs/git-lfs repo: | ||
# by-default, dh_golang only copies *.go and other source - this upsets a bunch of vendor test routines | ||
## | ||
export DH_GOLANG_INSTALL_ALL := 1 | ||
|
||
%: | ||
mkdir -p /tmp/gocache | ||
GO111MODULE=on GOFLAGS=-mod=vendor GOCACHE=/tmp/gocache dh $@ --buildsystem=golang --with=golang | ||
|
||
override_dh_clean: | ||
rm -f debian/debhelper.log | ||
dh_clean | ||
|
||
override_dh_auto_build: | ||
dh_auto_build | ||
## | ||
# From git-lfs/git-lfs repo: | ||
# dh_golang doesn't do anything here in deb 8, and it's needed in both | ||
## | ||
if [ "$(DEB_HOST_GNU_TYPE)" != "$(DEB_BUILD_GNU_TYPE)" ]; then\ | ||
cp -rf $(BUILD_DIR)/bin/*/* $(BUILD_DIR)/bin/; \ | ||
fi | ||
|
||
override_dh_strip: | ||
## | ||
# From git-lfs/git-lfs repo: | ||
# strip disabled as golang upstream doesn't support it and it makes go crash. | ||
# See https://launchpad.net/bugs/1200255. | ||
## | ||
|
||
override_dh_golang: | ||
## | ||
# From git-lfs/git-lfs repo: | ||
# The dh_golang is used to add the Built-using field to the deb. This is only for reference. | ||
# As of https://anonscm.debian.org/cgit/collab-maint/dh-golang.git/commit/script/dh_golang?id=7c3fbec6ea92294477fa8910264fe9bd823f21c3 | ||
# dh_golang errors out because the go compiler used was not installed via a package. Therefore the step is skipped | ||
## | ||
|
||
override_dh_auto_install: | ||
install -g 0 -o 0 -d debian/$(GIT_REPO_NAME)/usr/bin | ||
cp $(BUILD_DIR)/bin/notify-mail debian/$(GIT_REPO_NAME)/usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/adelolmo/notify-mail | ||
|
||
go 1.14 |