how can i customize existing package when using the BR2_EXTERNAL mechanism
for example, i need add rtmp module to the nginx package
nginx.mk
ifeq ($(BR2_PACKAGE_NGINX_HTTP_RTMP),y)NGINX_POST_PATCH_CMDS += git clone https://github.com/arut/nginx-rtmp-module.git $(@D)/rtmp NGINX_CONF_OPT += --add-module=$(@D)/rtmp
endif
nginx/Config.in
config BR2_PACKAGE_NGINX_HTTP_RTMP
?? ?bool "Enable RTMP module"
?? ?depends on BR2_PACKAGE_NGINX
?? ?help
?? ?? Enable NGINX-based Media Streaming Server.
Volkov Viacheslav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151016/4d00a1d1/attachment.html>
Dear ?????? ????????,
Quoted 9 lines · ?????? ????????
for example, i need add rtmp module to the nginx package
nginx.mk
ifeq ($(BR2_PACKAGE_NGINX_HTTP_RTMP),y)
NGINX_POST_PATCH_CMDS+= git clone https://github.com/arut/nginx-rtmp-module.git $(@D)/rtmpNGINX_CONF_OPT+= --add-module=$(@D)/rtmp
endif
Quoted 7 lines
nginx/Config.in
config
BR2_PACKAGE_NGINX_HTTP_RTMP
?? ?bool "Enable RTMP module"
?? ?depends onBR2_PACKAGE_NGINX
?? ?help
?? ?? Enable NGINX-based Media Streaming Server.
The BR2_EXTERNAL mechanism does not allow to customize existing packages in the main Buildroot. It only allows to *add* other packages.
My suggestion here would be to simply patch the official Buildroot, and send the patch upstream to us so that it gets merged.
However, note that your approach is not correct: doing a "git clone" in the middle of a package patch commands is not good as it completely circumvents the Buildroot download logic and legal-info collection logic.
You should instead add a separate package for the nginx-rtmp-module, and then if there is no other way than building it during the nginx build, what you can do is in the nginx package, depend on the nginx-rtmp-module, and create the appropriate symlink between $(@D) and the build directory of nginx-rtmp-module.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com