Merge pull request #2126 from lynxis/libmicrohttpd
[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.49
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libmicrohttpd
16 PKG_MD5SUM:=3209aa2ac6199b874a6325342b86edbc
17
18 PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
19
20 PKG_LICENSE:=LGPL-2.1
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_BUILD_PARALLEL:=1
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libmicrohttpd/Default
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=GNU libmicrohttpd is a library that runs an HTTP server.
34 URL:=http://www.gnu.org/software/libmicrohttpd/
35 endef
36
37 define Package/libmicrohttpd
38 $(call Package/libmicrohttpd/Default)
39 TITLE+=(with-ssl)
40 DEPENDS:=+libpthread +libgcrypt +libgnutls +libgpg-error
41 endef
42
43 define Package/libmicrohttpd-no-ssl
44 $(call Package/libmicrohttpd/Default)
45 TITLE+=(no-ssl)
46 DEPENDS:=+libpthread
47 VARIANT:=no-ssl
48 PROVIDES:=libmicrohttpd
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))