diff --git a/.gitignore b/.gitignore index b943161..708fdb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/ark-15.08.3.tar.xz +/ark-15.12.0.tar.xz diff --git a/ark-15.08.0-improve_subfolder_autodetection.patch b/ark-15.08.0-improve_subfolder_autodetection.patch deleted file mode 100644 index de13f85..0000000 --- a/ark-15.08.0-improve_subfolder_autodetection.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/app/batchextract.cpp b/app/batchextract.cpp -index 3ea90bd..fec7bc1 100644 ---- a/app/batchextract.cpp -+++ b/app/batchextract.cpp -@@ -67,9 +67,9 @@ void BatchExtract::addExtraction(Kerfuffle::Archive* archive) - { - QString destination = destinationFolder(); - -- if ((autoSubfolder()) && (!archive->isSingleFolderArchive())) { -+ if ((autoSubfolder()) && (!archive->isSingleFolderArchive() || !archive->fileBaseName().startsWith(archive->subfolderName()))) { - const QDir d(destination); -- QString subfolderName = archive->subfolderName(); -+ QString subfolderName = archive->fileBaseName(); - - if (d.exists(subfolderName)) { - subfolderName = KIO::suggestName(QUrl::fromUserInput(destination, QString(), QUrl::AssumeLocalFile), subfolderName); -diff --git a/kerfuffle/archive_kerfuffle.cpp b/kerfuffle/archive_kerfuffle.cpp -index 7b9990d..0ed2c1f 100644 ---- a/kerfuffle/archive_kerfuffle.cpp -+++ b/kerfuffle/archive_kerfuffle.cpp -@@ -209,6 +209,16 @@ QString Archive::fileName() const - return m_iface->filename(); - } - -+QString Archive::fileBaseName() const -+{ -+ QString base = QFileInfo(m_iface->filename()).completeBaseName(); -+ //special case for tar.gz/bzip2 files -+ if (base.right(4).toUpper() == QLatin1String(".TAR")) { -+ base.chop(4); -+ } -+ return base; -+} -+ - void Archive::onAddFinished(KJob* job) - { - //if the archive was previously a single folder archive and an add job -@@ -230,15 +240,7 @@ void Archive::onListFinished(KJob* job) - m_isPasswordProtected = ljob->isPasswordProtected(); - m_subfolderName = ljob->subfolderName(); - if (m_subfolderName.isEmpty()) { -- QFileInfo fi(fileName()); -- QString base = fi.completeBaseName(); -- -- //special case for tar.gz/bzip2 files -- if (base.right(4).toUpper() == QLatin1String(".TAR")) { -- base.chop(4); -- } -- -- m_subfolderName = base; -+ m_subfolderName = fileBaseName(); - } - - m_hasBeenListed = true; -diff --git a/kerfuffle/archive_kerfuffle.h b/kerfuffle/archive_kerfuffle.h -index f6fbbd8..488e650 100644 ---- a/kerfuffle/archive_kerfuffle.h -+++ b/kerfuffle/archive_kerfuffle.h -@@ -97,6 +97,7 @@ public: - ~Archive(); - - QString fileName() const; -+ QString fileBaseName() const; - bool isReadOnly() const; - - KJob* open(); -diff --git a/kerfuffle/jobs.cpp b/kerfuffle/jobs.cpp -index 3dabb4e..1c0f15d 100644 ---- a/kerfuffle/jobs.cpp -+++ b/kerfuffle/jobs.cpp -@@ -225,7 +225,8 @@ void ListJob::onNewEntry(const ArchiveEntry& entry) - m_isPasswordProtected |= entry [ IsPasswordProtected ].toBool(); - - if (m_isSingleFolderArchive) { -- const QString fileName(entry[FileName].toString()); -+ const QString fileName(entry[FileName].toString() -+ .replace(QRegExp(QString::fromLatin1("^\\./")), QString())); - const QString basePath(fileName.split(QLatin1Char( '/' )).at(0)); - - if (m_basePath.isEmpty()) { diff --git a/ark-15.12.0-improve_subfolder_autodetection.patch b/ark-15.12.0-improve_subfolder_autodetection.patch new file mode 100644 index 0000000..7a9be82 --- /dev/null +++ b/ark-15.12.0-improve_subfolder_autodetection.patch @@ -0,0 +1,76 @@ +diff -up ark-15.12.0/app/batchextract.cpp.improve_subfolder_autodetection ark-15.12.0/app/batchextract.cpp +--- ark-15.12.0/app/batchextract.cpp.improve_subfolder_autodetection 2015-12-09 06:01:32.000000000 -0600 ++++ ark-15.12.0/app/batchextract.cpp 2015-12-15 07:01:03.558096124 -0600 +@@ -67,9 +67,9 @@ void BatchExtract::addExtraction(Kerfuff + { + QString destination = destinationFolder(); + +- if ((autoSubfolder()) && (!archive->isSingleFolderArchive())) { ++ if ((autoSubfolder()) && (!archive->isSingleFolderArchive() || !archive->fileBaseName().startsWith(archive->subfolderName()))) { + const QDir d(destination); +- QString subfolderName = archive->subfolderName(); ++ QString subfolderName = archive->fileBaseName(); + + if (d.exists(subfolderName)) { + subfolderName = KIO::suggestName(QUrl::fromUserInput(destination, QString(), QUrl::AssumeLocalFile), subfolderName); +diff -up ark-15.12.0/kerfuffle/archive_kerfuffle.cpp.improve_subfolder_autodetection ark-15.12.0/kerfuffle/archive_kerfuffle.cpp +--- ark-15.12.0/kerfuffle/archive_kerfuffle.cpp.improve_subfolder_autodetection 2015-12-09 06:01:32.000000000 -0600 ++++ ark-15.12.0/kerfuffle/archive_kerfuffle.cpp 2015-12-15 07:01:03.558096124 -0600 +@@ -292,6 +292,16 @@ QString Archive::fileName() const + return m_iface->filename(); + } + ++QString Archive::fileBaseName() const ++{ ++ QString base = QFileInfo(m_iface->filename()).completeBaseName(); ++ //special case for tar.gz/bzip2 files ++ if (base.right(4).toUpper() == QLatin1String(".TAR")) { ++ base.chop(4); ++ } ++ return base; ++} ++ + void Archive::onAddFinished(KJob* job) + { + //if the archive was previously a single folder archive and an add job +@@ -313,15 +323,7 @@ void Archive::onListFinished(KJob* job) + m_isPasswordProtected = ljob->isPasswordProtected(); + m_subfolderName = ljob->subfolderName(); + if (m_subfolderName.isEmpty()) { +- QFileInfo fi(fileName()); +- QString base = fi.completeBaseName(); +- +- //special case for tar.gz/bzip2 files +- if (base.right(4).toUpper() == QLatin1String(".TAR")) { +- base.chop(4); +- } +- +- m_subfolderName = base; ++ m_subfolderName = fileBaseName(); + } + + m_hasBeenListed = true; +diff -up ark-15.12.0/kerfuffle/archive_kerfuffle.h.improve_subfolder_autodetection ark-15.12.0/kerfuffle/archive_kerfuffle.h +--- ark-15.12.0/kerfuffle/archive_kerfuffle.h.improve_subfolder_autodetection 2015-12-15 07:01:03.558096124 -0600 ++++ ark-15.12.0/kerfuffle/archive_kerfuffle.h 2015-12-15 07:02:45.776682176 -0600 +@@ -149,6 +149,7 @@ public: + ArchiveError error() const; + bool isValid() const; + QString fileName() const; ++ QString fileBaseName() const; + bool isReadOnly() const; + + KJob* open(); +diff -up ark-15.12.0/kerfuffle/jobs.cpp.improve_subfolder_autodetection ark-15.12.0/kerfuffle/jobs.cpp +--- ark-15.12.0/kerfuffle/jobs.cpp.improve_subfolder_autodetection 2015-12-09 06:01:32.000000000 -0600 ++++ ark-15.12.0/kerfuffle/jobs.cpp 2015-12-15 07:01:03.559096130 -0600 +@@ -226,7 +226,8 @@ void ListJob::onNewEntry(const ArchiveEn + m_isPasswordProtected |= entry [ IsPasswordProtected ].toBool(); + + if (m_isSingleFolderArchive) { +- const QString fileName(entry[FileName].toString()); ++ const QString fileName(entry[FileName].toString() ++ .replace(QRegExp(QString::fromLatin1("^\\./")), QString())); + const QString basePath(fileName.split(QLatin1Char( '/' )).at(0)); + + if (m_basePath.isEmpty()) { diff --git a/ark-unar-06.patch b/ark-unar-06.patch index bcebebc..11c5723 100644 --- a/ark-unar-06.patch +++ b/ark-unar-06.patch @@ -46,7 +46,7 @@ index 0000000..e0adcf7 + * + */ + -+#include "app/logging.h" ++//#include "app/logging.h" +#include "kerfuffle/cliinterface.h" +#include "kerfuffle/kerfuffle_export.h" + diff --git a/ark.spec b/ark.spec index 05cf089..d4a0053 100644 --- a/ark.spec +++ b/ark.spec @@ -4,8 +4,8 @@ Name: ark Summary: Archive manager -Version: 15.08.3 -Release: 2%{?dist} +Version: 15.12.0 +Release: 1%{?dist} License: GPLv2+ URL: http://utils.kde.org/projects/ark @@ -19,11 +19,13 @@ Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-% ## upstreamable patches # https://git.reviewboard.kde.org/r/107634/ -Patch53: ark-15.08.0-improve_subfolder_autodetection.patch +Patch53: ark-15.12.0-improve_subfolder_autodetection.patch +# NEEDSWORK porting for 15.12.x -- rex # https://git.reviewboard.kde.org/r/106294/ Patch54: ark-unar-06.patch ## upstream patches +Patch1: 0001-Fix-ark-doesn-t-exit-with-kxmlgui-5.17.patch BuildRequires: bzip2-devel BuildRequires: cmake @@ -95,8 +97,9 @@ Provides: kdeutils-ark-libs = 6:%{version}-%{release} %prep %setup -q -n %{name}-%{version} +%patch1 -p1 -b .0001 %patch53 -p1 -b .improve_subfolder_autodetection -%patch54 -p1 -b .unar-06 +#patch54 -p1 -b .unar-06 %build @@ -114,10 +117,6 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} # unpackaged files rm -fv %{buildroot}%{_kf5_libdir}/libkerfuffle.so -# rename appdata to match .desktop -mv %{buildroot}%{_kf5_datadir}/appdata/ark.appdata.xml \ - %{buildroot}%{_kf5_datadir}/appdata/org.kde.ark.appdata.xml ||: - # support kde4 servicemenus too mkdir -p %{buildroot}%{_kde4_datadir}/kde4/services/ServiceMenus/ cp -alf %{buildroot}%{_kf5_datadir}/kservices5/ServiceMenus/ark*.desktop \ @@ -171,6 +170,9 @@ fi %changelog +* Tue Dec 15 2015 Rex Dieter 15.12.0-1 +- 15.12.0 + * Mon Nov 16 2015 Rex Dieter 15.08.3-2 - support kde4 ServiceMenu too diff --git a/sources b/sources index 5c4f4b7..37f52e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -84cd97d4147620b31956ccb35878aa2e ark-15.08.3.tar.xz +4f492ed16ee7c87b8fd020071973db55 ark-15.12.0.tar.xz