diff --git a/.gitignore b/.gitignore index cf9ca32..a718a5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/kgpg-15.08.3.tar.xz -/kgpg-15.12.0.tar.xz +/kgpg-15.12.1.tar.xz diff --git a/kgpg-15.08.2-autostart.patch b/kgpg-15.08.2-autostart.patch deleted file mode 100644 index deede38..0000000 --- a/kgpg-15.08.2-autostart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up kgpg-15.08.2/kgpg.desktop.autostart kgpg-15.08.2/kgpg.desktop ---- kgpg-15.08.2/kgpg.desktop.autostart 2015-09-22 02:15:10.000000000 -0500 -+++ kgpg-15.08.2/kgpg.desktop 2015-11-06 10:18:49.453307376 -0600 -@@ -215,6 +215,7 @@ Name[zh_CN]=KGpg - Name[zh_TW]=KGpg - - X-KDE-autostart-after=panel --X-KDE-autostart-condition=kgpgrc:User Interface:AutoStart:false -+X-KDE-autostart-condition[$e]=$(kde4-config --path config --locate kgpgrc):User Interface:AutoStart:false - - Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM; -+OnlyShowIn=KDE; diff --git a/kgpg-4.8.80-gpg2.patch b/kgpg-4.8.80-gpg2.patch deleted file mode 100644 index 01e2064..0000000 --- a/kgpg-4.8.80-gpg2.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up kgpg-4.8.80/kgpgoptions.cpp.gpg2 kgpg-4.8.80/kgpgoptions.cpp ---- kgpg-4.8.80/kgpgoptions.cpp.gpg2 2012-05-23 02:38:31.000000000 +0200 -+++ kgpg-4.8.80/kgpgoptions.cpp 2012-06-03 11:58:35.151732768 +0200 -@@ -132,6 +132,16 @@ kgpgOptions::~kgpgOptions() - delete m_page7; - } - -+static QString gpgExecutable() -+{ -+ QString gpgExe = KStandardDirs::findExe( "gpg" ); -+ if ( gpgExe.isEmpty() ) -+ gpgExe = KStandardDirs::findExe( "gpg2" ); -+ if ( gpgExe.isEmpty() ) -+ return QLatin1String( "gpg" ); -+ return gpgExe; -+} -+ - void kgpgOptions::slotChangeHome() - { - QString gpgHome = KFileDialog::getExistingDirectory(m_page4->gpg_home_path->text(), this, i18n("New GnuPG Home Location")); -@@ -154,7 +164,7 @@ void kgpgOptions::slotChangeHome() - // start GnuPG so that it will create a config file - QString gpgbin = m_page4->kcfg_GpgBinaryPath->text(); - if (!QFile::exists(gpgbin)) -- gpgbin = QLatin1String( "gpg" ); -+ gpgbin = gpgExecutable(); - - KProcess p; - p << gpgbin << QLatin1String( "--homedir" ) << gpgHome << QLatin1String( "--no-tty" ) << QLatin1String( "--list-secret-keys" ); diff --git a/kgpg.spec b/kgpg.spec index 8e9be9a..d146148 100644 --- a/kgpg.spec +++ b/kgpg.spec @@ -1,11 +1,11 @@ Name: kgpg Summary: Manage GPG encryption keys -Version: 15.12.0 +Version: 15.12.1 Release: 1%{?dist} License: GPLv2+ -URL: https://projects.kde.org/projects/kde/kdeutils/kgpg +URL: https://projects.kde.org/kgpg %global revision %(echo %{version} | cut -d. -f3) %if %{revision} >= 50 %global stable unstable @@ -15,8 +15,6 @@ URL: https://projects.kde.org/projects/kde/kdeutils/kgpg Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz ## upstreamable patches -# add support for gpg2 to kgpg -Patch50: kgpg-4.8.80-gpg2.patch # add OnlyShowIn=KDE; hack to support X-KDE-Autostart-condition on plasma5 Patch51: kgpg-15.08.2-autostart.patch @@ -32,6 +30,7 @@ Obsoletes: kdeutils-kgpg < 6:4.7.80 Provides: kdeutils-kgpg = 6:%{version}-%{release} %{?kde_runtime_requires} + # kgpg (can be either gnupg or gnupg2, we'll default to the latter) Requires: gnupg2 @@ -39,12 +38,10 @@ Requires: gnupg2 %description KGpg is a simple interface for GnuPG, a powerful encryption utility. + %prep %setup -q -n %{name}-%{version} -%patch50 -p1 -b .gpg2 -%patch51 -p1 -b .autostart - %build mkdir %{_target_platform} @@ -58,11 +55,14 @@ make %{?_smp_mflags} -C %{_target_platform} %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} -%find_lang %{name} --with-kde --without-mo - mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart -mv %{buildroot}%{_kde4_datadir}/autostart/kgpg.desktop \ - %{buildroot}%{_sysconfdir}/xdg/autostart/ +sed \ + -e 's|^X-KDE-autostart-condition=.*|X-KDE-autostart-condition[$e]=$(kde4-config --path config --locate kgpgrc):User Interface:AutoStart:false|g' \ + %{buildroot}%{_kde4_datadir}/autostart/kgpg.desktop \ + > %{buildroot}%{_sysconfdir}/xdg/autostart/kgpg.desktop && \ +echo 'OnlyShowIn=KDE;' \ + >> %{buildroot}%{_sysconfdir}/xdg/autostart/kgpg.desktop && \ +rm -fv %{buildroot}%{_kde4_datadir}/autostart/kgpg.desktop # create/own kgpgrc mkdir -p %{buildroot}%{_kde4_configdir} @@ -87,7 +87,7 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null ||: update-desktop-database -q &> /dev/null ||: fi -%files -f %{name}.lang +%files %doc AUTHORS %license COPYING %{_kde4_bindir}/kgpg @@ -102,9 +102,15 @@ fi %{_kde4_datadir}/kde4/services/ServiceMenus/encryptfile.desktop %{_kde4_datadir}/kde4/services/ServiceMenus/encryptfolder.desktop %{_kde4_datadir}/kde4/services/ServiceMenus/viewdecrypted.desktop +%lang(en) %{_kde4_docdir}/HTML/en/kgpg/ %changelog +* Thu Jan 21 2016 Rex Dieter - 15.12.1-1 +- 15.12.1 +- drop gpg2 patch (no longer needed) +- fix kgpg.desktop validation (#1285296) + * Sun Dec 20 2015 Rex Dieter - 15.12.0-1 - 15.12.0 diff --git a/sources b/sources index 8576e29..dda6cd0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3bf0ee791439607bac5a7bf437d8b3e8 kgpg-15.12.0.tar.xz +5c75b13838df57dd3405991d0d6b8f11 kgpg-15.12.1.tar.xz