You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=e2guardian
  9. PKG_VERSION:=3.0.4
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian.git
  17. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/uclibc++.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/e2guardian
  23. SECTION:=net
  24. DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib +libpcre
  25. CATEGORY:=Network
  26. SUBMENU:=Web Servers/Proxies
  27. TITLE:=E2Guardian
  28. URL:=http://e2guardian.org/cms/
  29. endef
  30. define Package/e2guardian/conffiles
  31. /etc/e2guardian/e2guardianf1.conf
  32. /etc/config/e2guardian
  33. endef
  34. CONFIGURE_VARS += \
  35. INCLUDES="" \
  36. CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
  37. LIBS="-lpthread"
  38. CONFIGURE_ARGS += \
  39. --with-sysconfsubdir=e2guardian \
  40. --with-proxyuser=root \
  41. --with-proxygroup=root \
  42. --enable-pcre=yes
  43. define Build/Configure
  44. $(call Build/Configure/Default,$CONFIGURE_ARGS)
  45. endef
  46. define Package/e2guardian/install
  47. $(INSTALL_DIR) $(1)/usr/sbin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2guardian $(1)/usr/sbin/
  49. $(INSTALL_DIR) $(1)/etc
  50. $(CP) $(PKG_INSTALL_DIR)/etc/e2guardian $(1)/etc/
  51. $(INSTALL_CONF) ./files/e2guardianf1.conf $(1)/etc/e2guardian/e2guardianf1.conf
  52. $(INSTALL_DIR) $(1)/etc/config
  53. $(INSTALL_CONF) ./files/e2guardian.config $(1)/etc/config/e2guardian
  54. $(INSTALL_DIR) $(1)/usr/share/e2guardian
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/transparent1x1.gif $(1)/usr/share/e2guardian/
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/e2guardian/blockedflash.swf $(1)/usr/share/e2guardian/
  57. $(INSTALL_DIR) $(1)/usr/share/e2guardian/languages/ukenglish
  58. $(CP) $(PKG_INSTALL_DIR)/usr/share/e2guardian/languages/ukenglish/* $(1)/usr/share/e2guardian/languages/ukenglish/
  59. $(INSTALL_DIR) $(1)/etc/init.d/
  60. $(INSTALL_BIN) ./files/e2guardian.init $(1)/etc/init.d/e2guardian
  61. endef
  62. $(eval $(call BuildPackage,e2guardian))