diff --git a/testing/nmail/APKBUILD b/testing/nmail/APKBUILD new file mode 100644 index 00000000000..7ce75907011 --- /dev/null +++ b/testing/nmail/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: Celeste +# Maintainer: Celeste +pkgname=nmail +pkgver=4.35 +pkgrel=0 +pkgdesc="Terminal-based email client" +url="https://github.com/d99kris/nmail" +arch="all" +license="MIT" +makedepends=" + cmake + cyrus-sasl-dev + file-dev + libetpan-dev + linux-headers + ncurses-dev + openssl-dev + samurai + sqlite-dev + util-linux-dev + xapian-core-dev + " +subpackages="$pkgname-doc $pkgname-oauth" +source="https://github.com/d99kris/nmail/archive/v$pkgver/nmail-$pkgver.tar.gz + fix-fd_set.patch + include-ctime.patch + " + +build() { + cmake -B build -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=None \ + -DHAS_CUSTOM_LIBETPAN=OFF + cmake --build build +} + +check() { + ./build/nmail --version + + ctest --test-dir build --output-on-failure +} + +package() { + DESTDIR="$pkgdir" cmake --install build + + install -Dvm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +} + +oauth() { + pkgdesc="$pkgdesc (OAuth2 Python helper script)" + depends="$pkgname=$pkgver-r$pkgrel py3-requests" + + amove usr/bin/oauth2nmail +} + +sha512sums=" +7b04883fd5b6abd6ef3eb2c89ce44f8e14d32ab17d10dbaafd9a26ac440aceefe85193868166e90ab917f2aa1a6603dace02cc714fa03f1968138fe8ab1f2e85 nmail-4.35.tar.gz +60e05c80aba7de245b9bcd1f4f0ce11097093999e46eb86dccef55b3c6af5cc5f933011754cc6e85416ad61ebb3c2827e7fed6f861a8480b1ea8dd2c645895fa fix-fd_set.patch +3a01c45b582aaeea8596a482c5dfabc57bd4402febeb2377ab33376d7ea3808bbca0c2239243fdffbcb0caa312c0f87c2e68124805ba2bac3f830dead9c022f5 include-ctime.patch +" diff --git a/testing/nmail/fix-fd_set.patch b/testing/nmail/fix-fd_set.patch new file mode 100644 index 00000000000..1d299e4d63d --- /dev/null +++ b/testing/nmail/fix-fd_set.patch @@ -0,0 +1,10 @@ +--- a/src/smtpmanager.cpp ++++ b/src/smtpmanager.cpp +@@ -8,6 +8,7 @@ + #include "smtpmanager.h" + + #include ++#include + + #include "loghelp.h" + #include "smtp.h" diff --git a/testing/nmail/include-ctime.patch b/testing/nmail/include-ctime.patch new file mode 100644 index 00000000000..4ab4116290b --- /dev/null +++ b/testing/nmail/include-ctime.patch @@ -0,0 +1,10 @@ +--- a/src/header.h ++++ b/src/header.h +@@ -7,6 +7,7 @@ + + #pragma once + ++#include + #include + #include + #include