Add dansguardian and compile it against uClibc++
[openwrt/svn-archive/archive.git] / net / dansguardian / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dansguardian
12 PKG_VERSION:=2.9.9.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://dansguardian.org/downloads/2/Beta
17 PKG_MD5SUM:=
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/dansguardian
25 SECTION:=net
26 DEPENDS:=+libpthread +uclibcxx
27 CATEGORY:=Network
28 TITLE:=DansGuardian
29 URL:=http://dansguardian.org
30 endef
31
32 define Package/dansguardian/conffiles
33 /etc/dansguardian/dansguardian.conf
34 endef
35
36 CONFIGURE_VARS += \
37 INCLUDES="" \
38 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
39 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/uClibc++" \
40 LDFLAGS="$$$$LDFLAGS" \
41 LIBS="-nodefaultlibs -luClibc++ -lpthread" \
42
43
44 define Build/Configure
45 $(call Build/Configure/Default,\
46 --disable-clamav \
47 --with-sysconfsubdir=dansguardian \
48 --with-proxyuser=root \
49 --with-proxygroup=root \
50 )
51 endef
52
53 define Build/Compile
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all install
57 endef
58
59 define Package/dansguardian/install
60 $(INSTALL_DIR) $(1)/usr/sbin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/
62 $(INSTALL_DIR) $(1)/etc
63 $(CP) $(PKG_INSTALL_DIR)/etc/dansguardian $(1)/etc/
64 $(INSTALL_DIR) $(1)/usr/share/dansguardian
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/dansguardian/transparent1x1.gif $(1)/usr/share/dansguardian/
66 $(INSTALL_DIR) $(1)/usr/share/dansguardian/languages/ukenglish
67 $(CP) $(PKG_INSTALL_DIR)/usr/share/dansguardian/languages/ukenglish/* $(1)/usr/share/dansguardian/languages/ukenglish/
68 endef
69
70 $(eval $(call BuildPackage,dansguardian))