aboutsummaryrefslogtreecommitdiff
path: root/depends/packages/miniupnpc.mk
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2014-07-23 01:31:30 -0400
committerCory Fields <cory-nospam-@coryfields.com>2014-08-08 15:10:46 -0400
commit1dec09b341f61836147d87656aea7f7be02aab6d (patch)
treebda4c72a414edf94b91537eb2fe9c6da5c6942b8 /depends/packages/miniupnpc.mk
parent36065cc529bb9be5655fcaaad2746edb7b6f4ddb (diff)
depends: add shared dependency builder
See the README's in depends for documentation
Diffstat (limited to 'depends/packages/miniupnpc.mk')
-rw-r--r--depends/packages/miniupnpc.mk28
1 files changed, 28 insertions, 0 deletions
diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
new file mode 100644
index 0000000000..6dd7d93b07
--- /dev/null
+++ b/depends/packages/miniupnpc.mk
@@ -0,0 +1,28 @@
+package=miniupnpc
+$(package)_version=1.9
+$(package)_download_path=http://miniupnp.free.fr/files
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464
+
+define $(package)_set_vars
+$(package)_build_opts=CC="$($(package)_cc)"
+$(package)_build_opts_darwin=OS=Darwin
+$(package)_build_opts_mingw32=-f Makefile.mingw
+$(package)_build_env+=CFLAGS="$($(package)_cflags)" AR="$($(package)_ar)"
+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