blob: 9b464806e4d27f8915c7173b8b8db58d3a7841a8 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=snapdrop
pkgname="node-${_pkgname}-electron-bin"
pkgver=1.0.4
_electronversion=21
pkgrel=7
pkgdesc="A Self Contained Desktop Version Of Snapdrop Made With Electron"
arch=('x86_64')
url="https://github.com/JustSch/node-snapdrop-electron"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'nodejs'
)
options=(
'!strip'
'!emptydirs'
)
source=(
"${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_amd64.deb"
"${pkgname%-bin}.sh"
)
sha256sums=('25b67d4165657d88c10b23166d08eef9c0c7e99ad22023341c664ec649b2fe1c'
'2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app|g" \
-e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@||g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
sed "s|Exec=${_pkgname} %U|Exec=${pkgname%-bin} %U|g;s|Icon=${_pkgname}|Icon=${pkgname%-bin}|g" \
-i "${srcdir}/usr/share/applications/${_pkgname}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -r "${srcdir}/usr/lib/${_pkgname}/resources/app" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/usr/share/pixmaps/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/usr/share/doc/${_pkgname}/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|