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