bandwidthd-php: migrate to php7
[feed/packages.git] / utils / bandwidthd-php / Makefile
1 #
2 # Copyright (C) 2006-2016 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:=bandwidthd-php
11 PKG_VERSION:=2.0.1
12 PKG_RELEASE:=2
13
14 PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
15
16 PKG_LICENSE:=GPL-2.0
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/bandwidthd-php
21 SECTION:=utils
22 CATEGORY:=Utilities
23 DEPENDS:=+libpcre +libxml2 +php7 +php7-cgi +php7-mod-pgsql +php7-mod-gd
24 TITLE:=PHP files to graph bandwidthd data in a postgresql database
25 URL:=http://bandwidthd.sourceforge.net/
26 endef
27
28 define Package/bandwidthd-php/description
29 PHP files to graph bandwidthd data in a postgresql database
30 endef
31
32 define Build/Compile
33 endef
34
35 define Package/bandwidthd-php/install
36 $(INSTALL_DIR) $(1)/www/phphtdocs
37 $(INSTALL_DATA) ./files/legend.gif $(1)/www/phphtdocs/
38 $(INSTALL_DATA) ./files/logo.gif $(1)/www/phphtdocs/
39 $(INSTALL_DATA) ./files/details.php $(1)/www/phphtdocs/
40 $(INSTALL_DATA) ./files/footer.php $(1)/www/phphtdocs/
41 $(INSTALL_DATA) ./files/graph.php $(1)/www/phphtdocs/
42 $(INSTALL_DATA) ./files/include.php $(1)/www/phphtdocs/
43 $(INSTALL_DATA) ./files/index.php $(1)/www/phphtdocs/
44 ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf
45 $(INSTALL_DIR) $(1)//etc/config
46 $(INSTALL_CONF) ./files/bandwidthd-php.config $(1)/etc/config/bandwidthd-php
47 $(INSTALL_DIR) $(1)/etc/init.d
48 $(INSTALL_BIN) ./files/bandwidthd-php.init $(1)/etc/init.d/bandwidthd-php
49 endef
50
51 $(eval $(call BuildPackage,bandwidthd-php))