commit 83bce6fd7ad77a53f5a73b91e71c7bfc0f841e96
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sun Feb 11 09:10:57 2018 +0000
Remove Scriptlets
01-Fix-build-with-upcoming-Libav-10-release.patch | 20 ++++++----
02-CodecID.patch | 31 ++++++++++------
04-typo-warning.patch | 24 ++++++------
05-g++-6-char-cast.patch | 26 +++++++------
06-taglib.patch | 3 --
acoustid-fingerprinter.spec | 45 ++++++++++-------------
sources | 2 +-
7 files changed, 82 insertions(+), 69 deletions(-)
---
diff --git a/01-Fix-build-with-upcoming-Libav-10-release.patch
b/01-Fix-build-with-upcoming-Libav-10-release.patch
index f85d7e4..2d99570 100644
--- a/01-Fix-build-with-upcoming-Libav-10-release.patch
+++ b/01-Fix-build-with-upcoming-Libav-10-release.patch
@@ -1,8 +1,14 @@
-Description: Fix build with upcoming Libav 10 release
- Drops support for pre-0.8 releases to reduce clutter, but those are over
- three years old now and no current distros carry them.
-Forwarded:
https://bitbucket.org/acoustid/acoustid-fingerprinter/pull-request/3/fix-...
-Author: Anton Khirnov <anton(a)khirnov.net>
+From 2c778334a9fc2f0ccf9b1d7635c116bce6509748 Mon Sep 17 00:00:00 2001
+From: Anton Khirnov <anton(a)khirnov.net>
+Date: Sun, 17 Jul 2016 08:56:40 +0200
+Subject: [PATCH] Fix build with upcoming Libav 10 release
+
+Drops support for pre-0.8 releases to reduce clutter, but those are over
+three years old now and no current distros carry them.
+---
+ decoder.h | 84 ++++++++++++++++++++++++---------------------------------------
+ 1 file changed, 32 insertions(+), 52 deletions(-)
+
diff --git a/decoder.h b/decoder.h
index 028f58f..310fe2d 100644
--- a/decoder.h
@@ -31,7 +37,7 @@ index 028f58f..310fe2d 100644
class Decoder
{
public:
-@@ -67,8 +69,6 @@ public:
+@@ -67,8 +69,6 @@ class Decoder
static void initialize();
private:
@@ -40,7 +46,7 @@ index 028f58f..310fe2d 100644
uint8_t *m_buffer2;
std::string m_file_name;
std::string m_error;
-@@ -77,6 +77,7 @@ private:
+@@ -77,6 +77,7 @@ class Decoder
bool m_codec_open;
AVStream *m_stream;
static QMutex m_mutex;
diff --git a/02-CodecID.patch b/02-CodecID.patch
index 995766d..b3d29f2 100644
--- a/02-CodecID.patch
+++ b/02-CodecID.patch
@@ -1,13 +1,20 @@
-Description: Replace removed macros
- Rename CodecID to AVCodecID and replace AVCODEC_MAX_AUDIO_FRAME_SIZE
- with its last value 192000.
+From 5b3d32b26a7e4522b7c1b59b1d75367f2779c98d Mon Sep 17 00:00:00 2001
+From: Andreas Cadhalpun <Andreas.Cadhalpun(a)googlemail.com>
+Date: Sun, 17 Jul 2016 08:57:45 +0200
+Subject: [PATCH] Replace removed macros
-Author: Andreas Cadhalpun <Andreas.Cadhalpun(a)googlemail.com>
-Last-Update: <2014-05-13>
+Rename CodecID to AVCodecID and replace AVCODEC_MAX_AUDIO_FRAME_SIZE
+with its last value 192000.
+---
+ decoder.h | 2 +-
+ ffmpeg/audioconvert.h | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
---- acoustid-fingerprinter-0.6.orig/decoder.h
-+++ acoustid-fingerprinter-0.6/decoder.h
-@@ -116,7 +116,7 @@ inline Decoder::Decoder(const std::strin
+diff --git a/decoder.h b/decoder.h
+index 310fe2d..92156de 100644
+--- a/decoder.h
++++ b/decoder.h
+@@ -116,7 +116,7 @@ inline Decoder::Decoder(const std::string &file_name)
#endif
{
#ifdef HAVE_AV_AUDIO_CONVERT
@@ -16,9 +23,11 @@ Last-Update: <2014-05-13>
#endif
#if NEW_AVFRAME_API
---- acoustid-fingerprinter-0.6.orig/ffmpeg/audioconvert.h
-+++ acoustid-fingerprinter-0.6/ffmpeg/audioconvert.h
-@@ -75,11 +75,11 @@ int avcodec_channel_layout_num_channels(
+diff --git a/ffmpeg/audioconvert.h b/ffmpeg/audioconvert.h
+index 2b28e2e..69c0db2 100644
+--- a/ffmpeg/audioconvert.h
++++ b/ffmpeg/audioconvert.h
+@@ -75,11 +75,11 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout);
/**
* Guess the channel layout
* @param nb_channels
diff --git a/04-typo-warning.patch b/04-typo-warning.patch
index 885782e..d7a65c1 100644
--- a/04-typo-warning.patch
+++ b/04-typo-warning.patch
@@ -1,15 +1,17 @@
-Description: Fix typo in warning message
- Patch found in version 0.6-4.
-Author: Petter Reinholdtsen <pere(a)hungry.com>
-Origin: debian
-Forwarded: not-needed
-Origin:
https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/fb80fb843fd...
-Reviewed-By: Petter Reinholdtsen <pere(a)hungry.com>
-Last-Update: 2016-07-16
+From 6cb95c67cd9699fb3d703451eb1c4bcabc96e25f Mon Sep 17 00:00:00 2001
+From: Wieland Hoffmann <themineo+bb(a)gmail.com>
+Date: Tue, 5 Nov 2013 12:08:52 +0000
+Subject: [PATCH] Change 'Submittion' to 'Submission' in a warning
message
---- acoustid-fingerprinter-0.6.orig/fingerprinter.cpp
-+++ acoustid-fingerprinter-0.6/fingerprinter.cpp
-@@ -261,7 +261,7 @@ void Fingerprinter::onRequestFinished(QN
+---
+ fingerprinter.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fingerprinter.cpp b/fingerprinter.cpp
+index db03313..940a70b 100644
+--- a/fingerprinter.cpp
++++ b/fingerprinter.cpp
+@@ -261,7 +261,7 @@ void Fingerprinter::onRequestFinished(QNetworkReply *reply)
stop = true;
}
else {
diff --git a/05-g++-6-char-cast.patch b/05-g++-6-char-cast.patch
index 2d31d03..743af42 100644
--- a/05-g++-6-char-cast.patch
+++ b/05-g++-6-char-cast.patch
@@ -1,15 +1,19 @@
-Description: Fix build failure on gcc 6
- Array initializers for a char array fail for constants > 128
- on platforms where char is signed. Cast to fix it.
-Author: Petter Reinholdtsen <pere(a)debian.org>
-Bug-Debian:
https://bugs.debian.org/811732
-Forwarded: no
-Reviewed-By: Petter Reinholdtsen <pere(a)debian.org>
-Last-Update: 2016-07-16
+From 632e87969c3a5562a5d4842b03613267ba6236b2 Mon Sep 17 00:00:00 2001
+From: Petter Reinholdtsen <pere(a)debian.org>
+Date: Sun, 17 Jul 2016 08:59:10 +0200
+Subject: [PATCH] Fix build failure on gcc 6
---- acoustid-fingerprinter-0.6.orig/gzip.cpp
-+++ acoustid-fingerprinter-0.6/gzip.cpp
-@@ -23,12 +23,12 @@ inline unsigned long calculateCrc32(cons
+Array initializers for a char array fail for constants > 128
+on platforms where char is signed. Cast to fix it.
+---
+ gzip.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gzip.cpp b/gzip.cpp
+index 2aeaad3..35ccf31 100644
+--- a/gzip.cpp
++++ b/gzip.cpp
+@@ -23,12 +23,12 @@ inline unsigned long calculateCrc32(const QByteArray &data)
QByteArray gzipCompress(const QByteArray &data)
{
const char header[10] = {
diff --git a/06-taglib.patch b/06-taglib.patch
index efebc91..559265c 100644
--- a/06-taglib.patch
+++ b/06-taglib.patch
@@ -36,6 +36,3 @@ index 76b83ac..5a985f9 100644
mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES)
else(TAGLIBCONFIG_EXECUTABLE)
---
-2.7.4.1.g5468f9e
-
diff --git a/acoustid-fingerprinter.spec b/acoustid-fingerprinter.spec
index b319b34..fbf4d2a 100644
--- a/acoustid-fingerprinter.spec
+++ b/acoustid-fingerprinter.spec
@@ -1,19 +1,20 @@
Name: acoustid-fingerprinter
Version: 0.6
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: Music AcoustID fingerprinting application
License: GPLv2+
-URL:
http://acoustid.org/fingerprinter
-Source:
https://github.com/downloads/lalinsky/%{name}/%{name}-%{version}.tar.gz
-Patch0: 01-Fix-build-with-upcoming-Libav-10-release.patch
-Patch1: 02-CodecID.patch
+URL:
https://github.com/acoustid/%{name}
+Source: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch0:
%{url}/commit/2c778334a9fc2f0ccf9b1d7635c116bce6509748.patch#/01-Fix-build-with-upcoming-Libav-10-release.patch
+Patch1:
%{url}/commit/5b3d32b26a7e4522b7c1b59b1d75367f2779c98d.patch#/02-CodecID.patch
Patch2: 03-pkg-config.patch
-Patch3: 04-typo-warning.patch
-Patch4: 05-g++-6-char-cast.patch
-Patch5: 06-taglib.patch
+Patch3:
%{url}/commit/6cb95c67cd9699fb3d703451eb1c4bcabc96e25f.patch#/04-typo-warning.patch
+Patch4:
%{url}/commit/632e87969c3a5562a5d4842b03613267ba6236b2.patch#/05-g++-6-char-cast.patch
+Patch5:
%{url}/commit/681ef059e4bdb0a9b1a073d6cbb9bb54e993fef9.patch#/06-taglib.patch
-BuildRequires: cmake
+BuildRequires: cmake3
+BuildRequires: ninja-build
BuildRequires: qt4-devel
BuildRequires: ffmpeg-devel
BuildRequires: taglib-devel
@@ -34,13 +35,13 @@ track title, artist name, album name, etc.
%autosetup -p1
%build
-%cmake -DCMAKE_BUILD_TYPE=Debug
+%cmake3 -DCMAKE_BUILD_TYPE=Debug -GNinja
# removing the -O3 optimization flag for the release building type
sed -i "s/-O3 -DNDEBUG//g" CMakeCache.txt
-%make_build
+%ninja_build
%install
-%make_install
+%ninja_install
install -d -m755 %{buildroot}%{_datadir}/applications
@@ -52,18 +53,6 @@ desktop-file-install \
install -p -D -m 0644 images/%{name}.svg
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
-%post
-/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
-%postun
-if [ $1 -eq 0 ] ; then
- /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-
-%posttrans
-/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-
%files
%doc CHANGES.txt
%license COPYING.txt
@@ -73,6 +62,12 @@ fi
%changelog
+* Sun Feb 11 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 0.6-15
+- Remove Scriptlets
+- Switch URL and Source to github
+- Use upstream patches
+- Use ninja to build
+
* Wed Jan 17 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 0.6-14
- Rebuilt for ffmpeg-3.5 git
@@ -152,6 +147,6 @@ fi
- update to 0.5
- minor spec cleaning
-* Thu Nov 18 2011 Ismael Olea <ismael(a)olea.org> - 0.4-1
+* Fri Nov 18 2011 Ismael Olea <ismael(a)olea.org> - 0.4-1
- first version for Fedora
diff --git a/sources b/sources
index cf1df7a..0afc429 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-14e2e797ea09474a8862d200234f5e6b acoustid-fingerprinter-0.6.tar.gz
+712732ad622bddf8948e9b4d90100bd4 acoustid-fingerprinter-0.6.tar.gz