summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-07-31 17:10:56 -0500
committerKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-07-31 17:10:56 -0500
commitcdad188dda65a63cf9926389ae2ea50f999439c9 (patch)
tree959b458e7fac0b5f235b16c7530c774590ff0bc4 /user
parentd834ebd9b0f56f9f1765f1995c7a9a11d5fda3b4 (diff)
downloadpackages-cdad188dda65a63cf9926389ae2ea50f999439c9.tar.gz
packages-cdad188dda65a63cf9926389ae2ea50f999439c9.tar.bz2
packages-cdad188dda65a63cf9926389ae2ea50f999439c9.tar.xz
packages-cdad188dda65a63cf9926389ae2ea50f999439c9.zip
user/trojita: new package
Diffstat (limited to 'user')
-rw-r--r--user/trojita/APKBUILD55
-rw-r--r--user/trojita/fix-gpg.patch12
-rw-r--r--user/trojita/use-qgpgme.patch25
3 files changed, 92 insertions, 0 deletions
diff --git a/user/trojita/APKBUILD b/user/trojita/APKBUILD
new file mode 100644
index 000000000..2c92fc0fd
--- /dev/null
+++ b/user/trojita/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=trojita
+pkgver=0.7
+pkgrel=0
+pkgdesc="Qt-based IMAP email client"
+url="https://trojita.flaska.net/"
+arch="all"
+options="!check"
+license="(GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1 WITH Nokia-Qt-exception-1.1 OR GPL-3.0-only) AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0+ AND LGPL-2.0-only AND LGPL-2.0+ AND LGPL-2.1+"
+depends=""
+depends_dev=""
+makedepends="cmake extra-cmake-modules zlib-dev qt5-qtbase-dev qt5-qtwebkit-dev
+ qt5-qttools-dev qt5-qtsvg-dev ragel mimetic-dev gpgme-dev
+ qtkeychain-dev $depends_dev"
+install=""
+source="https://sourceforge.net/projects/trojita/files/src/trojita-$pkgver.tar.xz
+ use-qgpgme.patch
+ fix-gpg.patch"
+
+build() {
+ cd "$builddir"
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DWITH_GPGMEPP=ON \
+ ${CMAKE_CROSSOPTS}
+ make
+}
+
+check() {
+ cd "$builddir"
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="fe4d9316f97d913619f27d24a5023c3d8dd4a6b9fb058651be12c67188f394aa8cbb60c7593e5eb28fc12fc883b76deeeb5f4f631edd255fdec4c5862c9a91c8 trojita-0.7.tar.xz
+740c2410d7236d722482f05dd1d2c681e35543620823cb7c1396710081f9de4f6ae530c5b5442ecf5d08a8e552f0697f3a35bf51e07a3b4336dec7021b665706 use-qgpgme.patch
+9d0fbf7c0b0f6975990a7705f9d43043e5807401cee179d7a07f9514856332d6bb1aa8448e84d0083003c34a3bb181080b973e8c1f77d1b5a8930d07d57702da fix-gpg.patch"
diff --git a/user/trojita/fix-gpg.patch b/user/trojita/fix-gpg.patch
new file mode 100644
index 000000000..2f7a3c705
--- /dev/null
+++ b/user/trojita/fix-gpg.patch
@@ -0,0 +1,12 @@
+diff -Nurd trojita-0.7/tests/Cryptography/keygen.sh trojita-0.7.new/tests/Cryptography/keygen.sh
+--- trojita-0.7/tests/Cryptography/keygen.sh 2016-06-15 02:17:23.000000000 -0500
++++ trojita-0.7.new/tests/Cryptography/keygen.sh 2018-07-31 15:36:25.968877808 -0500
+@@ -115,7 +115,7 @@
+ echo -n "key *\nexpire\nseconds=1\nsave\n" | ${GPG} --no-tty --quiet --command-fd 0 --edit-key "expired@test.trojita.flaska.net"
+
+ # extract fingerprint of key to be deleted
+-FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | cut -d : -f 10)"
++FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | head -n 1 | cut -d : -f 10)"
+
+ # delete key
+ yes | DISPLAY="" ${GPG} --quiet --batch --no-tty --delete-secret-and-public-key --yes --command-fd 0 --passphrase-fd 0 "${FINGERPRINT}"
diff --git a/user/trojita/use-qgpgme.patch b/user/trojita/use-qgpgme.patch
new file mode 100644
index 000000000..98e25603e
--- /dev/null
+++ b/user/trojita/use-qgpgme.patch
@@ -0,0 +1,25 @@
+diff -Nurd trojita-0.7/CMakeLists.txt trojita-0.7.new/CMakeLists.txt
+--- trojita-0.7/CMakeLists.txt 2016-06-15 02:17:23.000000000 -0500
++++ trojita-0.7.new/CMakeLists.txt 2018-07-31 01:06:59.887245141 -0500
+@@ -94,7 +94,7 @@
+ trojita_find_package(Git "" "" "" "")
+
+ trojita_find_package(Mimetic "" "http://www.codesink.org/mimetic_mime_library.html" "C++ MIME Library" "Required for client-side MIME parsing" WITH_MIMETIC)
+-trojita_find_package(KF5Gpgmepp "" "https://quickgit.kde.org/?p=gpgmepp.git" "C++ bindings for gpgme" "Needed for encrypted/signed e-mails" WITH_GPGMEPP)
++trojita_find_package(Gpgmepp "" "https://quickgit.kde.org/?p=gpgmepp.git" "C++ bindings for gpgme" "Needed for encrypted/signed e-mails" WITH_GPGMEPP)
+ trojita_option(WITH_CRYPTO_MESSAGES "Enable support for encrypted messages" AUTO "WITH_MIMETIC;WITH_GPGMEPP")
+
+ if(WIN32)
+@@ -626,11 +626,7 @@
+ endif()
+ if(WITH_CRYPTO_MESSAGES)
+ if(WITH_GPGMEPP)
+- if (WIN32)
+- target_link_libraries(Cryptography KF5::Gpgmepp KF5::QGpgme)
+- else()
+- target_link_libraries(Cryptography KF5::Gpgmepp-pthread KF5::QGpgme)
+- endif()
++ target_link_libraries(Cryptography Gpgmepp QGpgme)
+ endif()
+ endif()
+