blob: e17e490a22fe6cdc8853fe4dd864579104c97929 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=phpwebstudy-bin
_pkgname=PhpWebStudy
pkgver=4.0.0
_electronversion=30
pkgrel=1
pkgdesc="Powerful Web Server and PHP Environment."
arch=(
'aarch64'
'x86_64'
)
url="https://www.macphpstudy.com/"
_ghurl="https://github.com/xpf0000/PhpWebStudy"
license=("BSD-3-Clause")
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
)
source=(
"LICENSE-${pkgver}::https://raw.githubusercontent.com/xpf0000/PhpWebStudy/v${pkgver}/LICENSE"
"${pkgname%-bin}.sh"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_${pkgver}_amd64.deb")
sha256sums=('c4205bc7a7ad3855f781d48a5303c4e424d7fc26207953d0ffdcae5e4c27f80a'
'2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
sha256sums_aarch64=('6356bf8ded09b0240786745c67a1936271eea53982bd090c64ec819a2a3f48d3')
sha256sums_x86_64=('a2fdd0082aeae7281d38c0cfb21afd0579a6c64c8f66de835557a9217ecb7d54')
build() {
sed -e "s|@electronversion@|${_electronversion}|g" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
-e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
sed "s|\/opt\/${_pkgname}\/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -r "${srcdir}/opt/${_pkgname}/resources/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|