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