diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/otpclient/APKBUILD | 9 | ||||
-rw-r--r-- | testing/otpclient/respect-xdg.patch | 45 |
2 files changed, 51 insertions, 3 deletions
diff --git a/testing/otpclient/APKBUILD b/testing/otpclient/APKBUILD index a4417e4a7b..35cd057567 100644 --- a/testing/otpclient/APKBUILD +++ b/testing/otpclient/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leo <thinkabit.ukim@gmail.com> pkgname=otpclient pkgver=1.4.1 -pkgrel=0 +pkgrel=1 pkgdesc="Easy to use GTK+ OTP client" options="!check" # No testsuite url="https://github.com/paolostivanin/OTPClient" @@ -10,7 +10,9 @@ arch="all !aarch64" # due to zbar license="GPL-3.0-or-later" makedepends="gtk+3.0-dev glib-dev libgcrypt-dev libpng-dev libzip-dev zbar-dev jansson-dev libcotp-dev cmake" -source="$pkgname-$pkgver.tar.gz::https://github.com/paolostivanin/OTPClient/archive/v${pkgver}.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/paolostivanin/OTPClient/archive/v${pkgver}.tar.gz + respect-xdg.patch + " builddir="$srcdir/OTPClient-$pkgver" build() { @@ -25,4 +27,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="0bbd61ea272d2fa1558ec2dcad1b51acdbae9c9d520d73f7f31d4bc3d84946de69f96f1212507b48f3efab6561a2d850f8868e8932f022ed184e6aa06d43205d otpclient-1.4.1.tar.gz" +sha512sums="0bbd61ea272d2fa1558ec2dcad1b51acdbae9c9d520d73f7f31d4bc3d84946de69f96f1212507b48f3efab6561a2d850f8868e8932f022ed184e6aa06d43205d otpclient-1.4.1.tar.gz +5d00d4ed7645d0d4a8ef1528aea72f43e53bffc98d151e1cc1056e495f0f1a1c2c8cdadab4b7828c00402a7f952ddf43dcb105705b34481b2d6e19ce2e54a67a respect-xdg.patch" diff --git a/testing/otpclient/respect-xdg.patch b/testing/otpclient/respect-xdg.patch new file mode 100644 index 0000000000..c6f8e56c5e --- /dev/null +++ b/testing/otpclient/respect-xdg.patch @@ -0,0 +1,45 @@ +diff --git a/src/app.c b/src/app.c +index b3ca95b..e97adf3 100644 +--- a/src/app.c ++++ b/src/app.c +@@ -207,7 +207,7 @@ get_config_data (gint *width, + GKeyFile *kf = g_key_file_new (); + gchar *cfg_file_path; + #ifndef USE_FLATPAK_APP_FOLDER +- cfg_file_path = g_build_filename (g_get_home_dir (), ".config", "otpclient.cfg", NULL); ++ cfg_file_path = g_build_filename (g_get_user_config_dir (), "otpclient.cfg", NULL); + #else + cfg_file_path = g_build_filename (g_get_user_data_dir (), "otpclient.cfg", NULL); + #endif +@@ -291,7 +291,7 @@ get_db_path (GtkWidget *window) + gchar *db_path = NULL; + GError *err = NULL; + GKeyFile *kf = g_key_file_new (); +- gchar *cfg_file_path = g_build_filename (g_get_home_dir (), ".config", "otpclient.cfg", NULL); ++ gchar *cfg_file_path = g_build_filename (g_get_user_config_dir (), "otpclient.cfg", NULL); + if (g_file_test (cfg_file_path, G_FILE_TEST_EXISTS)) { + if (!g_key_file_load_from_file (kf, cfg_file_path, G_KEY_FILE_NONE, &err)) { + show_message_dialog (window, err->message, GTK_MESSAGE_ERROR); +@@ -471,7 +471,7 @@ save_window_size (gint width, + GKeyFile *kf = g_key_file_new (); + gchar *cfg_file_path; + #ifndef USE_FLATPAK_APP_FOLDER +- cfg_file_path = g_build_filename (g_get_home_dir (), ".config", "otpclient.cfg", NULL); ++ cfg_file_path = g_build_filename (g_get_user_config_dir (), "otpclient.cfg", NULL); + #else + cfg_file_path = g_build_filename (g_get_user_data_dir (), "otpclient.cfg", NULL); + #endif +diff --git a/src/settings.c b/src/settings.c +index ded570a..2808835 100644 +--- a/src/settings.c ++++ b/src/settings.c +@@ -12,7 +12,7 @@ settings_dialog_cb (GSimpleAction *simple __attribute__((unused)), + + gchar *cfg_file_path; + #ifndef USE_FLATPAK_APP_FOLDER +- cfg_file_path = g_build_filename (g_get_home_dir (), ".config", "otpclient.cfg", NULL); ++ cfg_file_path = g_build_filename (g_get_user_config_dir (), "otpclient.cfg", NULL); + #else + cfg_file_path = g_build_filename (g_get_user_data_dir (), "otpclient.cfg", NULL); + #endif + |