This commit is contained in:
joborun linux 2024-01-01 03:21:34 +02:00
parent cd7227adba
commit 9b9835e00f
5 changed files with 94 additions and 23 deletions

View file

@ -7,26 +7,26 @@
pkgname=mat2
pkgver=0.13.4
pkgrel=02
pkgrel=03
pkgdesc='Metadata removal tool, supporting a wide range of commonly used file formats'
url='https://0xacab.org/jvoisin/mat2'
depends=('python' 'python-mutagen' 'python-cairo' 'python-gobject' 'gdk-pixbuf2' 'poppler-glib' 'librsvg' 'perl-image-exiftool' 'mailcap')
makedepends=(python-setuptools)
optdepends=(
'ffmpeg: video support'
'bubblewrap: sandboxing support'
)
depends=('python' 'python-mutagen' 'python-cairo' 'python-gobject' 'gdk-pixbuf2' 'poppler-glib' 'librsvg' 'perl-image-exiftool' 'mailcap' 'hicolor-icon-theme')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=('ffmpeg: video support'
'bubblewrap: sandboxing support')
checkdepends=('ffmpeg')
conflicts=(mat mat2-git)
provides=(mat)
#source=("git+https://0xacab.org/jvoisin/${pkgname}.git")
source=(https://0xacab.org/jvoisin/mat2/-/archive/${pkgver}/mat2-${pkgver}.tar.gz
https://0xacab.org/jvoisin/mat2/uploads/95d1f3782dfc731545fd9b467c594cb2/mat2-0.13.4.tar.gz.asc)
https://0xacab.org/jvoisin/mat2/uploads/95d1f3782dfc731545fd9b467c594cb2/mat2-0.13.4.tar.gz.asc
tests-VideoFullRangeFlag.patch::https://0xacab.org/jvoisin/mat2/-/commit/bbd5b2817c9d64013e2f5ed670aca8d4738bb484.patch
manpage-location.patch::https://0xacab.org/jvoisin/mat2/-/commit/a3081bce47bc475a7afaa25e834e8afe399dc350.patch)
prepare() {
cd ${pkgname}-${pkgver}
# patch -i ../ed0ffa5693b6d710b19a9101d6cb0625f8b6f1fc.patch
# patch --forward --strip=1 --input=../mat2-fix-tests.patch
patch -Np1 -i ../tests-VideoFullRangeFlag.patch
patch -Np1 -i ../manpage-location.patch
}
#pkgver() {
@ -37,7 +37,7 @@ prepare() {
build() {
cd ${pkgname}-${pkgver}
python setup.py build
python -m build --wheel --no-isolation
}
check() {
@ -47,10 +47,9 @@ check() {
package() {
cd ${pkgname}-${pkgver}
python setup.py install --skip-build -O1 --root="${pkgdir}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 dolphin/mat2.desktop -t "${pkgdir}/usr/share/kservices5/ServiceMenus"
install -Dm 644 data/mat2.svg -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
install -Dm 644 doc/mat2.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 doc/*.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
@ -63,6 +62,9 @@ license=('LGPL3')
validpgpkeys=('9FCDEE9E1A381F311EA62A7404D041E8171901CC') # Julien (jvoisin) Voisin
sha256sums=(dbd30f33edd9b99042b3d9ec2b5e7e9c9a08bba4318bcf3fa63be8854cc871db # mat2-0.13.4.tar.gz
b2100acfcdadf2d5b3bc116298e4bd0a073954d04f9c455c04b01590aaa680bf) # mat2-0.13.4.tar.gz.asc
b2100acfcdadf2d5b3bc116298e4bd0a073954d04f9c455c04b01590aaa680bf # mat2-0.13.4.tar.gz.asc
e7bf3fab23a6c51a3b4e6c4b4396f61060db970a8d10b7db5446639ef6ba37df # tests-VideoFullRangeFlag.patch
43e0800e108b60fbb32b23fada2821366302841fcffafc0fe897e21e15d9891a) # manpage-location.patch
## 1444c77a120629328f29522ca05b48425c4d5ffee78dfef9fd89d90dbb54eb54 mat2-0.13.4-03-x86_64.pkg.tar.lz
## bb9ba3f1e2325805952e3bd7497df848ea83b09511bf77cc3309f0b4079edfbe mat2-0.13.4-02-x86_64.pkg.tar.lz

View file

@ -3,13 +3,14 @@
pkgname=mat2
pkgver=0.13.4
pkgrel=2
pkgrel=3
pkgdesc='Metadata removal tool, supporting a wide range of commonly used file formats'
url='https://0xacab.org/jvoisin/mat2'
arch=('any')
license=('LGPL3')
depends=(
'gdk-pixbuf2'
'hicolor-icon-theme'
'librsvg'
'mailcap'
'perl-image-exiftool'
@ -19,7 +20,12 @@ depends=(
'python-gobject'
'python-mutagen'
)
makedepends=('python-setuptools')
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
optdepends=(
'ffmpeg: video support'
'bubblewrap: sandboxing support'
@ -27,17 +33,29 @@ optdepends=(
)
checkdepends=('ffmpeg')
source=(https://0xacab.org/jvoisin/mat2/-/archive/${pkgver}/mat2-${pkgver}.tar.gz
https://0xacab.org/jvoisin/mat2/uploads/95d1f3782dfc731545fd9b467c594cb2/mat2-0.13.4.tar.gz.asc)
https://0xacab.org/jvoisin/mat2/uploads/95d1f3782dfc731545fd9b467c594cb2/mat2-0.13.4.tar.gz.asc
tests-VideoFullRangeFlag.patch::https://0xacab.org/jvoisin/mat2/-/commit/bbd5b2817c9d64013e2f5ed670aca8d4738bb484.patch
manpage-location.patch::https://0xacab.org/jvoisin/mat2/-/commit/a3081bce47bc475a7afaa25e834e8afe399dc350.patch)
sha512sums=('75c08c9c52a82f9983e799c2aeef0da8324d1c92ac32fb748a68063ec7b28569692082aceacf7161d24db0e8a988357c423b6e17ca5c0f934309c9791c41ab18'
'SKIP')
'SKIP'
'f0b0a61e38825e64aaea268d440727140e782b9ebf32b0618185750eb8309fe0b09d24a0798c61a7053edf101c07d5838f88c46aea1b2da272584ec0a22f5407'
'64e8bf0faeb7bf205d74607bab452474b2b496f8e1335dce1423e4d558827279ce6946d2c50d910b9dbbbb81e9c93baf90ae53c31024fd1fdbe2e0b9d88b6f86')
b2sums=('cab400479bbf312979e11f00bccf02e0e330455651dcdef239507c511b4101cb8b39af5f9dfdc1df9f1bcedc3dda3276c7cf598491c0ff0fc1f365f540fdb7a6'
'SKIP')
'SKIP'
'b4812de051961aec68ce95f5fe1237d52e55320e30fe94ebe4c5652f2dd6b7ae0277e6d213c1dd8265699cbad7f77dff5fff1e14dfb9d3f6c1de3bea75695e11'
'dee99f816e44b0b1276b589488eff9f3e1adc02f607c3eab81a06736eb3d8fe77108e80c71c3d2f445c4abe0367950c1371a93d7c2867f6ddbcb17f5388b3618')
validpgpkeys=('9FCDEE9E1A381F311EA62A7404D041E8171901CC') # Julien (jvoisin) Voisin
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 -i ../tests-VideoFullRangeFlag.patch
patch -Np1 -i ../manpage-location.patch
}
build() {
cd ${pkgname}-${pkgver}
python setup.py build
python -m build --wheel --no-isolation
}
check() {
@ -47,10 +65,9 @@ check() {
package() {
cd ${pkgname}-${pkgver}
python setup.py install --skip-build -O1 --root="${pkgdir}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 dolphin/mat2.desktop -t "${pkgdir}/usr/share/kservices5/ServiceMenus"
install -Dm 644 data/mat2.svg -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
install -Dm 644 doc/mat2.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 doc/*.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

View file

@ -14,5 +14,8 @@ jack2
libgit2
python-typing_extensions
libglvnd
python-build
python-installer
python-wheel

View file

@ -0,0 +1,25 @@
From a3081bce47bc475a7afaa25e834e8afe399dc350 Mon Sep 17 00:00:00 2001
From: Rui Chen <rui@chenrui.dev>
Date: Wed, 2 Aug 2023 23:17:49 +0000
Subject: [PATCH] setup: use share/man/man1 for man1
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 356ca4b..bbdf1d9 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setuptools.setup(
'pycairo',
],
packages=setuptools.find_packages(exclude=('tests', )),
- data_files = [('man/man1', ['doc/mat2.1'])],
+ data_files = [('share/man/man1', ['doc/mat2.1'])],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Console",
--
GitLab

View file

@ -0,0 +1,24 @@
From bbd5b2817c9d64013e2f5ed670aca8d4738bb484 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Wed, 8 Nov 2023 15:28:08 +0100
Subject: [PATCH] Fix the CI on Debian
---
tests/test_libmat2.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index ee43fba..c64e4cb 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -508,6 +508,7 @@ class TestCleaning(unittest.TestCase):
'TrackID': 1,
'TrackLayer': 0,
'TransferCharacteristics': 'BT.709',
+ 'VideoFullRangeFlag': 0,
},
},{
'name': 'wmv',
--
GitLab