1 include $(TOPDIR
)/rules.mk
6 PKG_MAINTAINER
:=Peter Stadler
<peter.stadler@student.uibk.ac.at
>
8 include $(INCLUDE_DIR
)/package.mk
9 include $(INCLUDE_DIR
)/cmake.mk
11 CMAKE_OPTIONS
+= -DUBUS
=y
12 CMAKE_OPTIONS
+= -DVERSION
=$(PKG_VERSION
)
14 TARGET_CFLAGS
+= -Wno-error
=deprecated-declarations
16 define Package
/nginx-ssl-util
/default
19 SUBMENU
:=Web Servers
/Proxies
20 TITLE
:=Nginx configurator including SSL
21 DEPENDS
:=+libstdcpp
+libuci
+libubus
+libubox
+libpthread
+libopenssl
22 # TODO: remove after a transition period (together with below and pkg nginx):
23 # It actually removes nginx-util (replacing it by a dummy pkg) to avoid
24 # conflicts with nginx-ssl-util*
26 EXTRA_DEPENDS
:=nginx-util
(>=1.4-2)
30 define Package
/nginx-ssl-util
31 $(Package
/nginx-ssl-util
/default
)
34 CONFLICTS
:=nginx-ssl-util-nopcre
,
38 define Package
/nginx-ssl-util-nopcre
39 $(Package
/nginx-ssl-util
/default
)
40 TITLE
+= (using
<regex
>)
41 CONFLICTS
:=nginx-ssl-util
45 define Package
/nginx-ssl-util
/default
/description
46 Utility that builds dynamically LAN listen directives for Nginx.
47 Furthermore
, it manages SSL directives for its server parts and can create
48 corresponding
(self-signed
) certificates.
52 Package
/nginx-ssl-util
/description
= \
53 $(Package
/nginx-ssl-util
/default
/description
) \
54 It uses the PCRE library for performance.
57 Package
/nginx-ssl-util-nopcre
/description
= \
58 $(Package
/nginx-ssl-util
/default
/description
) \
59 It uses the standard regex library of C
++.
62 define Package
/nginx-ssl-util
/install/default
63 $(INSTALL_DIR
) $(1)/etc
/nginx
/conf.d
/
65 $(INSTALL_CONF
) .
/files
/uci.conf.template
$(1)/etc
/nginx
/
66 $(LN
) /var
/lib
/nginx
/uci.conf
$(1)/etc
/nginx
/uci.conf
68 $(INSTALL_CONF
) .
/files
/restrict_locally
$(1)/etc
/nginx
/
70 $(INSTALL_DIR
) $(1)/etc
/nginx
/module.d
/
72 $(INSTALL_DIR
) $(1)/etc
/config
/
73 $(INSTALL_CONF
) .
/files
/nginx.config
$(1)/etc
/config
/nginx
75 ifneq ($(CONFIG_IPV6
),y
) # the used IPv6 directives have `::` in them:
76 $(SED
) "/::/d" $(1)/etc
/nginx
/restrict_locally
77 $(SED
) "/::/d" $(1)/etc
/config
/nginx
82 define Package
/nginx-ssl-util
/install
83 $(call Package
/nginx-ssl-util
/install/default
, $(1))
84 $(INSTALL_DIR
) $(1)/usr
/bin
85 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-ssl-util
$(1)/usr
/bin
/nginx-util
89 define Package
/nginx-ssl-util-nopcre
/install
90 $(call Package
/nginx-ssl-util
/install/default
, $(1))
91 $(INSTALL_DIR
) $(1)/usr
/bin
92 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nginx-ssl-util-nopcre \
93 $(1)/usr
/bin
/nginx-util
97 define Package
/nginx-ssl-util
/prerm
100 [ -n
"$${IPKG_INSTROOT}" ] && exit
0
101 [ "$${PKG_UPGRADE}" = "1" ] && exit
0
102 case
"$$(/sbin/uci get "nginx.global.uci_enable
" 2>/dev/null)" in
103 1|on|true|yes|enabled
) ;;
107 eval
"$$(/usr/bin/nginx-util get_env)" &&
108 [ "$$(/sbin/uci get "nginx.
$${LAN_NAME}.
$${MANAGE_SSL}" 2>/dev/null)" = \
111 rm -f
"$$(/sbin/uci get "nginx.
$${LAN_NAME}.ssl_certificate
")" \
112 "$$(/sbin/uci get "nginx.
$${LAN_NAME}.ssl_certificate_key
")"
118 Package
/nginx-ssl-util-nopcre
/prerm
= $(Package
/nginx-ssl-util
/prerm
)
121 define Package
/nginx-ssl-util
/conffiles
123 /etc
/nginx
/restrict_locally
124 /etc
/nginx
/uci.conf.template
128 Package
/nginx-ssl-util-nopcre
/conffiles
= $(Package
/nginx-ssl-util
/conffiles
)
131 $(eval
$(call BuildPackage
,nginx-ssl-util
))
132 $(eval
$(call BuildPackage
,nginx-ssl-util-nopcre
))
135 # TODO: remove after a transition period (together with above and pkg nginx):
136 # It replaces nginx-util by a dummy pkg for a smooth upgrade of nginx*
138 define Package
/nginx-util
139 TITLE
:=Dummy package for removing nginx-util when upgrading.
140 DEPENDS
:=+libstdcpp
+libubus
+libubox
+libpthread
144 define Package
/nginx-util
/install
145 $(INSTALL_DIR
) $(1)/usr
/bin
148 $(eval
$(call BuildPackage
,nginx-util
))