Fresh pull from upstream (stable) package feed
[librecmc/package-feed.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.52
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libmicrohttpd
16 PKG_MD5SUM:=54797f6e763d417627f89f60e4ae0a431dab0523f92f83def23ea02d0defafea
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    CONFLICTS:=libmicrohttpd
49 endef
50
51 define Package/libmicrohttpd/description/Default
52         GNU libmicrohttpd is a small C library that is supposed to make it easy
53         to run an HTTP server as part of another application.
54 endef
55
56 define Package/libmicrohttpd-no-ssl/description
57 $(call Package/libmicrohttp/description/Default)
58 endef
59
60 CONFIGURE_ARGS+= \
61         --disable-curl \
62         --disable-spdy \
63         --without-openssl
64
65 ifeq ($(BUILD_VARIANT),no-ssl)
66 CONFIGURE_ARGS += \
67         --disable-https \
68         --without-gnutls
69 else
70 CONFIGURE_ARGS += \
71         --enable-https \
72         --with-gnutls
73 endif
74
75 define Build/InstallDev
76         $(INSTALL_DIR) $(1)/usr/include/
77         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
78         $(INSTALL_DIR) $(1)/usr/lib/
79         $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
80         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
81         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
82 endef
83
84 define Package/libmicrohttpd/install
85         $(INSTALL_DIR) $(1)/usr/lib/
86         $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
87 endef
88
89 define Package/libmicrohttpd-no-ssl/install
90 $(call Package/libmicrohttpd/install,$1)
91 endef
92
93 $(eval $(call BuildPackage,libmicrohttpd))
94 $(eval $(call BuildPackage,libmicrohttpd-no-ssl))