You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

miniupnpc.mk 1.2KB

12345678910111213141516171819202122232425262728
  1. package=miniupnpc
  2. $(package)_version=2.0.20170509
  3. $(package)_download_path=http://miniupnp.free.fr/files
  4. $(package)_file_name=$(package)-$($(package)_version).tar.gz
  5. $(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
  6. define $(package)_set_vars
  7. $(package)_build_opts=CC="$($(package)_cc)"
  8. $(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
  9. $(package)_build_opts_mingw32=-f Makefile.mingw
  10. $(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
  11. endef
  12. define $(package)_preprocess_cmds
  13. mkdir dll && \
  14. sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
  15. sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw
  16. endef
  17. define $(package)_build_cmds
  18. $(MAKE) libminiupnpc.a $($(package)_build_opts)
  19. endef
  20. define $(package)_stage_cmds
  21. mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\
  22. install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\
  23. install libminiupnpc.a $($(package)_staging_prefix_dir)/lib
  24. endef