blob: 179558637dd88b57371819b7317a5d3d698ee6fa (
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
136
137
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=litespeed
pkgver=1.4.24
pkgrel=0
_pkgreal=open$pkgname
_pkghome=var/lib/$pkgname
pkgdesc="High-performance, lightweight, open source HTTP server"
url="https://open.litespeedtech.com"
arch="all"
license="GPL3"
pkgusers=litespeed
pkggroups=litespeed
depends="php7-$pkgname php7-bcmath php7-json php7-mcrypt php7-session"
depends_dev=
makedepends="linux-headers libressl-dev geoip-dev expat-dev pcre-dev zlib-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-snmp::noarch"
source="http://open.litespeedtech.com/packages/$_pkgreal-$pkgver.tgz
$pkgname.initd
include.patch
install.patch
ls_lock.patch
fix_php.patch
thread.patch
config.patch
"
builddir="$srcdir/$_pkgreal-$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/lsphp7 "$pkgdir"/$_pkghome/fcgi-bin/lsphp7 || return 1
ln -s /etc/php7/php.ini "$pkgdir"/etc/$pkgname/php.ini || return 1
ln -s /etc/php7/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="5f8434d2fef3b8c8b2dcdbfdefdd989edbf9cd08b14f41ac9e2bf18d959b9baf8585ceb94f0fd4fc284fd59378c31e451c6d6c144c3ad2f5cbab33abe73a26fc openlitespeed-1.4.24.tgz
2b0299246aaeb885122d8f939437f0e4701f6a79ea976f725ba8765d8b295c2797c0cac30e639d5eda665b9589710ee55acc4d03b078c4b9cc1e564994ccb9f5 litespeed.initd
9dc0679aa27aa0efefe2ded2776a1269e4e565b5c49d074c40c2121bf5f1cbb8dfe286b97507ea9bdac539bdbb4960fe409ae7d1ed883085c44b592581f4931d include.patch
ead0ba0fabfb7d76a087f202d134bf86d909898e5d96e1330716c9288f21386d8b72f9caed34c095994a7ea328d7f8c9ae6d9e51a24e89b209099401ce09f2c5 install.patch
2211e6c787700fc08eaee56f049c80690ef53d2b14cfcf17099ed0e5dfbd28b76a7b30f0c8814901e3c72bd4fc63732196b6fa0a8231cc10f86ba5130810b3d6 ls_lock.patch
54a69f441a2d6e02aa3203cf15d14202df77d549a505a64cc296aa007dc49657b9fdaa2e3c4ecbd1aaca9b9ce4eb7899747cc751d9dd80aa9f92028361a9d3f6 fix_php.patch
c7775836ee13b082e5c2ce011673b1a30b5ca83765d6d81ff1359110ba970808de6a87cd6d61fd688c9d2037451598154b429d70ad25094b9e9f10938aea00fd thread.patch
4566abaf19a8713c7199475d0f5d9c7dd61f9ae330acd02baf4096dddd8833dcb3a746f63ce19658afc9f3c4990663c736947dd90842eee542fd266ef1f30e7c config.patch"
|