2014-07-23 07:31:30 +02:00
|
|
|
package=miniupnpc
|
2018-02-10 02:07:32 +01:00
|
|
|
$(package)_version=2.0.20180203
|
2014-07-23 07:31:30 +02:00
|
|
|
$(package)_download_path=http://miniupnp.free.fr/files
|
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
2018-02-10 02:07:32 +01:00
|
|
|
$(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7
|
2014-07-23 07:31:30 +02:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
|
|
|
$(package)_build_opts=CC="$($(package)_cc)"
|
2015-11-11 07:28:13 +01:00
|
|
|
$(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
|
2014-07-23 07:31:30 +02:00
|
|
|
$(package)_build_opts_mingw32=-f Makefile.mingw
|
2014-09-24 01:27:57 +02:00
|
|
|
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
|
2018-02-15 12:12:49 +01:00
|
|
|
$(package)_build_env+=CFLAGS=-D_DARWIN_C_SOURCE
|
2014-07-23 07:31:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_preprocess_cmds
|
|
|
|
mkdir dll && \
|
|
|
|
sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
|
|
|
|
sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
|
|
|
$(MAKE) libminiupnpc.a $($(package)_build_opts)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\
|
|
|
|
install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\
|
|
|
|
install libminiupnpc.a $($(package)_staging_prefix_dir)/lib
|
|
|
|
endef
|