blob: b612af6256847476d91767e94a2e4b4db2b7bea8 (
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
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=n-m3u8dl-re-git
pkgver=0.2.0.beta.r37.g584d3c8
pkgrel=1
epoch=
pkgdesc="Cross-Platform, beautiful and powerful stream downloader for DASH/HLS."
arch=("x86_64" "aarch64")
url="https://github.com/nilaoda/N_m3u8DL-RE"
license=('MIT')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
replaces=()
depends=()
makedepends=(
curl
zlib
krb5
git
dotnet-host
dotnet-sdk)
backup=()
options=('!strip' '!debug' '!lto')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')
noextract=()
pkgver() {
cd "${srcdir}/${pkgname}"
(
set -o pipefail
git describe --long --tag --abbrev=7 2>/dev/null | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}
prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
# cd "${srcdir}/${pkgname}"
# sed -i 's|net8.0|net7.0|g' src/N_m3u8DL-RE/N_m3u8DL-RE.csproj
}
build() {
# DOTNET_CLI_TELEMETRY_OPTOUT=1
cd "${srcdir}/${pkgname}"
if [ "$CARCH" == "aarch64" ]; then
msg2 "build for arm64"
dotnet publish src/N_m3u8DL-RE -r linux-arm64 -c Release -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/crossrootfs/arm64 -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o artifact
else
msg2 "build for x64"
dotnet publish src/N_m3u8DL-RE -r linux-x64 -c Release -p:PublishTrimmed=true --self-contained true -p:DebugType=None -p:DebugSymbols=false -o artifact
fi
}
package() {
cd "${srcdir}/${pkgname}/artifact/"
install -Dm0755 N_m3u8DL-RE "${pkgdir}/usr/bin/${pkgname%-git}"
}
|