diff --git a/.gitignore b/.gitignore index bea24d0..6914df5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,3 @@ -/ark-4.10.1.tar.xz -/ark-4.10.2.tar.xz -/ark-4.10.3.tar.xz -/ark-4.10.4.tar.xz -/ark-4.10.90.tar.xz -/ark-4.10.95.tar.xz -/ark-4.10.97.tar.xz -/ark-4.11.0.tar.xz -/ark-4.11.1.tar.xz -/ark-4.11.2.tar.xz -/ark-4.11.3.tar.xz -/ark-4.11.90.tar.xz -/ark-4.11.95.tar.xz -/ark-4.11.97.tar.xz -/ark-4.12.0.tar.xz -/ark-4.12.1.tar.xz -/ark-4.12.2.tar.xz -/ark-4.12.3.tar.xz -/ark-4.12.90.tar.xz -/ark-4.12.95.tar.xz -/ark-4.12.97.tar.xz -/ark-4.13.0.tar.xz -/ark-4.13.1.tar.xz -/ark-4.13.2.tar.xz -/ark-4.13.3.tar.xz +/ark-4.13.97.tar.xz +/ark-4.14.0.tar.xz +/ark-4.14.1.tar.xz diff --git a/ark-unar-06.patch b/ark-unar-06.patch new file mode 100644 index 0000000..ab2ef27 --- /dev/null +++ b/ark-unar-06.patch @@ -0,0 +1,236 @@ +diff --git a/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.desktop b/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.desktop +new file mode 100644 +index 0000000..2b5bd9e +--- /dev/null ++++ b/plugins/cliunarchiverplugin/kerfuffle_cliunarchiver.desktop +@@ -0,0 +1,15 @@ ++[Desktop Entry] ++Type=Service ++X-KDE-ServiceTypes=Kerfuffle/Plugin ++X-KDE-Library=kerfuffle_cliunarchiver ++X-KDE-PluginInfo-Author=Luke Shumaker ++X-KDE-PluginInfo-Email=lukeshu@sbcglobal.net ++X-KDE-PluginInfo-Name= kerfuffle_cliunarchiver ++X-KDE-PluginInfo-Version=0.0.1 ++X-KDE-PluginInfo-Website=http://www.kde.org ++X-KDE-PluginInfo-License=GPLv2+ ++X-KDE-Priority=150 ++X-KDE-Kerfuffle-APIRevision=1 ++X-KDE-Kerfuffle-ReadWrite=false ++Name=The Unarchiver plugin ++MimeType=application/x-rar; +diff --git a/plugins/cliunarchiverplugin/cliplugin.cpp b/plugins/cliunarchiverplugin/cliplugin.cpp +new file mode 100644 +index 0000000..e0adcf7 +--- /dev/null ++++ b/plugins/cliunarchiverplugin/cliplugin.cpp +@@ -0,0 +1,170 @@ ++ /* ++ * ark -- archiver for the KDE project ++ * ++ * Copyright (C) 2011 Luke Shumaker ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ * ++ */ ++ ++#include "kerfuffle/cliinterface.h" ++#include "kerfuffle/kerfuffle_export.h" ++ ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++using namespace Kerfuffle; ++ ++class CliPlugin: public CliInterface ++{ ++public: ++ explicit CliPlugin(QObject *parent, const QVariantList & args) ++ : CliInterface(parent, args) { ++ m_indentLevel = 0; ++ } ++ ++ virtual ~CliPlugin() { ++ } ++ ++ virtual ParameterList parameterList() const { ++ static ParameterList p; ++ if (p.isEmpty()) { ++ /* Limitations: ++ * 01 - creates an empty file upon entering wrong password ++ * 02 - unar detects if output is being redirected and then does not accept any input ++ */ ++ ++ ///////////////[ COMMON ]///////////// ++ ++ p[CaptureProgress] = false; ++ p[PasswordPromptPattern] = QLatin1String("Password (will not be shown): "); ++ ++ ///////////////[ LIST ]///////////// ++ ++ p[ListProgram] = QLatin1String("lsar"); ++ p[ListArgs] = QStringList() << QLatin1String("-json") << QLatin1String("$Archive"); ++ ++ ///////////////[ EXTRACT ]///////////// ++ ++ p[ExtractProgram] = QLatin1String("unar"); ++ p[ExtractArgs] = QStringList() << QLatin1String("$Archive") << QLatin1String("$Files") << QLatin1String("$PasswordSwitch") << QLatin1String("$RootNodeSwitch"); ++ p[NoTrailingSlashes] = true; ++ p[PasswordSwitch] = QStringList() << QLatin1String("-password") << QLatin1String("$Password"); ++ p[RootNodeSwitch] = QStringList() << QLatin1String("-output-directory") << QLatin1String("$Path"); ++ p[FileExistsExpression] = QLatin1String("^\\\"(.+)\\\" already exists."); ++ p[FileExistsInput] = QStringList() ++ << QLatin1String("o") //overwrite ++ << QLatin1String("s") //skip ++ << QLatin1String("O") //overwrite all ++ << QLatin1String("S") //autoskip ++ << QLatin1String("q") //cancel ++ ; ++ ++ ///////////////[ DELETE ]///////////// ++ ++ p[DeleteProgram] = QLatin1String("x-fakeprogram"); ++ //p[DeleteArgs] = ++ ++ ///////////////[ ADD ]///////////// ++ ++ p[AddProgram] = QLatin1String("x-fakeprogram"); ++ //p[AddArgs] = ++ ++ ///////////////[ ERRORS ]///////////// ++ ++ p[ExtractionFailedPatterns] = QStringList() ++ << QLatin1String("Failed! \\((.+)\\)$") ++ << QLatin1String("Segmentation fault$"); ++ ++ p[WrongPasswordPatterns] = QStringList() ++ << QLatin1String("Failed! \\((.+)\\)$"); ++ } ++ return p; ++ } ++ ++ QString m_entryFilename, m_internalId; ++ ArchiveEntry m_currentEntry; ++ int m_indentLevel; ++ ++ bool readListLine(const QString &line) { ++ /* lsar will give us JSON output. However, we actually parse based on ++ * the indentation. Ugly, I know, but ++ * 1. It's easier ++ * 2. lsar's JSON is invalid JSON, so actual parsers bork. ++ */ ++ ++ int spaces; ++ for(spaces=0;(spacesm_indentLevel) { ++ if (m_newIndentLevel==3) { ++ m_currentEntry.clear(); ++ m_currentEntry[IsDirectory] = false; ++ } ++ } else if (m_newIndentLevel=3) ) { ++ EntryMetaDataType index = IsDirectory; ++ if (m_currentEntry[index].toBool()) { ++ m_currentEntry[FileName].toString().append(QLatin1String("/")); ++ } ++ kDebug() << "Added entry:" << m_currentEntry; ++ entry(m_currentEntry); ++ } ++ } ++ m_indentLevel = m_newIndentLevel; ++ ++ QRegExp rx(QLatin1String("^\\s*\"([^\"]*)\": (.*),$")); ++ if (rx.indexIn(line) >= 0) { ++ QRegExp rx_unquote(QLatin1String("^\"(.*)\"$")); ++ QString key = rx.cap(1); ++ QString value = rx.cap(2); ++ ++ if (false) { ++ } else if (key==QLatin1String("XADFileName")) { ++ rx_unquote.indexIn(value); ++ m_currentEntry[FileName] = m_currentEntry[InternalID] = rx_unquote.cap(1); ++ } else if (key==QLatin1String("XADFileSize")) { ++ m_currentEntry[Size] = value.toInt(); ++ } else if (key==QLatin1String("XADCompressedSize")) { ++ m_currentEntry[CompressedSize] = value.toInt(); ++ } else if (key==QLatin1String("XADLastModificationDate")) { ++ QDateTime ts(QDate::fromString(value, QLatin1String("\"YYYY-MM-DD hh:mm:ss"))); ++ m_currentEntry[Timestamp] = ts; ++ } else if (key==QLatin1String("XADIsDirectory")) { ++ m_currentEntry[IsDirectory] = (value==QLatin1String("1")); ++ } else if (key==QLatin1String("RARCRC32")) { ++ m_currentEntry[CRC] = value.toInt(); ++ } else if (key==QLatin1String("RARCompressionMethod")) { ++ m_currentEntry[Method] = value.toInt(); ++ } else if (key==QLatin1String("Encrypted")) { ++ m_currentEntry[IsPasswordProtected] = (value.toInt() != 0); ++ } ++ // TODO: add RAR version. ([Version]) ++ } ++ ++ return true; ++ } ++}; ++ ++KERFUFFLE_EXPORT_PLUGIN(CliPlugin) ++ +diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt +index 3619412..6368839 100644 +--- a/plugins/CMakeLists.txt ++++ b/plugins/CMakeLists.txt +@@ -20,6 +20,7 @@ if (LIBARCHIVE_FOUND) + endif (LIBARCHIVE_FOUND) + + add_subdirectory( clirarplugin ) ++add_subdirectory( cliunarchiverplugin ) + add_subdirectory( cli7zplugin ) + add_subdirectory( clizipplugin ) + add_subdirectory( libsinglefileplugin ) +diff --git a/plugins/cliunarchiverplugin/CMakeLists.txt b/plugins/cliunarchiverplugin/CMakeLists.txt +new file mode 100644 +index 0000000..ccd52e7 +--- /dev/null ++++ b/plugins/cliunarchiverplugin/CMakeLists.txt +@@ -0,0 +1,21 @@ ++ ++include_directories( ++ ${CMAKE_CURRENT_SOURCE_DIR}/../.. ++ ${CMAKE_CURRENT_BINARY_DIR}/../.. ++ ) ++ ++########### next target ############### ++ ++set(kerfuffle_cliunarchiver_SRCS cliplugin.cpp) ++ ++kde4_add_plugin(kerfuffle_cliunarchiver ${kerfuffle_cliunarchiver_SRCS}) ++ ++target_link_libraries(kerfuffle_cliunarchiver ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} kerfuffle ) ++ ++ ++ ++########### install files ############### ++ ++install(TARGETS kerfuffle_cliunarchiver DESTINATION ${PLUGIN_INSTALL_DIR} ) ++install( FILES kerfuffle_cliunarchiver.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ++ diff --git a/ark.spec b/ark.spec index 0af2108..fda7fce 100644 --- a/ark.spec +++ b/ark.spec @@ -4,7 +4,7 @@ Name: ark Summary: Archive manager -Version: 4.13.3 +Version: 4.14.1 Release: 1%{?dist} License: GPLv2+ @@ -24,6 +24,8 @@ Patch50: ark-4.7.80-namelink_skip.patch Patch52: ark-4.9.97-r107635.patch # https://git.reviewboard.kde.org/r/107634/ Patch53: ark-4.9.97-improve_subfolder_autodetection.patch +# https://git.reviewboard.kde.org/r/106294/ +Patch54: ark-unar-06.patch ## upstream patches @@ -31,6 +33,7 @@ BuildRequires: bzip2-devel BuildRequires: desktop-file-utils BuildRequires: kdelibs4-devel >= %{version} BuildRequires: kde-baseapps-devel >= %{version} +BuildRequires: libappstream-glib BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(liblzma) BuildRequires: zlib-devel @@ -56,6 +59,7 @@ Requires: gzip %if 0%{?p7zip} Requires: p7zip-plugins %endif +#Requires: unar Requires: unzip %description @@ -82,6 +86,7 @@ Provides: kdeutils-ark-libs = 6:%{version}-%{release} %patch50 -p1 -b .namelink_skip %patch52 -p1 -b .r107635 %patch53 -p1 -b .improve_subfolder_autodetection +%patch54 -p1 -b .unar-06 %build @@ -100,6 +105,7 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %check +appstream-util validate-relax --nonet %{buildroot}%{_kde4_datadir}/appdata/%{name}.appdata.xml desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/ark.desktop @@ -124,6 +130,7 @@ fi %{_kde4_datadir}/config.kcfg/ark.kcfg %{_kde4_datadir}/kde4/services/ark*.desktop %{_kde4_datadir}/kde4/services/ServiceMenus/ark*.desktop +%{_kde4_datadir}/appdata/%{name}.appdata.xml %{_kde4_datadir}/applications/kde4/ark.desktop %{_kde4_iconsdir}/hicolor/*/apps/ark.* %{_kde4_libdir}/kde4/arkpart.so @@ -141,6 +148,24 @@ fi %changelog +* Tue Sep 16 2014 Rex Dieter - 4.14.1-1 +- 4.14.1 + +* Fri Aug 15 2014 Fedora Release Engineering - 4.14.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Aug 15 2014 Rex Dieter - 4.14.0-1 +- 4.14.0 + +* Thu Aug 14 2014 Rex Dieter 4.13.97-3 +- add unar support + +* Fri Aug 08 2014 Rex Dieter 4.13.97-2 +- new appdata validation + +* Tue Aug 05 2014 Rex Dieter - 4.13.97-1 +- 4.13.97 + * Tue Jul 15 2014 Rex Dieter - 4.13.3-1 - 4.13.3 diff --git a/sources b/sources index e9b03a8..fd1c144 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6af368a29e1f0c0a673b119cb2827e99 ark-4.13.3.tar.xz +55fcc756e600e18cdc8bfc5c562657a8 ark-4.14.1.tar.xz