-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPKGBUILD
More file actions
52 lines (44 loc) · 2.58 KB
/
PKGBUILD
File metadata and controls
52 lines (44 loc) · 2.58 KB
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.42.0
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=('1f1f4000edf7ae5ed2995247cd5d910417867ff0f2e2f848239a53d9a1274b7f')
sha256sums_i686=('6398dfe2ce8b554d342c47cfc021776af46a5be9a58a84a686aa1015e0f26a1d')
sha256sums_armv6h=('b679a40e94a0594e8a0be21a5e0a00a6b196d0b967b7950f791c13adb4ce6d28')
sha256sums_armv7h=('2faadea4c5243eeac94915d5dff2374ef4acc3e80682e69b4b346c2e6adfbaaa')
sha256sums_aarch64=('584c2b03e216fe10615b0ea0a530083a61014714805653650aa833489b679bbe')
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"
}