blob: 0e96fac556fa664f9ac1342edcee365f3c60a274 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# Maintainer: TheBill2001 <tuantran1632001 at gmail dot com>
pkgbase=videoduplicatefinder-git
pkgname=("videoduplicatefinder-git" "videoduplicatefinder-cli-git" "videoduplicatefinder-webui-git")
pkgver=4.1.x.r39.g7ef1beb
pkgrel=1
_pkgdesc="Video Duplicate Finder is a cross-platform software to find duplicated video (and image) files on hard disk based on similiarity"
arch=('x86_64')
url="https://github.com/0x90d/videoduplicatefinder"
license=('AGPL-3.0-or-later')
_dotnetver='10.0'
_depends=(
'ffmpeg'
"dotnet-runtime-${_dotnetver}"
)
depends=(
"${_depends[@]}"
)
makedepends=(
'git'
"aspnet-targeting-pack-${_dotnetver}"
"dotnet-sdk-${_dotnetver}"
)
source=("git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "videoduplicatefinder"
git describe --long --tags --abbrev=7 --exclude 'ai-models*' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "videoduplicatefinder"
# Build GUI
dotnet publish ./VDF.GUI/VDF.GUI.csproj -c Release -v q -r linux-x64 -o outputGUI
# Build CLI
dotnet publish ./VDF.CLI/VDF.CLI.csproj -c Release -v q -r linux-x64 -o outputCLI
# Build Web
dotnet publish ./VDF.Web/VDF.Web.csproj -c Release -v q -r linux-x64 -o outputWeb
}
package_videoduplicatefinder-git() {
pkgdesc="${_pkgdesc}"
provides=("videoduplicatefinder")
conflicts=("videoduplicatefinder")
install -d -m 755 "${pkgdir}/usr/bin"
ln -s "/opt/videoduplicatefinder/VDF.GUI" "${pkgdir}/usr/bin/VDF.GUI"
cd "videoduplicatefinder"
install -d -m 755 "${pkgdir}/usr/share/applications"
install -m 644 "VDF.GUI/Assets/Linux/videoduplicatefinder.desktop" "${pkgdir}/usr/share/applications"
install -d -m 755 "${pkgdir}/opt/videoduplicatefinder"
install -m 644 "VDF.GUI/Assets/Linux/icon.png" "${pkgdir}/opt/videoduplicatefinder"
install -d -m 755 "${pkgdir}/usr/share/icons/hicolor/256x256/apps"
ln -s "/opt/videoduplicatefinder/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/videoduplicatefinder.png"
cd "outputGUI"
find . -type d -exec install -d -m 755 {} "${pkgdir}/opt/videoduplicatefinder/{}" \;
find . -type f -exec install -m 644 {} "${pkgdir}/opt/videoduplicatefinder/{}" \;
chmod +x "${pkgdir}/opt/videoduplicatefinder/VDF.GUI"
}
package_videoduplicatefinder-cli-git() {
cd "videoduplicatefinder/outputCLI"
pkgdesc="${_pkgdesc} (CLI)"
provides=("videoduplicatefinder-cli")
conflicts=("videoduplicatefinder-cli")
find . -type d -exec install -d -m 755 {} "${pkgdir}/opt/videoduplicatefinder-cli/{}" \;
find . -type f -exec install -m 644 {} "${pkgdir}/opt/videoduplicatefinder-cli/{}" \;
chmod +x "${pkgdir}/opt/videoduplicatefinder-cli/vdf-cli"
install -d -m 755 "${pkgdir}/usr/bin"
ln -s "/opt/videoduplicatefinder-cli/vdf-cli" "${pkgdir}/usr/bin/vdf-cli"
}
package_videoduplicatefinder-webui-git() {
cd "videoduplicatefinder/outputWeb"
pkgdesc="${_pkgdesc} (WebUI)"
provides=("videoduplicatefinder-webui")
conflicts=("videoduplicatefinder-webui")
depends=(
"${_depends[@]}"
"aspnet-runtime-${_dotnetver}"
)
find . -type d -exec install -d -m 755 {} "${pkgdir}/opt/videoduplicatefinder-webui/{}" \;
find . -type f -exec install -m 644 {} "${pkgdir}/opt/videoduplicatefinder-webui/{}" \;
chmod +x "${pkgdir}/opt/videoduplicatefinder-webui/VDF.Web"
install -d -m 755 "${pkgdir}/usr/bin"
# Need to cd to /opt/videoduplicatefinder-webui, won't run otherwise.
echo "#!/usr/bin/env bash" > "${pkgdir}/usr/bin/VDF.Web"
echo "trap 'popd > /dev/null 2>&1' EXIT" >> "${pkgdir}/usr/bin/VDF.Web"
echo "pushd /opt/videoduplicatefinder-webui > /dev/null 2>&1" >> "${pkgdir}/usr/bin/VDF.Web"
echo "./VDF.Web" >> "${pkgdir}/usr/bin/VDF.Web"
chmod +x "${pkgdir}/usr/bin/VDF.Web"
}
|