Added package imspector
[openwrt/svn-archive/archive.git] / net / imspector / Makefile
1 # Copyright (C) 2007-2008 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id:$
7 #
8 # Author: Carlos Cesario
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=imspector
13 PKG_VERSION:=0.7
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.imspector.org/downloads
18 PKG_MD5SUM:=08f983f5cd54094dac51ab39fe1ae839
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/imspector
23 SECTION:=net
24 CATEGORY:=Network
25 TITLE:=IMSpector is an Instant Messenger proxy
26 URL:=http://www.imspector.org
27 DEPENDS:=+libopenssl +libstdcpp +libmysqlclient +libsqlite3 +libpq
28 endef
29
30 define Package/imspector/description
31 IMSpector is an Instant Messenger proxy with monitoring and blocking, and content-filtering capabilities.
32 endef
33
34
35 define Package/imspector/conffiles
36 /etc/config/imspector
37 endef
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); \
41 sed -ie 's/#ADD_PLUGINS/ADD_PLUGINS/' Makefile \
42 );
43 endef
44
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 $(TARGET_CONFIGURE_OPTS) \
50 SSL_DIR="$(STAGING_DIR)/usr" \
51 SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \
52 SSL_FLAGS="-I$(STAGING_DIR)/usr/include -DHAVE_SSL" \
53 SSL_OBJS=sslstate.o \
54 PREFIX="$(STAGING_DIR)/usr" \
55 CXX=$(TARGET_CXX) \
56 CXXFLAGS="$(TARGET_CXXFLAGS) $(TARGET_CFLAGS) $(FPIC) -I$(STAGING_DIR)/usr/include \
57 -L$(STAGING_DIR)/usr/lib -DHAVE_SSL" \
58 all
59 endef
60
61
62 define Build/Install
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 install
66 endef
67
68 define Package/imspector/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/imspector $(1)/usr/sbin/imspector
71 $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libimspector.so $(1)/usr/lib/
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/*.so $(1)/usr/lib/$(PKG_NAME)
74 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
75 $(INSTALL_DIR) $(1)/etc/config
76 $(CP) ./files/imspector.config $(1)/etc/config/imspector
77 $(INSTALL_DIR) $(1)/etc/init.d
78 $(CP) ./files/imspector.init $(1)/etc/init.d/imspector
79 $(CP) $(PKG_INSTALL_DIR)/usr/etc/$(PKG_NAME)/badwords.txt $(1)/etc/$(PKG_NAME)/
80 $(CP) $(PKG_INSTALL_DIR)/usr/etc/$(PKG_NAME)/acl.txt $(1)/etc/$(PKG_NAME)/
81 $(INSTALL_DIR) $(1)/var/log/$(PKG_NAME)
82 $(INSTALL_DIR) $(1)/var/lib/$(PKG_NAME)
83 endef
84
85 $(eval $(call BuildPackage,imspector))