summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f2d52d91239fa40dda286711d3f6ae0de85600d (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=video-chapter-injector-bin
_pkgname='Video Chapter Injector'
pkgver=1.0.0
_electronversion=29
pkgrel=3
pkgdesc="An electron app which quickly allows you to inject non-linear video editor markers into video files as chapter points.(Prebuilt version.Use system-wide electron)"
arch=('x86_64')
url="https://github.com/markbattistella/video-chapter-injector"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    "electron${_electronversion}"
    'nodejs'
)
makedepends=(
    'gendesk'
)
options=(
    '!emptydirs'
)
source=(
    "${pkgname%-bin}-${pkgver}.zip::${url}/releases/download/${pkgver}/${pkgname%-bin}-linux.zip"
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/markbattistella/video-chapter-injector/${pkgver}/LICENSE"
    "${pkgname%-bin}.sh"
)
sha256sums=('a82e26951b197e7bd76b8d59ba8b9d648729d2a40fa5169a6ef984b37985b171'
            '68771d03435f519db8e096bd17e4e9ca5252b6508b5c61cc14d26a6578a757d2'
            '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
    sed -e "
        s/@electronversion@/${_electronversion}/g
        s/@appname@/${pkgname%-bin}/g
        s/@runname@/app/g
        s/@cfgdirname@/${_pkgname}/g
        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 -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
   cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-bin}-linux/resources/app"  "${pkgdir}/usr/lib/${pkgname%-bin}"
   install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 "${srcdir}/${pkgname%-bin}-linux/resources/app/data/icons/app-icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
   install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}