Merge pull request #4909 from StevenHessing/noddos
[feed/packages.git] / net / httping / Makefile
1 #
2 # Copyright (C) 2006-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:=httping
11 PKG_VERSION:=2.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://www.vanheusden.com/httping
16 PKG_HASH:=3e895a0a6d7bd79de25a255a1376d4da88eb09c34efdd0476ab5a907e75bfaf8
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/nls.mk
23
24 define Package/httping/Default
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=Httping is like 'ping' but for http-requests
28 URL:=http://www.vanheusden.com/httping/
29 DEPENDS:=$(INTL_DEPENDS)
30 MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
31 endef
32
33 define Package/httping/Default/description
34 Give it an url, and it'll show you how long it takes to connect, send a
35 request and retrieve the reply (only the headers). Be aware that the
36 transmission across the network also takes time!
37 endef
38
39 define Package/httping
40 $(call Package/httping/Default)
41 DEPENDS+= +libopenssl
42 TITLE+= (with SSL support)
43 VARIANT:=ssl
44 endef
45
46 define Package/httping/description
47 $(call Package/httping/Default/description)
48 This package is built with SSL support.
49 endef
50
51 define Package/httping-nossl
52 $(call Package/httping/Default)
53 TITLE+= (without SSL support)
54 VARIANT:=nossl
55 endef
56
57 define Package/httping-nossl/description
58 $(call Package/httping/Default/description)
59 This package is built without SSL support.
60 endef
61
62 define Build/Configure
63 endef
64
65 TARGET_LDFLAGS += $(INTL_LDFLAGS) $(if $(INTL_FULL),-lintl)
66
67 MAKE_FLAGS += \
68 DEBUG="no" \
69 FW="no" \
70 NC="no" \
71 TFO="no" \
72 JSON="no" \
73 NAGIOS="no" \
74 HELP="yes" \
75 FULLHELP="no"
76
77
78 ifeq ($(BUILD_VARIANT),nossl)
79 MAKE_FLAGS += SSL="no"
80 endif
81
82 define Package/httping/install
83 $(INSTALL_DIR) $(1)/usr/bin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/httping $(1)/usr/bin/
85 endef
86
87 Package/httping-nossl/install = $(Package/httping/install)
88
89 $(eval $(call BuildPackage,httping))
90 $(eval $(call BuildPackage,httping-nossl))