| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= libupnp
|
|---|
| 10 | PKG_VERSION:= 1.2.1a
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= e72b3550bf064eedf080f16f09688891
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= @SF/upnp
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,LIBUPNP,libupnp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 |
|
|---|
| 21 | $(WRKBUILD)/.configured:
|
|---|
| 22 | touch $@
|
|---|
| 23 |
|
|---|
| 24 | $(WRKBUILD)/.built: $(WRKBUILD)/.configured
|
|---|
| 25 | $(MAKE) -C $(WRKBUILD)/upnp \
|
|---|
| 26 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 27 | OPT_FLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 28 | STRIP=/bin/true
|
|---|
| 29 | touch $@
|
|---|
| 30 |
|
|---|
| 31 | $(IPKG_LIBUPNP):
|
|---|
| 32 | install -m0755 -d $(IDIR_LIBUPNP)/usr/lib
|
|---|
| 33 | $(CP) $(WRKBUILD)/upnp/bin/libixml.so $(IDIR_LIBUPNP)/usr/lib/ ; \
|
|---|
| 34 | $(CP) $(WRKBUILD)/upnp/bin/libthreadutil.so $(IDIR_LIBUPNP)/usr/lib/ ; \
|
|---|
| 35 | $(CP) $(WRKBUILD)/upnp/bin/libupnp.so $(IDIR_LIBUPNP)/usr/lib/ ; \
|
|---|
| 36 | $(RSTRIP) $(IDIR_LIBUPNP)
|
|---|
| 37 | $(IPKG_BUILD) $(IDIR_LIBUPNP) $(PACKAGE_DIR)
|
|---|
| 38 |
|
|---|
| 39 | $(STAGING_DIR)/usr/lib/libupnp.so: $(WRKBUILD)/.built
|
|---|
| 40 | mkdir -p $(STAGING_DIR)/usr/include/upnp
|
|---|
| 41 | $(CP) $(WRKBUILD)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/
|
|---|
| 42 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 43 | $(CP) $(WRKBUILD)/upnp/bin/libixml.so $(STAGING_DIR)/usr/lib/ ; \
|
|---|
| 44 | $(CP) $(WRKBUILD)/upnp/bin/libthreadutil.so $(STAGING_DIR)/usr/lib/ ; \
|
|---|
| 45 | $(CP) $(WRKBUILD)/upnp/bin/libupnp.so $(STAGING_DIR)/usr/lib/ ; \
|
|---|
| 46 | touch $@
|
|---|
| 47 |
|
|---|
| 48 | install-dev: $(STAGING_DIR)/usr/lib/libupnp.so
|
|---|
| 49 |
|
|---|
| 50 | uninstall-dev:
|
|---|
| 51 | rm -rf \
|
|---|
| 52 | $(STAGING_DIR)/usr/include/upnp \
|
|---|
| 53 | $(STAGING_DIR)/usr/lib/libixml.so \
|
|---|
| 54 | $(STAGING_DIR)/usr/lib/libthreadutil.so \
|
|---|
| 55 | $(STAGING_DIR)/usr/lib/libupnp.so \
|
|---|
| 56 |
|
|---|
| 57 | compile-targets: install-dev
|
|---|
| 58 | clean-targets: uninstall-dev
|
|---|