pkgname: nginx pkgver: '1.31.4' pkgrel: '2' pkgdesc: HTTP and reverse proxy, mail proxy, and a generic TCP/UDP proxy server url: 'https://nginx.org/en/' arch: x86_64 depends: [] makedepends: - openssl - pcre2 source: - 'https://repo.paganlinux.eu/sources/pagan-scripts-20260822.tar.gz' - 'https://nginx.org/download/nginx-${pkgver}.tar.gz' sha256sums: - 32e0aec88cc56a8afe0b2671debe47d19357792a6ffaffaf6e3db8a021a57072 - SKIP hooks: post-install: | name=nginx version=1.30.4 release=1 INFO="\033[1;36m" NORMAL="\033[0;39m" if [ ! -f /etc/nginx/nginx.conf ]; then cp /etc/nginx/nginx.conf{.default,} printf "${INFO} /etc/nginx/nginx.conf created ${NORMAL}\n" printf "${INFO} Double check /etc/nginx/nginx.conf and adapted to your needs ${NORMAL}\n" fi if [ ! -d /srv/www ]; then mkdir -p /srv/www printf "${INFO} /srv/www created ${NORMAL}\n" fi if [ ! -f /srv/www/index.html ]; then cp -a /etc/nginx/html/* /srv/www/ printf "${INFO} /srv/www/index.html created ${NORMAL}\n" fi if [ ! -L etc/systemd/system/multi-user.target.wants/nginx.service ];then mkdir -p etc/systemd/system/multi-user.target.wants ln -sf /usr/lib/systemd/system/nginx.service etc/systemd/system/multi-user.target.wants/nginx.service && \ printf \ "${INFO} Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service -> /usr/lib/systemd/system/nginx.service${NORMAL}\n" fi pre-install: | name=nginx version=1.30.4 release=1 INFO="\033[1;36m" NORMAL="\033[0;39m" UN=www # Usuniete kasowanie kont www/apache: userdel zostawial pliki z # osieroconym uid. Wlasciwe konto http jest tworzone ponizej. UN=apache # Usuniete kasowanie kont www/apache: userdel zostawial pliki z # osieroconym uid. Wlasciwe konto http jest tworzone ponizej. UN=http if ! (getent group $UN > /dev/null); then printf "${INFO}Creating $UN group${NORMAL}\n" groupadd -g 25 $UN fi if ! (getent passwd $UN > /dev/null); then printf "${INFO}Creating $UN user${NORMAL}\n" useradd -c "http Server" -d /dev/null \ -g $UN -s /usr/bin/false -u 25 $UN fi build: | UN=apache (getent passwd $UN > /dev/null) && userdel $UN (getent group $UN > /dev/null) && groupdel $UN UN=www (getent passwd $UN > /dev/null) && userdel $UN (getent group $UN > /dev/null) && groupdel $UN UN=http if ! (getent group $UN > /dev/null); then groupadd -g 25 $UN fi if ! (getent passwd $UN > /dev/null); then useradd -c "http Server" -d /dev/null \ -g $UN -s /bin/false -u 25 $UN fi cd ${pkgname}-${pkgver} ./configure \ --with-openssl=/usr/include/openssl \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx.pid \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --prefix=/usr \ --sbin-path=/usr/bin/nginx \ --modules-path=/usr/lib/nginx/modules \ --http-scgi-temp-path=/usr/lib/nginx/scgi \ --http-uwsgi-temp-path=/usr/lib/nginx/uwsgi \ --http-proxy-temp-path=/usr/lib/nginx/proxy \ --http-client-body-temp-path=/usr/lib/nginx/client-body \ --user=http --group=http make make DESTDIR=${PKGDIR} install install -d ${PKGDIR}{/srv/www,/usr/{lib/nginx,share/man/man8}} # Configuration file sed -e '44s|html|/srv/www|' \ -e '54s|html|/srv/www|' \ -i ${PKGDIR}/etc/nginx/nginx.conf.default rm ${PKGDIR}/etc/nginx/nginx.conf cp -a html ${PKGDIR}/etc/nginx # Man pages install -m644 objs/nginx.8 ${PKGDIR}/usr/share/man/man8/nginx.8 # Service cd ${SRCDIR}/pagan-scripts-20260822 make DESTDIR=${PKGDIR} install-sysd-nginx package: | true