|
| 1 | +################################################################################ |
| 2 | +# |
| 3 | +# openresty |
| 4 | +# |
| 5 | +################################################################################ |
| 6 | + |
| 7 | +OPENRESTY_VERSION = 1.9.7.4 |
| 8 | +OPENRESTY_SITE = https://openresty.org/download |
| 9 | +OPENRESTY_DEPENDENCIES += pcre openssl |
| 10 | +OPENRESTY_LICENSE = BSD-2c |
| 11 | +OPENRESTY_LICENSE_FILES = LICENSE |
| 12 | +OPENRESTY_CFLAGS = "-v" |
| 13 | +OPENRESTY_CPP_FLAGS = "-E" |
| 14 | +OPENRESTY_CONF_OPTS = \ |
| 15 | + --crossbuild=Linux::$(BR2_ARCH) \ |
| 16 | + --with-cc="$(TARGET_CC)" \ |
| 17 | + --with-cpp="$(TARGET_CPP)" \ |
| 18 | + --with-cc-opt="-pipe -O -W -Wall -g -O2" \ |
| 19 | + --with-ld-opt="$(TARGET_LDFLAGS)" \ |
| 20 | + --with-ipv6 |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +# disable external libatomic_ops because its detection fails. |
| 25 | +OPENRESTY_CONF_ENV += \ |
| 26 | + ngx_force_c_compiler=yes \ |
| 27 | + ngx_force_c99_have_variadic_macros=yes \ |
| 28 | + ngx_force_gcc_have_variadic_macros=yes \ |
| 29 | + ngx_force_gcc_have_atomic=yes \ |
| 30 | + ngx_force_have_libatomic=no \ |
| 31 | + ngx_force_have_epoll=yes \ |
| 32 | + ngx_force_have_sendfile=yes \ |
| 33 | + ngx_force_have_sendfile64=yes \ |
| 34 | + ngx_force_have_pr_set_dumpable=yes \ |
| 35 | + ngx_force_have_timer_event=yes \ |
| 36 | + ngx_force_have_map_anon=yes \ |
| 37 | + ngx_force_have_map_devzero=yes \ |
| 38 | + ngx_force_have_sysvshm=yes \ |
| 39 | + ngx_force_have_posix_sem=yes |
| 40 | + |
| 41 | +# prefix: nginx root configuration location |
| 42 | +OPENRESTY_CONF_OPTS += \ |
| 43 | + --pid-path=/var/run/nginx.pid \ |
| 44 | + --lock-path=/var/run/lock/nginx.lock \ |
| 45 | + --user=www-data \ |
| 46 | + --group=www-data \ |
| 47 | + --error-log-path=/var/log/nginx/error.log \ |
| 48 | + --http-log-path=/var/log/nginx/access.log \ |
| 49 | + --http-client-body-temp-path=/var/tmp/nginx/client-body \ |
| 50 | + --http-proxy-temp-path=/var/tmp/nginx/proxy \ |
| 51 | + --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ |
| 52 | + --http-scgi-temp-path=/var/tmp/nginx/scgi \ |
| 53 | + --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi |
| 54 | + |
| 55 | + |
| 56 | +define OPENRESTY_CONFIGURE_CMDS |
| 57 | + cd $(@D); $(OPENRESTY_CONF_ENV) $(@D)/configure $(OPENRESTY_CONF_OPTS) |
| 58 | +endef |
| 59 | + |
| 60 | +define OPENRESTY_BUILD_CMDS |
| 61 | + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) |
| 62 | +endef |
| 63 | + |
| 64 | +define OPENRESTY_INSTALL_TARGET_CMDS |
| 65 | + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install |
| 66 | + $(RM) $(TARGET_DIR)/usr/sbin/nginx.old \ |
| 67 | + $(TARGET_DIR)/usr/local/openresty/luajit/share/man/man1/luajit.1 |
| 68 | +endef |
| 69 | + |
| 70 | +$(eval $(generic-package)) |
0 commit comments