Initial commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
# Exclude bpm archives
|
||||||
|
*.bpm
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Github repository
|
||||||
|
REPO="nginx/nginx"
|
||||||
|
|
||||||
|
# Get tag name using Github Rest API
|
||||||
|
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
|
||||||
|
|
||||||
|
# Trim prefix
|
||||||
|
VERSION=${TAG_NAME//release-/}
|
||||||
|
|
||||||
|
echo "$VERSION"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: nginx
|
||||||
|
description: Lightweight HTTP server and IMAP/POP3 proxy server
|
||||||
|
version: 1.29.1
|
||||||
|
revision: 1
|
||||||
|
url: https://nginx.org/
|
||||||
|
license: BSD-2-Clause
|
||||||
|
architecture: any
|
||||||
|
type: source
|
||||||
|
keep:
|
||||||
|
- 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:
|
||||||
|
- glibc
|
||||||
|
- libxcrypt
|
||||||
|
- mailcap
|
||||||
|
- openssl
|
||||||
|
- pcre2
|
||||||
|
- sysusers
|
||||||
|
- zlib
|
||||||
|
make_depends:
|
||||||
|
- findutils
|
||||||
|
- gd
|
||||||
|
- geoip
|
||||||
|
- libxml2
|
||||||
|
- libxslt
|
||||||
|
downloads:
|
||||||
|
- url: https://github.com/nginx/nginx/archive/refs/tags/release-${BPM_PKG_VERSION}.tar.gz
|
||||||
|
extract_to_bpm_source: true
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: 8b864d3d803d903b77f77bf45ef9dbc310c90719e350f2ae5a3515d1193481f6
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
name: nginx
|
||||||
|
description: Nginx web server
|
||||||
|
type: background
|
||||||
|
start_cmd: /usr/sbin/nginx -g 'daemon off;'
|
||||||
|
exit_method: kill
|
||||||
|
restart: true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
u nginx 33 - /srv/nginx /bin/false
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
build() {
|
||||||
|
auto/configure \
|
||||||
|
--prefix=/etc/nginx \
|
||||||
|
--conf-path=/etc/nginx/nginx.conf \
|
||||||
|
--sbin-path=/usr/sbin/nginx \
|
||||||
|
--modules-path=/usr/lib/nginx/modules \
|
||||||
|
--pid-path=/run/nginx.pid \
|
||||||
|
--lock-path=/run/lock/nginx.lock \
|
||||||
|
--user=nginx \
|
||||||
|
--group=nginx \
|
||||||
|
--http-log-path=/var/log/nginx/access.log \
|
||||||
|
--error-log-path=stderr \
|
||||||
|
--http-client-body-temp-path=/var/lib/nginx/client-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 \
|
||||||
|
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
|
||||||
|
--with-cc-opt="$CFLAGS $CPPFLAGS" \
|
||||||
|
--with-ld-opt="$LDFLAGS" \
|
||||||
|
--with-compat \
|
||||||
|
--with-debug \
|
||||||
|
--with-file-aio \
|
||||||
|
--with-http_addition_module \
|
||||||
|
--with-http_auth_request_module \
|
||||||
|
--with-http_dav_module \
|
||||||
|
--with-http_degradation_module \
|
||||||
|
--with-http_flv_module \
|
||||||
|
--with-http_geoip_module=dynamic \
|
||||||
|
--with-http_gunzip_module \
|
||||||
|
--with-http_gzip_static_module \
|
||||||
|
--with-http_image_filter_module=dynamic \
|
||||||
|
--with-http_mp4_module \
|
||||||
|
--with-http_perl_module=dynamic \
|
||||||
|
--with-http_random_index_module \
|
||||||
|
--with-http_realip_module \
|
||||||
|
--with-http_secure_link_module \
|
||||||
|
--with-http_slice_module \
|
||||||
|
--with-http_ssl_module \
|
||||||
|
--with-http_stub_status_module \
|
||||||
|
--with-http_sub_module \
|
||||||
|
--with-http_v2_module \
|
||||||
|
--with-http_v3_module \
|
||||||
|
--with-http_xslt_module=dynamic \
|
||||||
|
--with-mail=dynamic \
|
||||||
|
--with-mail_ssl_module \
|
||||||
|
--with-pcre-jit \
|
||||||
|
--with-stream=dynamic \
|
||||||
|
--with-stream_geoip_module=dynamic \
|
||||||
|
--with-stream_realip_module \
|
||||||
|
--with-stream_ssl_module \
|
||||||
|
--with-stream_ssl_preread_module \
|
||||||
|
--with-threads
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
# The package function is executed in the source directory
|
||||||
|
# This function is used to move the compiled files into the output directory
|
||||||
|
package() {
|
||||||
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Remove unwanted files and directories
|
||||||
|
rm "$BPM_OUTPUT"/etc/nginx/*.default
|
||||||
|
rmdir "$BPM_OUTPUT"/run
|
||||||
|
|
||||||
|
# Install directories
|
||||||
|
install -d "$BPM_OUTPUT"/srv
|
||||||
|
install -o=33 -g=33 -d "$BPM_OUTPUT"/srv/nginx/
|
||||||
|
install -d "$BPM_OUTPUT"/etc/nginx/modules.d
|
||||||
|
install -d "$BPM_OUTPUT"/var/lib/nginx
|
||||||
|
install -dm700 "$BPM_OUTPUT"/var/lib/nginx/proxy
|
||||||
|
|
||||||
|
# Move /etc/nginx/html directory to /srv/nginx/html
|
||||||
|
mv "$BPM_OUTPUT"/etc/nginx/html "$BPM_OUTPUT"/srv/nginx/html
|
||||||
|
chown -R 33:33 "$BPM_OUTPUT"/srv/nginx/html
|
||||||
|
|
||||||
|
# Change default config values
|
||||||
|
sed -i \
|
||||||
|
-e 's|user nobody|user nginx|g' \
|
||||||
|
-e '44s|html|/srv/nginx/html|' \
|
||||||
|
-e '54s|html|/srv/nginx/html|' \
|
||||||
|
"$BPM_OUTPUT"/etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# Install man page
|
||||||
|
install -Dm644 objs/nginx.8 "$BPM_OUTPUT"/usr/share/man/man8/nginx.8
|
||||||
|
|
||||||
|
# Install esvm service
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/nginx.esv "$BPM_OUTPUT"/etc/esvm/services/nginx.esv
|
||||||
|
|
||||||
|
# Install sysusers file
|
||||||
|
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/nginx.conf
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/nginx/LICENSE
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user