cda40647b44be9f635f59408be53b67bd74e306f
[openwrt.git] / package / network / utils / owipcalc / Makefile
1 #
2 # Copyright (C) 2012 Jo-Philipp Wich <jow@openwrt.org>
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 PKG_LICENSE:=Apache-2.0
14 PKG_LICENSE_FILES:=
15
16 include $(INCLUDE_DIR)/package.mk
17
18
19 define Package/owipcalc
20   SECTION:=utils
21   CATEGORY:=Utilities
22   TITLE:=Simple IPv4/IPv6 address calculator
23   MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
24 endef
25
26 define Package/owipcalc/description
27   The owipcalc utility supports a number of calculations and tests to work
28   with ip-address ranges, this is useful for scripts that e.g. need to
29   partition ipv6-prefixes into small subnets or to calculate address ranges
30   for dhcp pools.
31 endef
32
33
34 define Build/Prepare
35         $(INSTALL_DIR) $(PKG_BUILD_DIR)
36         $(CP) ./src/* $(PKG_BUILD_DIR)/
37 endef
38
39 define Build/Configure
40 endef
41
42 define Build/Compile
43         $(TARGET_CC) $(TARGET_CFLAGS) \
44                 -o $(PKG_BUILD_DIR)/owipcalc $(PKG_BUILD_DIR)/owipcalc.c
45 endef
46
47
48 define Package/owipcalc/install
49         $(INSTALL_DIR) $(1)/usr/bin
50         $(INSTALL_BIN) $(PKG_BUILD_DIR)/owipcalc $(1)/usr/bin/owipcalc
51 endef
52
53 $(eval $(call BuildPackage,owipcalc))