diff options
author | René 'Necoro' Neumann | 2022-09-28 23:58:16 +0200 |
---|---|---|
committer | René 'Necoro' Neumann | 2022-09-28 23:58:16 +0200 |
commit | 33ba560caf4147ae2eaeb9d609fdf5763d594d88 (patch) | |
tree | 875e324b5535fdef4c9434937981c802168fb85a | |
download | aur-33ba560caf4147ae2eaeb9d609fdf5763d594d88.tar.gz |
Add feed2imap-go
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 51 |
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..48198523c561 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = feed2imap-go + pkgdesc = RSS aggregator for direct import into IMAP folders + pkgver = 1.5.1 + pkgrel = 1 + url = https://github.com/Necoro/feed2imap-go + arch = x86_64 + license = GPL + makedepends = go>=1.18 + options = !lto + source = feed2imap-go-1.5.1.tar.gz::https://github.com/Necoro/feed2imap-go/archive/refs/tags/v1.5.1.tar.gz + sha256sums = 10872fa1a9bfabdb53fd8935a8676d672dbb361af2d9db2b459cd8aa744f933b + +pkgname = feed2imap-go diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..71a9d16c2b38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*~ +*/ +*.tar.* +*.log diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..13bc75281e0f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: René 'Necoro' Neumann <arch@necoro.dev> +pkgname=feed2imap-go +pkgver=1.5.1 +pkgrel=1 +pkgdesc='RSS aggregator for direct import into IMAP folders' +arch=('x86_64') +url="https://github.com/Necoro/$pkgname" +license=('GPL') +makedepends=('go>=1.18') +source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz") +sha256sums=('10872fa1a9bfabdb53fd8935a8676d672dbb361af2d9db2b459cd8aa744f933b') + +# cf https://github.com/golang/go/issues/43505 +options=(!lto) + +prepare(){ + cd "$pkgname-$pkgver" + mkdir -p build/ +} + +build() { + cd "$pkgname-$pkgver" + + # LDFlags as per .goreleaser.yml + ldflags="-s -w -X github.com/Necoro/feed2imap-go/pkg/version.version=$pkgver -X github.com/Necoro/feed2imap-go/pkg/version.commit=AUR" + + # Flags as per Arch Guidelines + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + + go build -o build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags="-linkmode external $ldflags" +} + +check() { + cd "$pkgname-$pkgver" + go vet ./... + go test ./... +} + +package() { + cd "$pkgname-$pkgver" + install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm644 {CHANGELOG,README}.md config.yml.example -t "$pkgdir"/usr/share/doc/$pkgname/ +} |