summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFlavius Aspra2019-10-22 01:51:00 +0200
committerFlavius Aspra2019-10-22 01:52:27 +0200
commit30c54393ad8dccb0ab98a5f4d050a1f114dadfca (patch)
treedc750c3cd26c8d65cc6e2d9b11e8ef227fd576c5 /PKGBUILD
downloadaur-mhsendmail.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2e70bd84dd00
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+pkgname=mhsendmail
+pkgver=0.2.0
+pkgrel=1
+pkgdesc='Mailhog sendmail replacement'
+arch=('x86_64')
+url="https://github.com/mailhog/mhsendmail"
+license=('MIT')
+makedepends=('go' 'git')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mailhog/mhsendmail/archive/v${pkgver}.tar.gz")
+sha256sums=('8677f539dc14217cd0a4ad87c085d11d484debddbcb538cf22c0b1326a203265')
+
+
+prepare(){
+ mkdir -p gopath/src/github.com/mailhog
+ ln -rTsf $pkgname-$pkgver gopath/src/github.com/mailhog/mhsendmail
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/mailhog/mhsendmail
+ go get -d ./...
+}
+
+build() {
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/mailhog/mhsendmail
+ go install \
+ -trimpath \
+ -ldflags "-extldflags $LDFLAGS" \
+ -v ./...
+}
+
+check() {
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/mailhog/mhsendmail
+ go test ./...
+}
+
+package() {
+ install -Dm755 gopath/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+}