Adapt it to ubuntu makedeb
This commit is contained in:
parent
fae0a3cd97
commit
1ff55af5e6
2 changed files with 48 additions and 31 deletions
54
PKGBUILD
54
PKGBUILD
|
@ -6,29 +6,30 @@
|
|||
|
||||
_pkgbase=nginx
|
||||
pkgbase=nginx-quic
|
||||
_pkgrev=5f1d05a21287
|
||||
pkgname=(nginx-quic nginx-quic-src)
|
||||
pkgver=1.23.3
|
||||
pkgver=1.23.4
|
||||
pkgrel=1
|
||||
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch'
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('amd64')
|
||||
url='https://nginx.org'
|
||||
license=('custom')
|
||||
depends=('geoip' 'libxcrypt' 'mailcap' 'pcre2' 'zlib')
|
||||
makedepends=('cmake' 'git' 'go' 'mercurial')
|
||||
backup=('etc/nginx/fastcgi.conf'
|
||||
'etc/nginx/fastcgi_params'
|
||||
'etc/nginx/koi-win'
|
||||
'etc/nginx/koi-utf'
|
||||
'etc/nginx/nginx.conf'
|
||||
'etc/nginx/scgi_params'
|
||||
'etc/nginx/uwsgi_params'
|
||||
'etc/nginx/win-utf'
|
||||
'etc/logrotate.d/nginx')
|
||||
depends=('libgeoip-dev' 'libxcrypt-source' 'mailcap' 'libpcre2-dev' 'zlib1g-dev')
|
||||
makedepends=('cmake' 'git' 'golang')
|
||||
backup=('/etc/nginx/fastcgi.conf'
|
||||
'/etc/nginx/fastcgi_params'
|
||||
'/etc/nginx/koi-win'
|
||||
'/etc/nginx/koi-utf'
|
||||
'/etc/nginx/nginx.conf'
|
||||
'/etc/nginx/scgi_params'
|
||||
'/etc/nginx/uwsgi_params'
|
||||
'/etc/nginx/win-utf'
|
||||
'/etc/logrotate.d/nginx')
|
||||
install=nginx.install
|
||||
provides=('nginx' 'nginx-mainline')
|
||||
conflicts=('nginx')
|
||||
source=("hg+https://hg.nginx.org/nginx-quic#revision=91ad1abfb285"
|
||||
"git+https://boringssl.googlesource.com/boringssl#commit=1740ff90a7da10408e6175b516946b392ec8f11f"
|
||||
source=("git+https://git.zzls.xyz/Fijxu/nginx-quic#branch=quic"
|
||||
"git+https://boringssl.googlesource.com/boringssl"
|
||||
"service"
|
||||
"logrotate")
|
||||
sha256sums=('SKIP'
|
||||
|
@ -83,8 +84,8 @@ prepare() {
|
|||
|
||||
build() {
|
||||
# Clear -D_FORTIFY_SOURCE from C++ build flags, it causes Boringssl tests to fail to compile
|
||||
export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
|
||||
export CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
|
||||
#export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
|
||||
#export CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
|
||||
|
||||
export CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
export CFLAGS="$CFLAGS -fPIC"
|
||||
|
@ -109,16 +110,17 @@ build() {
|
|||
|
||||
cd ${srcdir}/$pkgname
|
||||
./auto/configure \
|
||||
--prefix=/etc/nginx \
|
||||
--prefix=/usr/share/nginx \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--sbin-path=/usr/bin/nginx \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--pid-path=/run/nginx.pid \
|
||||
--lock-path=/run/lock/nginx.lock \
|
||||
--user=http \
|
||||
--group=http \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--modules-path=/usr/lib/nginx/modules \
|
||||
--user=www-data \
|
||||
--group=www-data \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--error-log-path=stderr \
|
||||
--http-client-body-temp-path=/var/lib/nginx/client-body \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--http-client-body-temp-path=/var/lib/nginx/body \
|
||||
--http-proxy-temp-path=/var/lib/nginx/proxy \
|
||||
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
|
||||
--http-scgi-temp-path=/var/lib/nginx/scgi \
|
||||
|
@ -153,7 +155,7 @@ package_nginx-quic() {
|
|||
chown root:root "$pkgdir"/var/log/nginx
|
||||
|
||||
install -d "$pkgdir"/usr/share/nginx
|
||||
mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
|
||||
#mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
|
||||
|
||||
install -Dm644 ../logrotate "$pkgdir"/etc/logrotate.d/nginx
|
||||
install -Dm644 ../service "$pkgdir"/usr/lib/systemd/system/nginx.service
|
||||
|
@ -183,7 +185,7 @@ package_nginx-quic-src() {
|
|||
test -d "$pkgdir/usr/src/nginx" && rm -r "$pkgdir/usr/src/nginx"
|
||||
cp -r ${srcdir}/${pkgname} "$pkgdir/usr/src/nginx"
|
||||
# Delete the .hg directory, it is huge and not needed
|
||||
rm -r ${pkgdir}/usr/src/nginx/{.hg,.hgtags}
|
||||
#rm -r ${pkgdir}/usr/src/nginx/{.hg,.hgtags}
|
||||
# Link the 'configure' script to its location in release tarballs,
|
||||
# as this is where modules expect it
|
||||
ln -s /usr/src/nginx/auto/configure "$pkgdir/usr/src/nginx"
|
||||
|
|
25
service
25
service
|
@ -1,14 +1,29 @@
|
|||
# Stop dance for nginx
|
||||
# =======================
|
||||
#
|
||||
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
|
||||
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
|
||||
# and sends SIGTERM (fast shutdown) to the main process.
|
||||
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
|
||||
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
|
||||
#
|
||||
# nginx signals reference doc:
|
||||
# http://nginx.org/en/docs/control.html
|
||||
#
|
||||
[Unit]
|
||||
Description=A high performance web server and a reverse proxy server
|
||||
After=syslog.target network.target
|
||||
Documentation=man:nginx(8)
|
||||
After=network.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/nginx.pid
|
||||
ExecStartPre=/usr/bin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'
|
||||
ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'
|
||||
ExecReload=/usr/bin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload
|
||||
ExecStop=/usr/bin/nginx -g 'pid /run/nginx.pid;' -s quit
|
||||
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
|
||||
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
|
||||
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
|
||||
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
|
||||
TimeoutStopSec=5
|
||||
KillMode=mixed
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in a new issue