]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Nginx: New package. Version 1.3.11.
authorBen Schweikert <trikolon@ipfire.org>
Tue, 15 Jan 2013 16:48:43 +0000 (17:48 +0100)
committerBen Schweikert <trikolon@ipfire.org>
Tue, 15 Jan 2013 16:48:43 +0000 (17:48 +0100)
config/backup/includes/nginx [new file with mode: 0644]
config/nginx/nginx [new file with mode: 0755]
config/rootfiles/packages/nginx [new file with mode: 0644]
lfs/nginx [new file with mode: 0644]
src/paks/nginx/install.sh [new file with mode: 0644]
src/paks/nginx/uninstall.sh [new file with mode: 0644]
src/paks/nginx/update.sh [new file with mode: 0644]

diff --git a/config/backup/includes/nginx b/config/backup/includes/nginx
new file mode 100644 (file)
index 0000000..db8e6ed
--- /dev/null
@@ -0,0 +1 @@
+/etc/nginx/nginx.conf
diff --git a/config/nginx/nginx b/config/nginx/nginx
new file mode 100755 (executable)
index 0000000..67f757d
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Begin $rc_base/init.d/nginx
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
+
+#$LastChangedBy: bdubbs $
+#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+case "$1" in
+       start)
+               boot_mesg "Starting nginx Server..."
+               loadproc /usr/sbin/nginx
+               ;;
+
+       stop)
+               boot_mesg "Stopping nginx Server..."
+               killproc /usr/sbin/nginx
+               ;;
+
+       reload)
+               boot_mesg "Reloading nginx Server..."
+               reloadproc /usr/sbin/nginx
+               ;;
+
+       restart)
+               $0 stop
+               sleep 1
+               $0 start
+               ;;
+
+       status)
+               statusproc /usr/sbin/nginx
+               ;;
+
+       *)
+               echo "Usage: $0 {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/nginx
diff --git a/config/rootfiles/packages/nginx b/config/rootfiles/packages/nginx
new file mode 100644 (file)
index 0000000..e926c0b
--- /dev/null
@@ -0,0 +1,19 @@
+etc/init.d/nginx
+etc/nginx/fastcgi.conf
+etc/nginx/fastcgi.conf.default
+etc/nginx/fastcgi_params
+etc/nginx/fastcgi_params.default
+etc/nginx/koi-utf
+etc/nginx/koi-win
+etc/nginx/mime.types
+etc/nginx/mime.types.default
+etc/nginx/nginx.conf
+etc/nginx/nginx.conf.default
+etc/nginx/scgi_params
+etc/nginx/scgi_params.default
+etc/nginx/uwsgi_params
+etc/nginx/uwsgi_params.default
+etc/nginx/win-utf
+etc/rc.d/init.d/nginx
+usr/nginx/html/50x.html
+usr/nginx/html/index.html
diff --git a/lfs/nginx b/lfs/nginx
new file mode 100644 (file)
index 0000000..19cbbc6
--- /dev/null
+++ b/lfs/nginx
@@ -0,0 +1,104 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.3.11
+
+THISAPP    = nginx-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG      = nginx
+PAK_VER           = 1
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 4d299999bca4d2cecfbe48e51684a345
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist:
+       $(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+       @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && tar xvf $(DIR_SRC)/cache/nginx_tcp_proxy_module.tar.bz2 -C $(DIR_APP)  
+       cd $(DIR_APP) && patch -p1 < nginx_tcp_proxy_module/tcp.patch
+       cd $(DIR_APP) && ./configure \
+               --prefix=/usr/nginx/ \
+               --conf-path=/etc/nginx/nginx.conf \
+               --sbin-path=/usr/sbin/nginx \
+               --pid-path=/var/run/nginx.pid \
+               --lock-path=/var/lock/nginx.lock \
+               --http-client-body-temp-path=/var/spool/nginx/client_body_temp \
+               --http-proxy-temp-path=/var/spool/nginx/proxy_temp \
+               --http-fastcgi-temp-path=/var/spool/nginx/fastcgi_temp \
+               --http-log-path=/var/log/nginx/access.log \
+               --error-log-path=/var/log/nginx/error.log \
+               --user=http \
+               --group=http \
+               --with-imap --with-imap_ssl_module --with-http_ssl_module \
+               --with-http_stub_status_module \
+               --with-http_dav_module \
+               --with-http_sub_module \
+               --add-module=nginx_tcp_proxy_module/
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make install
+       mkdir -p /var/log/nginx /var/spool/nginx
+       cp /usr/src/config/nginx/nginx /etc/init.d/
+#      chown http:http /var/log/nginx
+#      @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/src/paks/nginx/install.sh b/src/paks/nginx/install.sh
new file mode 100644 (file)
index 0000000..d5cb155
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_files
+restore_backup ${NAME}
+
+ln -svf  ../init.d/nginx /etc/rc.d/rc0.d/K20nginx
+ln -svf  ../init.d/nginx /etc/rc.d/rc3.d/S40nginx
+ln -svf  ../init.d/nginx /etc/rc.d/rc6.d/K20nginx
+
+start_service --background ${NAME}
diff --git a/src/paks/nginx/uninstall.sh b/src/paks/nginx/uninstall.sh
new file mode 100644 (file)
index 0000000..ded53f0
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+remove_files
+
+rm -rf /etc/rc.d/rc*.d/*nginx
diff --git a/src/paks/nginx/update.sh b/src/paks/nginx/update.sh
new file mode 100644 (file)
index 0000000..89c40d0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+############################################################################
+#                                                                          #
+# This file is part of the IPFire Firewall.                                #
+#                                                                          #
+# IPFire is free software; you can redistribute it and/or modify           #
+# it under the terms of the GNU General Public License as published by     #
+# the Free Software Foundation; either version 2 of the License, or        #
+# (at your option) any later version.                                      #
+#                                                                          #
+# IPFire is distributed in the hope that it will be useful,                #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
+# GNU General Public License for more details.                             #
+#                                                                          #
+# You should have received a copy of the GNU General Public License        #
+# along with IPFire; if not, write to the Free Software                    #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
+#                                                                          #
+# Copyright (C) 2007 IPFire-Team <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh