diff --git a/0001-Add-an-AudioThumnail.patch b/0001-Add-an-AudioThumnail.patch deleted file mode 100644 index f9f705a..0000000 --- a/0001-Add-an-AudioThumnail.patch +++ /dev/null @@ -1,362 +0,0 @@ -From 238818850f897a8f4c92b0ec76ec13b07ee20d40 Mon Sep 17 00:00:00 2001 -From: Hrvoje Senjan -Date: Sun, 14 Sep 2014 23:35:53 +0200 -Subject: [PATCH 1/1] Add an AudioThumnail - ---- - thumbnail/CMakeLists.txt | 70 +++++++++++++++ - thumbnail/audiocreator.cpp | 181 +++++++++++++++++++++++++++++++++++++++ - thumbnail/audiocreator.h | 39 +++++++++ - thumbnail/audiothumbnail.desktop | 11 +++ - 4 files changed, 301 insertions(+) - create mode 100644 thumbnail/audiocreator.cpp - create mode 100644 thumbnail/audiocreator.h - create mode 100644 thumbnail/audiothumbnail.desktop - -diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt -index 4c2d5e9..ccff1ad 100644 ---- a/thumbnail/CMakeLists.txt -+++ b/thumbnail/CMakeLists.txt -@@ -22,6 +22,63 @@ set_package_properties(Exiv2 PROPERTIES DESCRIPTION "A library to access image m - - macro_bool_to_01(EXIV2_FOUND HAVE_EXIV2) - -+set(WITH_TAGLIB ON CACHE BOOL "build with TagLib") -+set(WITH_FLAC ON CACHE BOOL "build with FLAC") -+ -+### Check for taglib -+set(TAGLIB_LIBRARIES) -+set(TAGLIB_CFLAGS) -+if(WITH_TAGLIB) -+ find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS /usr/bin /usr/local/bin ${BIN_INSTALL_DIR}) -+ if(TAGLIBCONFIG_EXECUTABLE) -+ exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) -+ exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS) -+ exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) -+ if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS AND TAGLIB_VERSION) -+ if( ${TAGLIB_VERSION} VERSION_LESS 1.4 ) -+ message(FATAL_ERROR "Needed at least taglib 1.4") -+ else() -+ set(TAGLIB_INSTALLED_VERSION_OK TRUE) -+ endif() -+ if(TAGLIB_INSTALLED_VERSION_OK) -+ set(HAVE_TAGLIB 1) -+ message(STATUS "TagLib found: ${TAGLIB_LIBRARIES}") -+ endif(TAGLIB_INSTALLED_VERSION_OK) -+ endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS AND TAGLIB_VERSION) -+ endif(TAGLIBCONFIG_EXECUTABLE) -+ if (NOT HAVE_TAGLIB) -+ message(FATAL_ERROR "Could not find Taglib") -+ endif (NOT HAVE_TAGLIB) -+endif(WITH_TAGLIB) -+ -+### Check for FLAC++ -+set(FLAC_LIBRARIES) -+if(WITH_FLAC) -+ find_path(FLACPP_INCLUDE_DIR FLAC++/metadata.h) -+ find_library(FLAC_LIBRARY NAMES FLAC) -+ find_library(FLACPP_LIBRARY NAMES FLAC++) -+ if(FLACPP_INCLUDE_DIR AND FLAC_LIBRARY AND FLACPP_LIBRARY) -+ set(FLAC_LIBRARIES ${FLACPP_LIBRARY} ${FLAC_LIBRARY}) -+ message(STATUS "FLAC++ found: ${FLAC_LIBRARIES}") -+ set(HAVE_FLAC 1) -+ -+ set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES}) -+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${FLAC_LIBRARIES} ${FLACPP_LIBRARIES}) -+ CHECK_CXX_SOURCE_COMPILES("#include \nint main() {\n FLAC::Metadata::VorbisComment vc;\n const ::FLAC__StreamMetadata* fsmd = vc;\n return 0;\n}\n" FLAC_STREAMMETADATA_OPERATOR_FOUND) -+ CHECK_CXX_SOURCE_COMPILES("#include \nint main() {\n FLAC::Metadata::Picture pic;\n return 0;\n}\n" FLAC_METADATA_PICTURE_FOUND) -+ set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP}) -+ -+ if(NOT FLAC_STREAMMETADATA_OPERATOR_FOUND) -+ set(HAVE_NO_FLAC_STREAMMETADATA_OPERATOR 1) -+ endif(NOT FLAC_STREAMMETADATA_OPERATOR_FOUND) -+ if(FLAC_METADATA_PICTURE_FOUND) -+ set(HAVE_FLAC_PICTURE 1) -+ endif(FLAC_METADATA_PICTURE_FOUND) -+ else(FLACPP_INCLUDE_DIR AND FLAC_LIBRARY AND FLACPP_LIBRARY) -+ message(FATAL_ERROR "Could not find FLAC++") -+ endif(FLACPP_INCLUDE_DIR AND FLAC_LIBRARY AND FLACPP_LIBRARY) -+endif(WITH_FLAC) -+ - include_directories(${JPEG_INCLUDE_DIR}) - if(EXIV2_FOUND) - include_directories(${EXIV2_INCLUDE_DIR}) -@@ -219,6 +276,18 @@ install(TARGETS comicbookthumbnail DESTINATION ${PLUGIN_INSTALL_DIR}) - - ########### install files ############### - -+########### next target ############### -+ -+set(audiothumbnail_SRCS audiocreator.cpp) -+ -+add_library(audiothumbnail MODULE ${audiothumbnail_SRCS}) -+ -+target_link_libraries(audiothumbnail KF5::KIOWidgets ${TAGLIB_LIBRARIES} ${FLAC_LIBRARIES}) -+ -+install(TARGETS audiothumbnail DESTINATION ${PLUGIN_INSTALL_DIR}) -+ -+########### install files ############### -+ - install(FILES thumbcreator.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) - install(FILES - thumbnail.protocol -@@ -226,6 +295,7 @@ install(FILES - imagethumbnail.desktop - jpegthumbnail.desktop - textthumbnail.desktop -+ audiothumbnail.desktop - # desktopthumbnail.desktop - comicbookthumbnail.desktop - kraorathumbnail.desktop -diff --git a/thumbnail/audiocreator.cpp b/thumbnail/audiocreator.cpp -new file mode 100644 -index 0000000..4bc69d6 ---- /dev/null -+++ b/thumbnail/audiocreator.cpp -@@ -0,0 +1,181 @@ -+ -+/*************************************************************************** -+ * This file is part of the AudioThumbs. * -+ * Copyright (C) 2009 Vytautas Mickus * -+ * Copyright (C) 2011 Raizner Evgeniy * -+ * * -+ * This library is free software; you can redistribute it and/or modify * -+ * it under the terms of the GNU Lesser General Public License version * -+ * 2.1 as published by the Free Software Foundation. * -+ * * -+ * This library 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 * -+ * Lesser General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU Lesser General Public * -+ * License along with this library; if not, write to the Free Software * -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * -+ * MA 02110-1301 USA * -+ ***************************************************************************/ -+ -+#include "audiocreator.h" -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+extern "C" -+{ -+ Q_DECL_EXPORT ThumbCreator *new_creator() -+ { -+ return new ATCreator; -+ } -+} -+ -+ -+ATCreator::ATCreator() -+{ -+ -+} -+ -+ATCreator::~ATCreator() -+{ -+ -+} -+ -+bool ATCreator::create ( const QString &path, int /*w*/, int /*h*/, QImage &img ) -+{ -+ bool bRet = false; -+ -+ QMimeDatabase db; -+ QMimeType type = db.mimeTypeForFile(path, QMimeDatabase::MatchExtension); -+ -+ if (type.name() == "audio/mpeg") { -+ TagLib::MPEG::File mp3File(path.toUtf8()); -+ TagLib::ID3v2::Tag *mp3Tag = mp3File.ID3v2Tag(); -+ TagLib::ID3v2::FrameList fList = mp3Tag->frameList("APIC"); -+ TagLib::ID3v2::AttachedPictureFrame *pic; -+ pic = static_cast(fList.front()); -+ if (!pic->picture().isEmpty()) { -+ img.loadFromData((const uchar *) pic->picture().data(),pic->picture().size()); -+ bRet = true; -+ } -+ -+ } else if (type.name() == "audio/flac" || type.name() == "audio/x-flac") { -+ TagLib::FLAC::File ff(path.toUtf8()); -+ TagLib::List coverList; -+ -+ if (!ff.pictureList().isEmpty()) { -+ coverList.append(ff.pictureList().front()); -+ TagLib::ByteVector coverData = coverList.front()->data(); -+ QByteArray data; -+ data.setRawData(coverData.data(),coverData.size()); -+ img.loadFromData(data); -+ bRet = true; -+ return bRet; -+ } -+ -+ } else if (type.name() == "audio/mp4") { -+ TagLib::MP4::File mp4file(path.toUtf8()); -+ TagLib::MP4::Tag *tag = mp4file.tag(); -+ TagLib::MP4::ItemListMap map=tag->itemListMap(); -+ QByteArray data; -+ -+ if (!map.isEmpty()) { -+ for (TagLib::MP4::ItemListMap::ConstIterator it = map.begin(); it != map.end(); ++it) { -+ TagLib::MP4::CoverArtList coverList=(*it).second.toCoverArtList(); -+ if (!coverList.isEmpty()) { -+ TagLib::MP4::CoverArt cover=coverList[0]; -+ -+ TagLib::ByteVector coverData=cover.data(); -+ data.setRawData(coverData.data(),coverData.size()); -+ img.loadFromData(data); -+ -+ bRet = true; -+ return bRet; -+ } -+ } -+ } -+ } else if (type.name() == "audio/x-vorbis+ogg" || type.name() == "audio/ogg") { -+ // this part from Coquillo audio tag editor -+ TagLib::Ogg::Vorbis::File file(path.toUtf8()); -+ TagLib::Ogg::XiphComment *tag = file.tag(); -+ -+ if (tag->contains("METADATA_BLOCK_PICTURE")) { -+ TagLib::StringList blocks = tag->fieldListMap()["METADATA_BLOCK_PICTURE"]; -+ -+ for (uint i = 0; i < blocks.size(); i++) { -+ QByteArray data = QByteArray::fromBase64(blocks[i].toCString()); -+ QDataStream s(&data, QIODevice::ReadOnly); -+ -+ int type; -+ uint mimelen; -+ int descrlen; -+ int datalen; -+ -+ int w; -+ int h; -+ int c; -+ int ic; -+ -+ char * mime; -+ char * descr; -+ char * pic; -+ -+ s >> type; -+ s >> mimelen; -+ -+ mime = new char[mimelen+1]; -+ s.readRawData(mime, mimelen); -+ -+ mime[mimelen] = 0; -+ -+ s >> descrlen; -+ -+ descr = new char[descrlen+1]; -+ s.readRawData(descr, descrlen); -+ -+ descr[descrlen] = 0; -+ -+ s >> w >> h >> c >> ic >> datalen; -+ -+ if (!datalen) -+ return false; -+ -+ pic = new char[datalen]; -+ s.readRawData(pic, datalen); -+ img = QImage::fromData(QByteArray(pic, datalen)); -+ -+ bRet = true; -+ } -+ } -+ } -+ -+ return bRet; -+} -+ -+ThumbCreator::Flags ATCreator::flags() const -+{ -+ return (Flags)(None); -+} -+ -diff --git a/thumbnail/audiocreator.h b/thumbnail/audiocreator.h -new file mode 100644 -index 0000000..f7badbd ---- /dev/null -+++ b/thumbnail/audiocreator.h -@@ -0,0 +1,39 @@ -+ -+/*************************************************************************** -+ * This file is part of the AudioThumbs. * -+ * Copyright (C) 2009 Vytautas Mickus * -+ * Copyright (C) 2011 Raizner Evgeniy * -+ * * -+ * This library is free software; you can redistribute it and/or modify * -+ * it under the terms of the GNU Lesser General Public License version * -+ * 2.1 as published by the Free Software Foundation. * -+ * * -+ * This library 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 * -+ * Lesser General Public License for more details. * -+ * * -+ * You should have received a copy of the GNU Lesser General Public * -+ * License along with this library; if not, write to the Free Software * -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * -+ * MA 02110-1301 USA * -+ ***************************************************************************/ -+ -+#ifndef _AUDIO_THUMBS_H_ -+#define _AUDIO_THUMBS_H_ -+ -+#include -+#include -+ -+class ATCreator : public QObject, public ThumbCreator -+{ -+ Q_OBJECT -+public: -+ ATCreator(); -+ virtual ~ATCreator(); -+ virtual bool create(const QString &path, int w, int h, QImage &img); -+ virtual Flags flags() const; -+private: -+}; -+ -+#endif // _AUDIO_THUMBS_H_ -diff --git a/thumbnail/audiothumbnail.desktop b/thumbnail/audiothumbnail.desktop -new file mode 100644 -index 0000000..ddbb582 ---- /dev/null -+++ b/thumbnail/audiothumbnail.desktop -@@ -0,0 +1,11 @@ -+[Desktop Entry] -+Type=Service -+Name=Audio Files -+Name[lt]=Audio failai -+Name[ru]=Аудио файлы -+Name[ua]=Аудiо файли -+X-KDE-ServiceTypes=ThumbCreator -+MimeType=audio/mpeg;audio/flac;audio/x-flac;audio/mp4;audio/x-vorbis+ogg;audio/ogg; -+X-KDE-Library=audiothumbnail -+CacheThumbnail=true -+IgnoreMaximumSize=true --- -2.1.0 - diff --git a/kio-extras-16.12.3.tar.xz b/kio-extras-16.12.3.tar.xz deleted file mode 100644 index b121607..0000000 --- a/kio-extras-16.12.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5af7b4dac320ed6d0897c8940e6043ef45a4e1d3a4f9f12e8513215633a5d7d5 -size 279872 diff --git a/kio-extras-17.04.0.tar.xz b/kio-extras-17.04.0.tar.xz new file mode 100644 index 0000000..b1a831c --- /dev/null +++ b/kio-extras-17.04.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29eaece2047390e0582040e86e26b455d6c0e2f1cb6c5cf4d5f4a3f470806acf +size 552700 diff --git a/kio-extras5.changes b/kio-extras5.changes index a9263cc..bed0452 100644 --- a/kio-extras5.changes +++ b/kio-extras5.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Sun Apr 16 10:45:01 CEST 2017 - lbeltrame@kde.org + +- Update to 17.04.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-17.04.0.php +- Changes since 17.03.90: + * None + +------------------------------------------------------------------- +Wed Apr 12 20:25:38 CEST 2017 - lbeltrame@kde.org + +- Update to 17.03.90 + * New bugfix release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-17.04-rc.php +- Changes since 17.03.80: + * None + +------------------------------------------------------------------- +Sat Mar 25 23:10:31 CET 2017 - lbeltrame@kde.org + +- Update to 17.03.80 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/announce-applications-17.03.80.php +- Changes since 16.12.3: + * Too many changes to list here + ------------------------------------------------------------------- Thu Mar 9 20:21:20 UTC 2017 - alarrosa@suse.com @@ -30,14 +60,14 @@ Thu Feb 9 06:58:19 UTC 2017 - lbeltrame@kde.org Sat Jan 14 08:57:29 UTC 2017 - lbeltrame@kde.org - - Update to KDE Applications 16.12.1 - * KDE Applications 16.12.1 + * KDE Applications 16.12.1 * https://www.kde.org/announcements/announce-applications-16.12.1.php ------------------------------------------------------------------- Tue Dec 13 19:45:26 UTC 2016 - tittiatcoke@gmail.com - Update to KDE Applications 16.12.0 - * KDE Applications 16.12.0 + * KDE Applications 16.12.0 * https://www.kde.org/announcements/announce-applications-16.12.0.php @@ -149,7 +179,7 @@ Mon Apr 11 06:42:18 UTC 2016 - tittiatcoke@gmail.com Sun Mar 13 15:45:14 UTC 2016 - tittiatcoke@gmail.com - Update to KDE Applications 15.12.3 - * KDE Applications 15.12.3 + * KDE Applications 15.12.3 * https://www.kde.org/announcements/announce-applications-15.12.3.php * boo#970855 @@ -158,7 +188,7 @@ Sun Mar 13 15:45:14 UTC 2016 - tittiatcoke@gmail.com Sat Feb 13 08:12:31 UTC 2016 - tittiatcoke@gmail.com - Update to KDE Applications 15.12.2 - * KDE Applications 15.12.2 + * KDE Applications 15.12.2 * https://www.kde.org/announcements/announce-applications-15.12.2.php * boo#966605 @@ -167,7 +197,7 @@ Sat Feb 13 08:12:31 UTC 2016 - tittiatcoke@gmail.com Sat Jan 9 18:20:58 UTC 2016 - tittiatcoke@gmail.com - Update to KDE Applications 15.12.1 - * KDE Applications 15.12.1 + * KDE Applications 15.12.1 * https://www.kde.org/announcements/announce-applications-15.12.1.php * boo#961265 @@ -176,7 +206,7 @@ Sat Jan 9 18:20:58 UTC 2016 - tittiatcoke@gmail.com Sun Dec 13 13:20:36 UTC 2015 - tittiatcoke@gmail.com - Update to KDE Applications 15.12.0 - * KDE Applications 15.12.0 + * KDE Applications 15.12.0 * https://www.kde.org/announcements/announce-applications-15.12.0.php * boo#958887 @@ -185,7 +215,7 @@ Sun Dec 13 13:20:36 UTC 2015 - tittiatcoke@gmail.com Tue Nov 10 20:09:30 UTC 2015 - tittiatcoke@gmail.com - Update to KDE Applications 15.08.3 - * KDE Applications 15.08.3 + * KDE Applications 15.08.3 * https://www.kde.org/announcements/announce-applications-15.08.3.php * boo#954531 @@ -194,7 +224,7 @@ Tue Nov 10 20:09:30 UTC 2015 - tittiatcoke@gmail.com Sun Oct 11 13:32:22 UTC 2015 - tittiatcoke@gmail.com - Update to KDE Applications 15.08.2 - * KDE Applications 15.08.2 + * KDE Applications 15.08.2 * https://www.kde.org/announcements/announce-applications-15.08.2.php @@ -202,7 +232,7 @@ Sun Oct 11 13:32:22 UTC 2015 - tittiatcoke@gmail.com Sun Sep 13 19:16:14 UTC 2015 - tittiatcoke@gmail.com - Update to KDE Applications 15.08.1 - * KDE Applications 15.08.1 + * KDE Applications 15.08.1 * https://www.kde.org/announcements/announce-applications-15.08.1.php diff --git a/kio-extras5.spec b/kio-extras5.spec index 8d4ce52..cab31e1 100644 --- a/kio-extras5.spec +++ b/kio-extras5.spec @@ -15,12 +15,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%bcond_without lang Name: kio-extras5 -Version: 16.12.3 +Version: 17.04.0 Release: 0 %define kf5_version 5.26.0 -# Latest stable Applications (e.g. 16.08 in KA, but 16.12.3 in KUA) +# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA) %{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')} Summary: Additional KIO-slaves for KDE applications License: GPL-2.0+ @@ -28,8 +29,7 @@ Group: System/GUI/KDE Url: http://www.kde.org Source: kio-extras-%{version}.tar.xz Source99: %{name}-rpmlintrc -Patch0: 0001-Add-an-AudioThumnail.patch -Patch1: fix-mtp-paste-with-KF5-5.25.diff +Patch0: fix-mtp-paste-with-KF5-5.25.diff BuildRequires: OpenEXR-devel BuildRequires: flac-devel BuildRequires: kactivities5-devel @@ -71,15 +71,19 @@ Recommends: libqt5-qtimageformats #BuildRequires: update-desktop-files Provides: kfileaudiopreview = 4.100.0 Obsoletes: kfileaudiopreview <= 4.100.0 +Recommends: %{name}-lang BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Additional KIO-slaves for KDE applications. +%if %{with lang} +%lang_package +%endif + %prep %setup -q -n kio-extras-%{version} %patch0 -p1 -%patch1 -p1 sed -i '/^add_subdirectory( doc )/d' CMakeLists.txt %build @@ -88,6 +92,10 @@ sed -i '/^add_subdirectory( doc )/d' CMakeLists.txt %install %kf5_makeinstall -C build + %if %{with lang} + %kf5_find_lang + %kf5_find_htmldocs + %endif # we don't need nor want devel symlink, and dbus interface -- kio-extras don't install any headers, # nor are meant for development rm -rf %{buildroot}%{_kf5_sharedir}/dbus-1/ @@ -111,4 +119,8 @@ sed -i '/^add_subdirectory( doc )/d' CMakeLists.txt %{_kf5_sharedir}/solid/ %{_kf5_sharedir}/mime/packages/kf5_network.xml +%if %{with lang} +%files lang -f %{name}.lang +%endif + %changelog