diff --git a/srcpkgs/nginx/files/nginx.logrotate b/srcpkgs/nginx/files/nginx.logrotate new file mode 100644 index 00000000000..d490d5d9b1d --- /dev/null +++ b/srcpkgs/nginx/files/nginx.logrotate @@ -0,0 +1,8 @@ +/var/log/nginx/*.log { + missingok + sharedscripts + compress + postrotate + test -r /var/run/nginx.pid && kill -USR1 `cat /var/run/nginx.pid` + endscript +} diff --git a/srcpkgs/nginx/files/nginx.service b/srcpkgs/nginx/files/nginx.service new file mode 100644 index 00000000000..78d0a492c4a --- /dev/null +++ b/srcpkgs/nginx/files/nginx.service @@ -0,0 +1,13 @@ +[Unit] +Description=A high performance web server and a reverse proxy server + +[Service] +Type=forking +PIDFile=/run/nginx.pid +ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;' +ExecStart=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' +ExecReload=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload +ExecStop=/usr/sbin/nginx -g 'pid /run/nginx.pid;' -s quit + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/nginx/nginx.rshlibs b/srcpkgs/nginx/nginx.rshlibs new file mode 100644 index 00000000000..485cbafe748 --- /dev/null +++ b/srcpkgs/nginx/nginx.rshlibs @@ -0,0 +1,8 @@ +libpthread.so.0 +libcrypt.so.1 +libpcre.so.1 +libssl.so.1 +libcrypto.so.1 +libdl.so.2 +libz.so.1 +libc.so.6 diff --git a/srcpkgs/nginx/template b/srcpkgs/nginx/template new file mode 100644 index 00000000000..9fb77024419 --- /dev/null +++ b/srcpkgs/nginx/template @@ -0,0 +1,84 @@ +# Template file for 'nginx' +pkgname=nginx +version=1.2.2 +revision=1 +makedepends="zlib-devel pcre-devel>=8.30 openssl-devel" +short_desc="A high performance web server and a reverse proxy server" +maintainer="Juan RP " +license="Simplified BSD" +homepage="http://nginx.org" +distfiles="http://nginx.org/download/nginx-$version.tar.gz" +checksum=409477c7a9fba58c110a176fd7965b9db188bcf8be0e7f8a0731b8ae1e6ee880 +long_desc=" + Sed, the GNU Stream Editor, copies the named files (standard input default) + to the standard output, edited according to a script of commands." + +conf_files=" +/etc/nginx/fastcgi.conf +/etc/nginx/fastcgi_params +/etc/nginx/koi-win +/etc/nginx/koi-utf +/etc/nginx/mime.types +/etc/nginx/nginx.conf +/etc/nginx/scgi_params +/etc/nginx/uwsgi_params +/etc/nginx/win-utf +/etc/logrotate.d/nginx" + +system_accounts="nginx" +nginx_homedir="/var/tmp/nginx" + +systemd_services="nginx.service on" + +make_dirs=" +/var/tmp 1777 root root +/var/tmp/nginx 0750 root root" + +do_configure() { + local cfgdir=/etc/nginx + local tmpdir=/var/tmp/nginx + + ./configure --prefix=${cfgdir} \ + --conf-path=${cfgdir}/nginx.conf \ + --sbin-path=/usr/sbin/nginx \ + --pid-path=/run/nginx.pid \ + --lock-path=/var/lock/nginx.lock \ + --user=nginx --group=nginx \ + --http-log-path=/var/log/nginx/access.log \ + --error-log-path=/var/log/nginx/error.log \ + --http-client-body-temp-path=${tmpdir}/client-body \ + --http-proxy-temp-path=${tmpdir}/proxy \ + --http-fastcgi-temp-path=${tmpdir}/fastcgi \ + --http-scgi-temp-path=${tmpdir}/scgi \ + --http-uwsgi-temp-path=${tmpdir}/uwsgi \ + --with-imap --with-imap_ssl_module \ + --with-ipv6 --with-pcre-jit \ + --with-file-aio \ + --with-http_dav_module \ + --with-http_gzip_static_module \ + --with-http_realip_module \ + --with-http_ssl_module \ + --with-http_stub_status_module +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DESTDIR=$DESTDIR install + + vinstall ${FILESDIR}/nginx.logrotate 644 etc/logrotate.d nginx + + sed -e 's|\