b16f3208df6a658bcce9b56770fa9a91cc0abac4
[openwrt/openwrt.git] / package / network / utils / owipcalc / Makefile
1 #
2 # Copyright (C) 2012 Jo-Philipp Wich <jo@mein.io>
3 #
4 # This is free software, licensed under the Apache 2 license.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=owipcalc
10 PKG_RELEASE:=3
11 PKG_LICENSE:=Apache-2.0
12
13 include $(INCLUDE_DIR)/package.mk
14
15
16 define Package/owipcalc
17 SECTION:=utils
18 CATEGORY:=Utilities
19 TITLE:=Simple IPv4/IPv6 address calculator
20 MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
21 endef
22
23 define Package/owipcalc/description
24 The owipcalc utility supports a number of calculations and tests to work
25 with ip-address ranges, this is useful for scripts that e.g. need to
26 partition ipv6-prefixes into small subnets or to calculate address ranges
27 for dhcp pools.
28 endef
29
30
31 define Build/Prepare
32 $(INSTALL_DIR) $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 endef
35
36 define Build/Configure
37 endef
38
39 define Build/Compile
40 $(TARGET_CC) $(TARGET_CFLAGS) \
41 -o $(PKG_BUILD_DIR)/owipcalc $(PKG_BUILD_DIR)/owipcalc.c
42 endef
43
44
45 define Package/owipcalc/install
46 $(INSTALL_DIR) $(1)/usr/bin
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/owipcalc $(1)/usr/bin/owipcalc
48 endef
49
50 $(eval $(call BuildPackage,owipcalc))