blob: a63aa4bddf43e6dbc103e6689c8b111239908310 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=m3u8downloader-bin
_pkgname="M3U8 Downloader"
pkgver=0.6.5
_electronversion=28
pkgrel=1
pkgdesc="Yet another m3u8 downloader"
arch=("x86_64")
url="https://github.com/gonwan/m3u8-downloader"
license=('Apache-2.0')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'nodejs'
)
makedepends=(
'gendesk'
)
options=(
'!emptydirs'
)
source=(
"${pkgname%-bin}-${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-x64.tar.gz"
"${pkgname%-bin}-${pkgver}.png::https://raw.githubusercontent.com/gonwan/m3u8-downloader/v${pkgver}/icons/icon256x256.png"
"${pkgname%-bin}.sh"
)
sha256sums=('8346e8b1591cad3e41918c930a6ff955fe5bcc0d6853f05116477ddefe013033'
'c42b28b97e0485bf0298aac09ef9f9be169682b5467d8e3eb6334bd2b31129b3'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
-e "s|@cfgdirname@|${pkgname%-bin}|g" \
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="AudioVideo" --name="${_pkgname}" --exec="${pkgname%-bin} %U"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/${pkgname%-bin}-v${pkgver}-linux-x64/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -r "${srcdir}/${pkgname%-bin}-v${pkgver}-linux-x64/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/${pkgname%-bin}-${pkgver}.png" -t "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
|