From: Koen Kooi <koen@dominion.thruhere.net>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-webserver][PATCH] nginx: new recipe
Date: Fri, 18 Oct 2013 09:28:55 +0200 [thread overview]
Message-ID: <l3qnv9$82h$1@ger.gmane.org> (raw)
In-Reply-To: <1382062414-13387-1-git-send-email-stephen.arnold42@gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
stephen.arnold42 schreef op 18-10-13 04:13:
> From: "stephen.arnold42" <stephen.arnold42@gmail.com>
>
> Initial recipe created by Steve Arnold. Original build patch and 1.0.10
> recipe graciously contributed by bencoh (in #oe on irc.freenode.net). New
> recipe and init script contributed by this author. Built and tested on
> master branches using author's fork of meta-raspberrypi.
>
> https://github.com/sarnold/meta-raspberrypi
>
> Upstream-Status: Inappropriate [embedded specific]
>
> Signed-off-by: stephen.arnold42 <stephen.arnold42@gmail.com> ---
> .../nginx/files/nginx-cross_1.4.0.diff | 229
> +++++++++++++++++++++ .../recipes-httpd/nginx/files/nginx.conf
> | 118 +++++++++++ .../recipes-httpd/nginx/files/nginx.init |
> 52 +++++ meta-webserver/recipes-httpd/nginx/nginx_1.4.0.bb | 91
> ++++++++ 4 files changed, 490 insertions(+) create mode 100644
> meta-webserver/recipes-httpd/nginx/files/nginx-cross_1.4.0.diff create
> mode 100644 meta-webserver/recipes-httpd/nginx/files/nginx.conf create
> mode 100755 meta-webserver/recipes-httpd/nginx/files/nginx.init create
> mode 100644 meta-webserver/recipes-httpd/nginx/nginx_1.4.0.bb
>
> diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.conf
> b/meta-webserver/recipes-httpd/nginx/files/nginx.conf new file mode
> 100644 index 0000000..589de41 --- /dev/null +++
> b/meta-webserver/recipes-httpd/nginx/files/nginx.conf @@ -0,0 +1,118 @@
> + +user www-data; +worker_processes 1; + +error_log
> /var/log/nginx/error.log; +#error_log logs/error.log notice;
> +#error_log logs/error.log info; + +pid
> /var/run/nginx//nginx.pid;
Double // and isn't that /run nowadays?
> + + +events { + worker_connections 1024; +} + + +http { + include
> mime.types; + default_type application/octet-stream; + +
> log_format main '$remote_addr - $remote_user [$time_local] "$request"
> ' + '$status $body_bytes_sent "$http_referer" ' +
> '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log
> /var/log/nginx/access.log main; + + sendfile on; +
> #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout
> 65; + + #gzip on; + + server { + listen 80; +
> server_name localhost; + + #charset koi8-r; + +
> #access_log logs/host.access.log main; + + location / { +
> root /var/www//localhost/html;
double //
> diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.init
> b/meta-webserver/recipes-httpd/nginx/files/nginx.init new file mode
> 100755 index 0000000..0f38b9c --- /dev/null +++
> b/meta-webserver/recipes-httpd/nginx/files/nginx.init @@ -0,0 +1,52 @@
> +#! /bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/nginx
hardcode ${sbindir}, more hardcoded paths in the rest of the file
> index 0000000..185fd22 --- /dev/null +++
> b/meta-webserver/recipes-httpd/nginx/nginx_1.4.0.bb @@ -0,0 +1,91 @@
> +SUMMARY = "HTTP and reverse proxy server for embedded environments"
> +HOMEPAGE = "http://nginx.org/" +LICENSE = "BSD-2-Clause" +SECTION =
> "net" + +DEPENDS = "libpcre gzip openssl" + +PR = "r0"
default, drop it
> + +SRC_URI = " \ + http://nginx.org/download/nginx-${PV}.tar.gz \ +
> file://nginx-cross_${PV}.diff;name=crosspatch \ + file://nginx.conf \ +
> file://nginx.init \ +" + +inherit update-rc.d useradd siteinfo +
> +SRC_URI[md5sum] = "d496e58864ab10ed56278b7655b0d0b2" +SRC_URI[sha256sum]
> = "84aeb7a131fccff036dc80283dd98c989d2844eb84359cfe7c4863475de923a9"
> +LIC_FILES_CHKSUM =
> "file://LICENSE;md5=917bfdf005ffb6fd025550414ff05a9f"
LIC_FILES_CHKSUM should go next to the LICENSE field
> + +CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \ +
> ${sysconfdir}/nginx/fastcgi.conf\ + ${sysconfdir}/nginx/fastcgi_params
> \ + ${sysconfdir}/nginx/koi-utf \ + ${sysconfdir}/nginx/koi-win \ +
> ${sysconfdir}/nginx/mime.types \ + ${sysconfdir}/nginx/scgi_params \ +
> ${sysconfdir}/nginx/uwsgi_params \ + ${sysconfdir}/nginx/win-utf \ +"
Packaging variables go below do_install
> + +INITSCRIPT_NAME = "nginx" +INITSCRIPT_PARAMS = "defaults 92 20"
Below do_install
> + +do_configure() { + PTRSIZE=$(expr ${SITEINFO_BITS} / 8) + + echo
> $PTRSIZE + echo $CFLAGS + echo $LDFLAGS + + ./configure \ +
> --crossbuild=Linux:${TUNE_ARCH} \ +
> --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little',
> 'big', d)} \ + --with-int=4 \ + --with-long=${PTRSIZE} \ +
> --with-long-long=8 \ + --with-ptr-size=${PTRSIZE} \ +
> --with-sig-atomic-t=${PTRSIZE} \ + --with-size-t=${PTRSIZE} \ +
> --with-off-t=${PTRSIZE} \ + --with-time-t=${PTRSIZE} \ +
> --with-sys-nerr=132 \ + --conf-path=/etc/nginx/nginx.conf \
${sysconfdir}
> + --http-log-path=/var/log/nginx/access.log \ +
> --error-log-path=/var/log/nginx/error.log \
${localstatedir}
> + --pid-path=/var/run/nginx/nginx.pid \
/run ?
> + --prefix=/usr \
${prefix}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFSYOM3MkyGM64RGpERAlAeAKC1AM8Kw/cfhJDZ6R4OdTpssx+x4QCbBddK
C297WXI/v1+hG98PIepQ6qc=
=YdkH
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2013-10-18 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 2:13 [meta-webserver][PATCH] nginx: new recipe stephen.arnold42
2013-10-18 7:28 ` Koen Kooi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='l3qnv9$82h$1@ger.gmane.org' \
--to=koen@dominion.thruhere.net \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox