packages/libs/libmicrohttpd/Makefile
Daniel Engberg f8ec00fe97 libmicrohttpd: Update to 0.9.62 and rework Makefile
Update to 0.9.62
Various cosmetic changes to Makefile
Fix variants and default to no ssl variant

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2019-01-28 20:50:52 +01:00

85 lines
2.1 KiB
Makefile

#
# Copyright (C) 2010-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libmicrohttpd
PKG_VERSION:=0.9.62
PKG_RELEASE:=1
PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/libmicrohttpd
PKG_HASH:=bd3e097d703f5091a6a01b56c0464a90fdd17f5d50478cea50a346b25c88db49
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libmicrohttpd/default
SECTION:=libs
CATEGORY:=Libraries
TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
URL:=http://www.gnu.org/software/libmicrohttpd/
endef
define Package/libmicrohttpd
$(call Package/libmicrohttpd/default)
VARIANT:=nossl
CONFLICTS:=libmicrohttpd-ssl
endef
define Package/libmicrohttpd-ssl
$(call Package/libmicrohttpd/default)
TITLE+= with SSL support
VARIANT:=ssl
DEPENDS:=+libgcrypt +libgnutls +libgpg-error
PROVIDES:=libmicrohttpd
endef
CONFIGURE_ARGS+= \
--disable-curl \
--disable-rpath \
--disable-doc \
--disable-examples \
--enable-poll=no \
--enable-epoll=yes \
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS += \
--enable-https \
--with-gnutls
else
CONFIGURE_ARGS += \
--disable-https \
--without-gnutls
endif
define Package/libmicrohttpd/description
GNU libmicrohttpd is a small C library that is supposed to make it easy
to run an HTTP server as part of another application.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef
define Package/libmicrohttpd/install
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libmicrohttpd))
$(eval $(call BuildPackage,libmicrohttpd-ssl))