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