Import rpm: c8s

This commit is contained in:
James Antill 2023-02-27 14:07:11 -05:00
commit 3917811d37
4 changed files with 194 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/libquvi-scripts-0.9.20131130.tar.xz
/libquvi-scripts-0.9.20131130.tar.xz

View File

@ -0,0 +1,63 @@
From 1622a28581e2c4afa9061b72a05dc1c171e891f2 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 17 Feb 2015 14:25:38 +0100
Subject: [PATCH] guardian.lua: Update for website changes
See https://bugzilla.redhat.com/show_bug.cgi?id=1134853
---
share/media/guardian.lua | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/share/media/guardian.lua b/share/media/guardian.lua
index 454971c..7435204 100644
--- a/share/media/guardian.lua
+++ b/share/media/guardian.lua
@@ -35,13 +35,17 @@ function parse(qargs)
qargs.duration_ms = Guardian.parse_duration(p)
qargs.title = (p:match('"og:title" content="(.-)"') or '')
- :gsub('%s+%-%s+video','')
+ qargs.title = qargs.title:gsub('%s+%-%s+video','')
+ qargs.title = qargs.title:gsub('%s+%%s+video','')
+
+ -- FIXME this should be more generic
+ qargs.title = qargs.title:gsub('&#x27;', "'")
qargs.id = (p:match('prop8%s+=%s+["\'](.-)["\']') or '')
:match('(%d+)') or ''
- qargs.thumb_url = p:match('"thumbnail" content="(.-)"')
- or p:match('"og:image" content="(.-)"') or ''
+ qargs.thumb_url = p:match('"og:image" content="(.-)"')
+ or p:match('"thumbnail" content="(.-)"') or ''
qargs.streams = Guardian.iter_streams(p)
@@ -75,7 +79,7 @@ function Guardian.fetch(qargs)
end
function Guardian.iter_streams(p)
- local u = p:match("%s+file.-:%s+'(.-)'")
+ local u = p:match('&file=(.-)&poster')
or error('no match: media stream URL')
local S = require 'quvi/stream'
local s = S.stream_new(u)
@@ -86,9 +90,13 @@ end
function Guardian.parse_duration(p)
local n = tonumber(p:match('duration%:%s+"?(%d+)"?') or 0) * 1000
- if n ==0 then
+ if n == 0 then
local m,s = p:match('T(%d+)M(%d+)S')
- n = (tonumber(m)*60 + tonumber(s)) * 1000
+ n = ((tonumber(m) or 0) *60 + (tonumber(s) or 0)) * 1000
+ end
+ if n == 0 then
+ local s = p:match('content="PT(%d+)S"')
+ n = (tonumber(s) or 0) * 1000
end
return n
end
--
2.1.0

128
libquvi-scripts.spec Normal file
View File

@ -0,0 +1,128 @@
%global debug_package %{nil}
Name: libquvi-scripts
Version: 0.9.20131130
Release: 9%{?dist}
Summary: Embedded lua scripts for parsing the media details
License: AGPLv3+
URL: http://quvi.sourceforge.net
Source0: http://downloads.sourceforge.net/project/quvi/0.9/%{name}/%{name}-%{version}.tar.xz
BuildArch: noarch
Requires: lua-expat
Requires: lua-socket
Requires: lua-json
# https://bugzilla.redhat.com/show_bug.cgi?id=1134853
Patch0: 0001-guardian.lua-Update-for-website-changes.patch
%description
libquvi-scripts contains the embedded lua scripts that libquvi
uses for parsing the media details. Some additional utility
scripts are also included.
%prep
%setup -q
%patch0 -p1
%build
%configure --with-nsfw
%install
# Noarch fix.
make install DESTDIR=%{buildroot} pkgconfigdir=%{_datadir}/pkgconfig/
%files
%doc AUTHORS ChangeLog COPYING NEWS README
%{_datadir}/%{name}
%{_datadir}/pkgconfig/%{name}*.pc
%{_mandir}/man7/%{name}.7*
%{_mandir}/man7/quvi-modules*.7*
%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.20131130-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.20131130-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.20131130-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.20131130-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.20131130-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Feb 17 2015 Bastien Nocera <bnocera@redhat.com> 0.9.20131130-4
- Another update for guardian.lua
* Mon Sep 01 2014 Bastien Nocera <bnocera@redhat.com> 0.9.20131130-3
- Fix guardian.lua for website changes (#1134853)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.20131130-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Dec 04 2013 Christopher Meng <rpm@cicku.me> - 0.9.20131130-1
- Update to 0.9.20131130
* Sat Nov 09 2013 Christopher Meng <rpm@cicku.me> - 0.9.20131104-1
- Update to 0.9.20131104
* Sun Oct 20 2013 Christopher Meng <rpm@cicku.me> - 0.9.20131012-1
- Update to 0.9.20131012
- Add missing lua dep again(BZ#1021156).
* Thu Sep 26 2013 Christopher Meng <rpm@cicku.me> - 0.9.20130903-1
- Update to 0.9.20130903
- Add missing lua dep(BZ#1012165).
* Tue Aug 27 2013 Christopher Meng <rpm@cicku.me> - 0.9.20130805-3
- Add missing lua dep.
* Mon Aug 26 2013 Christopher Meng <rpm@cicku.me> - 0.9.20130805-2
- License changed to AGPL.
- Correct filenames.
* Sun Aug 25 2013 Christopher Meng <rpm@cicku.me> - 0.9.20130805-1
- Update to 0.9.20130805
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Jan 18 2013 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.10-1
- Update to 0.4.10
* Sun Oct 28 2012 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.9-1
- Update to 0.4.9
* Fri Aug 10 2012 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.7-1
- Update to 0.4.7
* Sun Jul 15 2012 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.6-1
- Update to 0.4.6
* Thu Mar 29 2012 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.4-1
- Update to 0.4.4
* Sun Mar 11 2012 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.3-1
- Update to 0.4.3
* Fri Dec 2 2011 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.2-1
- Update to 0.4.2
* Thu Nov 10 2011 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.1-1
- Update to 0.4.1
* Tue Oct 11 2011 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.0-3
- Remove the devel subpackage
- The package is now noarch
* Sun Oct 9 2011 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.0-2
- Create the devel subpackage
* Sat Oct 8 2011 Nicoleau Fabien <nicoleau.fabien@gmail.com> 0.4.0-1
- Initial build

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (libquvi-scripts-0.9.20131130.tar.xz) = 97de4cead30dc181da700cbf3a0ad66ee709fef17f449f75cd43e0376a4aa53c7b2174188130aaa34dcc7ddc578581111f3655cb10f4b0c92df2f75d32c72a02