libmicrohttpd: update to 0.9.77
[feed/packages.git] / libs / libmicrohttpd / Makefile
1 #
2 # Copyright (C) 2010-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libmicrohttpd
11 PKG_VERSION:=0.9.77
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libmicrohttpd
16 PKG_HASH:=9e7023a151120060d2806a6ea4c13ca9933ece4eacfc5c9464d20edddb76b0a0
17
18 PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
19 PKG_LICENSE:=LGPL-2.1-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:gnu:libmicrohttpd
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libmicrohttpd/default
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
32 URL:=https://www.gnu.org/software/libmicrohttpd/
33 endef
34
35 define Package/libmicrohttpd-no-ssl
36 $(call Package/libmicrohttpd/default)
37 VARIANT:=nossl
38 DEFAULT_VARIANT:=1
39 PROVIDES:=libmicrohttpd
40 endef
41
42 define Package/libmicrohttpd-ssl
43 $(call Package/libmicrohttpd/default)
44 TITLE+= with SSL support
45 VARIANT:=ssl
46 DEPENDS:=+libgcrypt +libgnutls +libgpg-error
47 PROVIDES:=libmicrohttpd
48 endef
49
50 define Package/libmicrohttpd/description
51 GNU libmicrohttpd is a small C library that is supposed to make it easy
52 to run an HTTP server as part of another application.
53 endef
54
55 CONFIGURE_ARGS += \
56 --disable-curl \
57 --disable-rpath \
58 --disable-doc \
59 --disable-examples \
60 --disable-poll \
61 --enable-epoll \
62 --with-pic
63
64 ifeq ($(BUILD_VARIANT),ssl)
65 CONFIGURE_ARGS += \
66 --enable-https \
67 --with-gnutls
68 else
69 CONFIGURE_ARGS += \
70 --disable-https \
71 --without-gnutls
72 endif
73
74 define Build/InstallDev
75 $(INSTALL_DIR) $(1)/usr/include/
76 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
77 $(INSTALL_DIR) $(1)/usr/lib/
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{so*,a,la} $(1)/usr/lib/
79 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
80 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
81 endef
82
83 define Package/libmicrohttpd-no-ssl/install
84 $(INSTALL_DIR) $(1)/usr/lib/
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
86 endef
87
88 define Package/libmicrohttpd-ssl/install
89 $(INSTALL_DIR) $(1)/usr/lib/
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
91 endef
92
93 $(eval $(call BuildPackage,libmicrohttpd-no-ssl))
94 $(eval $(call BuildPackage,libmicrohttpd-ssl))