Merge pull request #11964 from zhanhb/nginx-all-module
[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.70
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libmicrohttpd
16 PKG_HASH:=90d0a3d396f96f9bc41eb0f7e8187796049285fabef82604acd4879590977307
17
18 PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
19 PKG_LICENSE:=LGPL-2.1-or-later
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/libmicrohttpd/default
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
31 URL:=http://www.gnu.org/software/libmicrohttpd/
32 endef
33
34 define Package/libmicrohttpd-no-ssl
35 $(call Package/libmicrohttpd/default)
36 VARIANT:=nossl
37 DEFAULT_VARIANT:=1
38 PROVIDES:=libmicrohttpd
39 endef
40
41 define Package/libmicrohttpd-ssl
42 $(call Package/libmicrohttpd/default)
43 TITLE+= with SSL support
44 VARIANT:=ssl
45 DEPENDS:=+libgcrypt +libgnutls +libgpg-error
46 PROVIDES:=libmicrohttpd
47 endef
48
49 CONFIGURE_ARGS += \
50 --disable-curl \
51 --disable-rpath \
52 --disable-doc \
53 --disable-examples \
54 --disable-poll \
55 --enable-epoll
56
57 ifeq ($(BUILD_VARIANT),ssl)
58 CONFIGURE_ARGS += \
59 --enable-https \
60 --with-gnutls
61 else
62 CONFIGURE_ARGS += \
63 --disable-https \
64 --without-gnutls
65 endif
66
67 define Package/libmicrohttpd/description
68 GNU libmicrohttpd is a small C library that is supposed to make it easy
69 to run an HTTP server as part of another application.
70 endef
71
72 define Build/InstallDev
73 $(INSTALL_DIR) $(1)/usr/include/
74 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/microhttpd.h $(1)/usr/include/
75 $(INSTALL_DIR) $(1)/usr/lib/
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.{so*,a,la} $(1)/usr/lib/
77 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
78 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
79 endef
80
81 define Package/libmicrohttpd-no-ssl/install
82 $(INSTALL_DIR) $(1)/usr/lib/
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
84 endef
85
86 define Package/libmicrohttpd-ssl/install
87 $(INSTALL_DIR) $(1)/usr/lib/
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
89 endef
90
91 $(eval $(call BuildPackage,libmicrohttpd-no-ssl))
92 $(eval $(call BuildPackage,libmicrohttpd-ssl))