-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
52 lines (44 loc) · 2.58 KB
/
PKGBUILD
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
# Maintainer: Jose Quintana <joseluisquintana20[at]gmail[dot]com>
pkgname=static-web-server-bin
_pkgname=static-web-server
pkgver=2.36.1
pkgrel=1
pkgdesc="Static Web Server (sws): A cross-platform, high-performance and asynchronous web server for static files-serving (official binary version)"
arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
url="https://static-web-server.net"
license=('Apache' 'MIT')
provides=('static-web-server' 'sws')
conflicts=('sws')
depends=()
optdepends=()
source_x86_64=(static_web_server_x86_64_${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-x86_64-unknown-linux-gnu.tar.gz)
source_i686=(static_web_server_i686_${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-i686-unknown-linux-gnu.tar.gz)
source_armv6h=(static_web_server_armv6h_${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-arm-unknown-linux-musleabihf.tar.gz)
source_armv7h=(static_web_server_armv7h_${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-armv7-unknown-linux-musleabihf.tar.gz)
source_aarch64=(static_web_server_aarch64_${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-aarch64-unknown-linux-gnu.tar.gz)
sha256sums_x86_64=('81cac7e086ddce2528bcd3a99ced7b25c92d58e1be24d19717157e551e0f967c')
sha256sums_i686=('f494b9ba0a57fe53390fccc6dc2771f0960e79ce14c37ac37d261ee9228edefa')
sha256sums_armv6h=('429567c305444bff1f38869fc31f8be3eb688e7c2f76c3f05b5f883fc0d0254d')
sha256sums_armv7h=('1c640ce9c380d3c82e9ed9304255af721d1405ffeb2a5fe76a20bdb68610e1dc')
sha256sums_aarch64=('c201cf1979ec29abfc093202613f6daa2c88b36b041e4804bd38b8e0a1318f6f')
package() {
case "$CARCH" in
'x86_64') target='x86_64-unknown-linux-gnu';;
'i686') target='i686-unknown-linux-gnu';;
'armv6h') target='arm-unknown-linux-musleabihf';;
'armv7h') target='armv7-unknown-linux-musleabihf';;
'aarch64') target='aarch64-unknown-linux-gnu';;
esac
cd "${srcdir}/${_pkgname}-v${pkgver}-${target}/"
# Install docs
install -d "${pkgdir}/usr/share/licenses/${_pkgname}"
cp -R LICENSE-APACHE \
"${pkgdir}/usr/share/licenses/${_pkgname}/"
cp -R LICENSE-MIT \
"${pkgdir}/usr/share/licenses/${_pkgname}/"
# Install binary
install -D -m755 ${_pkgname} \
"${pkgdir}/usr/bin/${_pkgname}"
# Symlink binary
ln -s "/usr/bin/${_pkgname}" "${pkgdir}/usr/bin/sws"
}