blob: 12c7ac250de7bae62bfde40470b0985b659be552 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=litespeed
pkgver=1.4.40
pkgrel=0
_pkgreal=open$pkgname
_pkghome=var/lib/$pkgname
_php=php7
pkgdesc="High-performance, lightweight, open source HTTP server"
url="https://open.litespeedtech.com"
arch="x86 x86_64 armhf armv7"
license="GPL-3.0"
pkgusers=litespeed
pkggroups=litespeed
depends="$_php-$pkgname $_php-bcmath $_php-json $_php-mcrypt $_php-session"
depends_dev=
makedepends="linux-headers openssl-dev geoip-dev expat-dev pcre-dev zlib-dev
bsd-compat-headers"
install="$pkgname.pre-install"
subpackages="$pkgname-snmp::noarch"
source="https://openlitespeed.org/packages/openlitespeed-$pkgver.src.tgz
$pkgname.initd
include.patch
install.patch
ls_lock.patch
thread.patch
"
builddir="$srcdir/openlitespeed-$pkgver"
build() {
cd "$builddir"
./configure \
--host=$CHOST \
--build=$CBUILD \
--prefix=/$_pkghome \
--with-user=$pkgusers \
--with-group=$pkggroups \
--enable-adminssl=no \
--disable-rpath \
--disable-static \
--with-openssl=/usr \
--with-expat \
--with-pcre \
--with-zlib \
|| return 1
make || return 1
}
package() {
local file;
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
mkdir -p "$pkgdir"/usr/lib/$pkgname \
"$pkgdir"/usr/sbin \
"$pkgdir"/var/log || return 1
# remove trash
rm -fr "$pkgdir"/$_pkghome/php* \
"$pkgdir"/$_pkghome/lib \
"$pkgdir"/$_pkghome/GPL* \
"$pkgdir"/$_pkghome/gdata \
"$pkgdir"/$_pkghome/autoupdate \
"$pkgdir"/$_pkghome/fcgi-bin/* \
"$pkgdir"/$_pkghome/bin/lshttpd \
"$pkgdir"/$_pkghome/admin/conf/php.* \
"$pkgdir"/$_pkghome/admin/misc/gdb-bt \
"$pkgdir"/$_pkghome/admin/misc/convertxml.* \
"$pkgdir"/$_pkghome/admin/misc/build_admin_php.sh \
|| return 1
# fix ownership
chown -R $pkgusers:$pkggroups \
"$pkgdir"/$_pkghome/tmp \
"$pkgdir"/$_pkghome/conf \
"$pkgdir"/$_pkghome/logs \
"$pkgdir"/$_pkghome/backup \
"$pkgdir"/$_pkghome/cachedata \
"$pkgdir"/$_pkghome/admin/tmp \
"$pkgdir"/$_pkghome/admin/logs \
"$pkgdir"/$_pkghome/admin/conf \
"$pkgdir"/$_pkghome/Example/logs || return 1
# install configs
install -Dm755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
mv "$pkgdir"/$_pkghome/conf \
"$pkgdir"/etc/$pkgname || return 1
mv "$pkgdir"/$_pkghome/admin/conf \
"$pkgdir"/etc/$pkgname/admin || return 1
ln -s /etc/$pkgname "$pkgdir"/$_pkghome/conf || return 1
ln -s /etc/$pkgname/admin "$pkgdir"/$_pkghome/admin/conf || return 1
find "$pkgdir"/etc/$pkgname -type f -print0 | xargs -0 chmod -x || return 1
# install binary
mv "$pkgdir"/$_pkghome/bin/$_pkgreal \
"$pkgdir"/usr/sbin/lshttpd || return 1
ln -sf /usr/sbin/lshttpd \
"$pkgdir"/$_pkghome/bin/$pkgname || return 1
# install modules
for file in $(find "$pkgdir"/$_pkghome/modules -name "*.so"); do
mv $file "$pkgdir"/usr/lib/$pkgname/${file##*/} || return 1
ln -s /usr/lib/$pkgname/${file##*/} $file || return 1
done
# install logs
mv "$pkgdir"/$_pkghome/logs "$pkgdir"/var/log/$pkgname || return 1
mv "$pkgdir"/$_pkghome/admin/logs "$pkgdir"/var/log/$pkgname/admin || return 1
mv "$pkgdir"/$_pkghome/Example/logs "$pkgdir"/var/log/$pkgname/Example || return 1
ln -s /var/log/$pkgname "$pkgdir"/$_pkghome/logs || return 1
ln -s /var/log/$pkgname/admin "$pkgdir"/$_pkghome/admin/logs || return 1
ln -s /var/log/$pkgname/Example "$pkgdir"/$_pkghome/Example/logs || return 1
# install backend
ln -s /usr/bin/ls$_php "$pkgdir"/$_pkghome/fcgi-bin/ls$_php || return 1
ln -s /etc/$_php/php.ini "$pkgdir"/etc/$pkgname/php.ini || return 1
ln -s /etc/$_php/php.ini "$pkgdir"/etc/$pkgname/admin/php.ini || return 1
}
snmp() {
pkgdesc="$pkgdesc (snmp monitoring add-on + cacti templates)"
depends="$pkgname net-snmp"
mkdir -p "$subpkgdir"/$_pkghome/add-ons || return 1
mv "$pkgdir"/$_pkghome/add-ons/snmp_monitoring \
"$subpkgdir"/$_pkghome/add-ons
}
sha512sums="fb99beb724a8c324e37e1529267d9a5a57cb5f924896ba321f4f4781f77e18d689f6c77e162ab29951bf80633d20c867bd3453e6c61dd150b47071a92b80bd98 openlitespeed-1.4.40.src.tgz
2b0299246aaeb885122d8f939437f0e4701f6a79ea976f725ba8765d8b295c2797c0cac30e639d5eda665b9589710ee55acc4d03b078c4b9cc1e564994ccb9f5 litespeed.initd
5f45f665f8305d849ba58398700f83f4a9ded82b3b2445698ea5d12c3b7bfbb2cb55d0cfc13b6021326d140fbd84600503012e82d826f5767d8e4ee20f3ac912 include.patch
4c8c3dc0624b7be30f25b5f25a9ab9890d6ffb101379b457e63e334cd42592eb1abef231506038ab6037040e7a98db02f00d6651547bd4a5f800c5ac671eba56 install.patch
2211e6c787700fc08eaee56f049c80690ef53d2b14cfcf17099ed0e5dfbd28b76a7b30f0c8814901e3c72bd4fc63732196b6fa0a8231cc10f86ba5130810b3d6 ls_lock.patch
c7775836ee13b082e5c2ce011673b1a30b5ca83765d6d81ff1359110ba970808de6a87cd6d61fd688c9d2037451598154b429d70ad25094b9e9f10938aea00fd thread.patch"
|