2014-07-22 22:31:30 -07:00
|
|
|
package=miniupnpc
|
2015-11-10 07:23:56 -08:00
|
|
|
$(package)_version=1.9.20151026
|
2014-07-22 22:31:30 -07:00
|
|
|
$(package)_download_path=http://miniupnp.free.fr/files
|
|
|
|
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
2015-11-10 07:23:56 -08:00
|
|
|
$(package)_sha256_hash=f3cf9a5a31588a917d4d9237e5bc50f84d00c5aa48e27ed50d9b88dfa6a25d47
|
2014-07-22 22:31:30 -07:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
|
|
|
$(package)_build_opts=CC="$($(package)_cc)"
|
|
|
|
$(package)_build_opts_darwin=OS=Darwin
|
|
|
|
$(package)_build_opts_mingw32=-f Makefile.mingw
|
2014-09-23 16:27:57 -07:00
|
|
|
$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
|
2014-07-22 22:31:30 -07: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
|