OpenWrt Forum Archive

Topic: Howto compile a package with optional options?

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

It is my first attempt that I have to compile a package by my own.It's the first time I'm trying to compile stuff like linux packages. I've set up my buildroot as it is described at http://wiki.openwrt.org/doc/howto/build and now I have the SDK.

Now I want to compile the nginx package with SSL support.

At first I must know which dependencies must be met. The output of

cd package/feeds/packages/nginx/
grep DEPENDS Makefile

is

PKG_CONFIG_DEPENDS := \
  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +libpthread +NGINX_LUA:liblua
        DEPENDS:=nginx @NGINX_NAXSI
        DEPENDS:=nginx @NGINX_PROXYPROTOCOL
        DEPENDS:=nginx @NGINX_SYSLOG

First question: I need libpcre, libopenssl, zlib, liblua? Is that correct?

Ok, I want nginx with SSL support by default. So I edit package/feeds/packages/nginx/Config.in with an text editor:

config NGINX_SSL
        bool
        prompt "Enable SSL module"
        default y

Ok, as I read at http://wiki.openwrt.org/doc/howto/obtai … e_packages I saw that his has changed and the documentation in the wiki. Is the information somewhat outdated? Maybe I understand it not correctly..


Could anybody give me a tip how to compile packages today (August, 2015)?

Did you read http://wiki.openwrt.org/doc/devel/packa … ency_types ? It explains how dependencies work.

More convenient even is to do 'make menuconfig', go to Network > Web Servers & Proxies > Nginx Web Server and select it 'M or *). Then do enter and you will get a configuration menu where you can select/deselect many options, amongst which 'Enable SSL module', that sets NGINX_SSL (default = n, as you can see in the Config.in). Save and exit 'make menuconfig' and do 'make'.

If all all other requirements are met is should work. No need to modify neither the Makefile nor the Config.in. Thomas Heil <heil@terminal-consulting.de> did all the work for you.

Works like a charm with me.

The discussion might have continued from here.