diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2016-08-18 18:08:26 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-08-22 15:53:57 +0200 |
commit | f2bec07b87b3f1118aa1d1f194d230920f1afe01 (patch) | |
tree | 9ff79d3ae9d87ddb9a43bebf831cee9f28884d3c /meta-webserver/recipes-httpd | |
parent | 8e6425cfa130a181b22077aa9153704c229ed4d7 (diff) | |
download | meta-openembedded-f2bec07b87b3f1118aa1d1f194d230920f1afe01.tar.gz |
nginx.inc: use 4 spaces for indentation
* like any other sane recipes do
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd')
-rw-r--r-- | meta-webserver/recipes-httpd/nginx/nginx.inc | 194 |
1 files changed, 98 insertions, 96 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc index b0d2d9728..36f2ac6d7 100644 --- a/meta-webserver/recipes-httpd/nginx/nginx.inc +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc | |||
@@ -12,12 +12,12 @@ SECTION = "net" | |||
12 | DEPENDS = "libpcre gzip openssl" | 12 | DEPENDS = "libpcre gzip openssl" |
13 | 13 | ||
14 | SRC_URI = " \ | 14 | SRC_URI = " \ |
15 | http://nginx.org/download/nginx-${PV}.tar.gz \ | 15 | http://nginx.org/download/nginx-${PV}.tar.gz \ |
16 | file://nginx-cross.patch \ | 16 | file://nginx-cross.patch \ |
17 | file://nginx.conf \ | 17 | file://nginx.conf \ |
18 | file://nginx.init \ | 18 | file://nginx.init \ |
19 | file://nginx-volatile.conf \ | 19 | file://nginx-volatile.conf \ |
20 | file://nginx.service \ | 20 | file://nginx.service \ |
21 | " | 21 | " |
22 | 22 | ||
23 | inherit update-rc.d useradd | 23 | inherit update-rc.d useradd |
@@ -34,104 +34,106 @@ DISABLE_STATIC = "" | |||
34 | PACKAGECONFIG[http2] = "--with-http_v2_module,," | 34 | PACKAGECONFIG[http2] = "--with-http_v2_module,," |
35 | 35 | ||
36 | do_configure () { | 36 | do_configure () { |
37 | if [ "${SITEINFO_BITS}" = "64" ]; then | 37 | if [ "${SITEINFO_BITS}" = "64" ]; then |
38 | PTRSIZE=8 | 38 | PTRSIZE=8 |
39 | else | 39 | else |
40 | PTRSIZE=4 | 40 | PTRSIZE=4 |
41 | fi | 41 | fi |
42 | 42 | ||
43 | echo $CFLAGS | 43 | echo $CFLAGS |
44 | echo $LDFLAGS | 44 | echo $LDFLAGS |
45 | 45 | ||
46 | # Add the LDFLAGS to the main nginx link to avoid issues with missing GNU_HASH | 46 | # Add the LDFLAGS to the main nginx link to avoid issues with missing GNU_HASH |
47 | echo "MAIN_LINK=\"\${MAIN_LINK} ${LDFLAGS}\"" >> auto/cc/conf | 47 | echo "MAIN_LINK=\"\${MAIN_LINK} ${LDFLAGS}\"" >> auto/cc/conf |
48 | 48 | ||
49 | ./configure \ | 49 | ./configure \ |
50 | --crossbuild=Linux:${TUNE_ARCH} \ | 50 | --crossbuild=Linux:${TUNE_ARCH} \ |
51 | --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ | 51 | --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ |
52 | --with-int=4 \ | 52 | --with-int=4 \ |
53 | --with-long=${PTRSIZE} \ | 53 | --with-long=${PTRSIZE} \ |
54 | --with-long-long=8 \ | 54 | --with-long-long=8 \ |
55 | --with-ptr-size=${PTRSIZE} \ | 55 | --with-ptr-size=${PTRSIZE} \ |
56 | --with-sig-atomic-t=${PTRSIZE} \ | 56 | --with-sig-atomic-t=${PTRSIZE} \ |
57 | --with-size-t=${PTRSIZE} \ | 57 | --with-size-t=${PTRSIZE} \ |
58 | --with-off-t=${PTRSIZE} \ | 58 | --with-off-t=${PTRSIZE} \ |
59 | --with-time-t=${PTRSIZE} \ | 59 | --with-time-t=${PTRSIZE} \ |
60 | --with-sys-nerr=132 \ | 60 | --with-sys-nerr=132 \ |
61 | --conf-path=${sysconfdir}/nginx/nginx.conf \ | 61 | --conf-path=${sysconfdir}/nginx/nginx.conf \ |
62 | --http-log-path=${localstatedir}/log/nginx/access.log \ | 62 | --http-log-path=${localstatedir}/log/nginx/access.log \ |
63 | --error-log-path=${localstatedir}/log/nginx/error.log \ | 63 | --error-log-path=${localstatedir}/log/nginx/error.log \ |
64 | --pid-path=/run/nginx/nginx.pid \ | 64 | --pid-path=/run/nginx/nginx.pid \ |
65 | --prefix=${prefix} \ | 65 | --prefix=${prefix} \ |
66 | --with-http_ssl_module \ | 66 | --with-http_ssl_module \ |
67 | --with-http_gzip_static_module \ | 67 | --with-http_gzip_static_module \ |
68 | ${EXTRA_OECONF} | 68 | ${EXTRA_OECONF} |
69 | } | 69 | } |
70 | 70 | ||
71 | do_install () { | 71 | do_install () { |
72 | oe_runmake 'DESTDIR=${D}' install | 72 | oe_runmake 'DESTDIR=${D}' install |
73 | rm -fr ${D}${localstatedir}/run ${D}/run | 73 | rm -fr ${D}${localstatedir}/run ${D}/run |
74 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 74 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
75 | install -d ${D}${sysconfdir}/tmpfiles.d | 75 | install -d ${D}${sysconfdir}/tmpfiles.d |
76 | echo "d /run/${BPN} - - - -" \ | 76 | echo "d /run/${BPN} - - - -" \ |
77 | > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | 77 | > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
78 | echo "d /${localstatedir}/log/${BPN} 0755 root root -" \ | 78 | echo "d /${localstatedir}/log/${BPN} 0755 root root -" \ |
79 | >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | 79 | >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf |
80 | fi | 80 | fi |
81 | install -d ${D}${sysconfdir}/${BPN} | 81 | install -d ${D}${sysconfdir}/${BPN} |
82 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run | 82 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run |
83 | install -d ${D}${NGINX_WWWDIR} | 83 | install -d ${D}${NGINX_WWWDIR} |
84 | mv ${D}/usr/html ${D}${NGINX_WWWDIR}/ | 84 | mv ${D}/usr/html ${D}${NGINX_WWWDIR}/ |
85 | chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} | 85 | chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} |
86 | 86 | ||
87 | install -d ${D}${sysconfdir}/init.d | 87 | install -d ${D}${sysconfdir}/init.d |
88 | install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx | 88 | install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx |
89 | sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx | 89 | sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx |
90 | sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx | 90 | sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx |
91 | 91 | ||
92 | install -d ${D}${sysconfdir}/nginx | 92 | install -d ${D}${sysconfdir}/nginx |
93 | install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf | 93 | install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf |
94 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf | 94 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf |
95 | sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf | 95 | sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf |
96 | install -d ${D}${sysconfdir}/nginx/sites-enabled | 96 | install -d ${D}${sysconfdir}/nginx/sites-enabled |
97 | 97 | ||
98 | install -d ${D}${sysconfdir}/default/volatiles | 98 | install -d ${D}${sysconfdir}/default/volatiles |
99 | install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx | 99 | install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx |
100 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx | 100 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx |
101 | 101 | ||
102 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then | 102 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then |
103 | install -d ${D}${systemd_unitdir}/system | 103 | install -d ${D}${systemd_unitdir}/system |
104 | install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ | 104 | install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ |
105 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | 105 | sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
106 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ | 106 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ |
107 | -e 's,@SBINDIR@,${sbindir},g' \ | 107 | -e 's,@SBINDIR@,${sbindir},g' \ |
108 | ${D}${systemd_unitdir}/system/nginx.service | 108 | ${D}${systemd_unitdir}/system/nginx.service |
109 | fi | 109 | fi |
110 | } | 110 | } |
111 | 111 | ||
112 | pkg_postinst_${PN} () { | 112 | pkg_postinst_${PN} () { |
113 | if [ -z "$D" ]; then | 113 | if [ -z "$D" ]; then |
114 | if type systemd-tmpfiles >/dev/null; then | 114 | if type systemd-tmpfiles >/dev/null; then |
115 | systemd-tmpfiles --create | 115 | systemd-tmpfiles --create |
116 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | 116 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then |
117 | ${sysconfdir}/init.d/populate-volatile.sh update | 117 | ${sysconfdir}/init.d/populate-volatile.sh update |
118 | fi | 118 | fi |
119 | fi | 119 | fi |
120 | } | 120 | } |
121 | 121 | ||
122 | FILES_${PN} += "${localstatedir}/ \ | 122 | FILES_${PN} += " \ |
123 | ${systemd_unitdir}/system/nginx.service \ | 123 | ${localstatedir}/ \ |
124 | " | 124 | ${systemd_unitdir}/system/nginx.service \ |
125 | 125 | " | |
126 | CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \ | 126 | |
127 | ${sysconfdir}/nginx/fastcgi.conf\ | 127 | CONFFILES_${PN} = " \ |
128 | ${sysconfdir}/nginx/fastcgi_params \ | 128 | ${sysconfdir}/nginx/nginx.conf \ |
129 | ${sysconfdir}/nginx/koi-utf \ | 129 | ${sysconfdir}/nginx/fastcgi.conf \ |
130 | ${sysconfdir}/nginx/koi-win \ | 130 | ${sysconfdir}/nginx/fastcgi_params \ |
131 | ${sysconfdir}/nginx/mime.types \ | 131 | ${sysconfdir}/nginx/koi-utf \ |
132 | ${sysconfdir}/nginx/scgi_params \ | 132 | ${sysconfdir}/nginx/koi-win \ |
133 | ${sysconfdir}/nginx/uwsgi_params \ | 133 | ${sysconfdir}/nginx/mime.types \ |
134 | ${sysconfdir}/nginx/win-utf \ | 134 | ${sysconfdir}/nginx/scgi_params \ |
135 | ${sysconfdir}/nginx/uwsgi_params \ | ||
136 | ${sysconfdir}/nginx/win-utf \ | ||
135 | " | 137 | " |
136 | 138 | ||
137 | INITSCRIPT_NAME = "nginx" | 139 | INITSCRIPT_NAME = "nginx" |