mirror of
https://github.com/openwrt/packages.git
synced 2025-11-05 08:39:44 +00:00
cmake 4.x will require 'cmake_minimum_required' defined in cmake projects to be at least 3.5. Adjust those local sources where that variable is currently defined with value below 3.5. Use 3.30 as the value, as 3.30 is currently used in 24.10, the oldest still supported OpenWrt release branch. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
126 lines
3.1 KiB
Makefile
126 lines
3.1 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=nginx-util
|
|
PKG_VERSION:=1.7
|
|
PKG_RELEASE:=2
|
|
PKG_MAINTAINER:=Peter Stadler <peter.stadler@student.uibk.ac.at>
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
CMAKE_OPTIONS+= -DUBUS=y
|
|
CMAKE_OPTIONS+= -DVERSION=$(PKG_VERSION)
|
|
|
|
define Package/nginx-ssl-util/default
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Web Servers/Proxies
|
|
TITLE:=Nginx configurator including SSL
|
|
DEPENDS:=+libstdcpp +libuci +libubus +libubox +libpthread +libopenssl
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util
|
|
$(Package/nginx-ssl-util/default)
|
|
TITLE+= (using PCRE)
|
|
DEPENDS+= +libpcre2
|
|
CONFLICTS:=nginx-ssl-util-nopcre,
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util-nopcre
|
|
$(Package/nginx-ssl-util/default)
|
|
TITLE+= (using <regex>)
|
|
CONFLICTS:=nginx-ssl-util
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util/default/description
|
|
Utility that builds dynamically LAN listen directives for Nginx.
|
|
Furthermore, it manages SSL directives for its server parts and can create
|
|
corresponding (self-signed) certificates.
|
|
endef
|
|
|
|
|
|
Package/nginx-ssl-util/description = \
|
|
$(Package/nginx-ssl-util/default/description) \
|
|
It uses the PCRE library for performance.
|
|
|
|
|
|
Package/nginx-ssl-util-nopcre/description = \
|
|
$(Package/nginx-ssl-util/default/description) \
|
|
It uses the standard regex library of C++.
|
|
|
|
|
|
define Package/nginx-ssl-util/install/default
|
|
$(INSTALL_DIR) $(1)/etc/nginx/conf.d/
|
|
|
|
$(INSTALL_CONF) ./files/uci.conf.template $(1)/etc/nginx/
|
|
$(LN) /var/lib/nginx/uci.conf $(1)/etc/nginx/uci.conf
|
|
|
|
$(INSTALL_CONF) ./files/restrict_locally $(1)/etc/nginx/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/nginx/module.d/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config/
|
|
$(INSTALL_CONF) ./files/nginx.config $(1)/etc/config/nginx
|
|
|
|
ifneq ($(CONFIG_IPV6),y) # the used IPv6 directives have `::` in them:
|
|
$(SED) "/::/d" $(1)/etc/nginx/restrict_locally
|
|
$(SED) "/::/d" $(1)/etc/config/nginx
|
|
endif
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util/install
|
|
$(call Package/nginx-ssl-util/install/default, $(1))
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-ssl-util $(1)/usr/bin/nginx-util
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util-nopcre/install
|
|
$(call Package/nginx-ssl-util/install/default, $(1))
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-ssl-util-nopcre \
|
|
$(1)/usr/bin/nginx-util
|
|
endef
|
|
|
|
|
|
define Package/nginx-ssl-util/prerm
|
|
#!/bin/sh
|
|
|
|
[ -n "$${IPKG_INSTROOT}" ] && exit 0
|
|
[ "$${PKG_UPGRADE}" = "1" ] && exit 0
|
|
case "$$(/sbin/uci get "nginx.global.uci_enable" 2>/dev/null)" in
|
|
1|on|true|yes|enabled) ;;
|
|
*) exit 0;;
|
|
esac
|
|
|
|
eval "$$(/usr/bin/nginx-util get_env)" &&
|
|
[ "$$(/sbin/uci get "nginx.$${LAN_NAME}.$${MANAGE_SSL}" 2>/dev/null)" = \
|
|
"self-signed" ] &&
|
|
cd "/etc/nginx" &&
|
|
rm -f "$$(/sbin/uci get "nginx.$${LAN_NAME}.ssl_certificate")" \
|
|
"$$(/sbin/uci get "nginx.$${LAN_NAME}.ssl_certificate_key")"
|
|
|
|
exit 0
|
|
endef
|
|
|
|
|
|
Package/nginx-ssl-util-nopcre/prerm = $(Package/nginx-ssl-util/prerm)
|
|
|
|
|
|
define Package/nginx-ssl-util/conffiles
|
|
/etc/config/nginx
|
|
/etc/nginx/restrict_locally
|
|
/etc/nginx/uci.conf.template
|
|
endef
|
|
|
|
|
|
Package/nginx-ssl-util-nopcre/conffiles = $(Package/nginx-ssl-util/conffiles)
|
|
|
|
|
|
$(eval $(call BuildPackage,nginx-ssl-util))
|
|
$(eval $(call BuildPackage,nginx-ssl-util-nopcre))
|