[packages] utils/boxbackup: Added boxbackup. Currently only the server is fully...
[openwrt/svn-archive/archive.git] / utils / boxbackup / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=boxbackup
11 PKG_VERSION:=0.11.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://www.boxbackup.org/trac/browser/box/packages
16 PKG_MD5SUM:=297ecb692b1ec2194c24d1dcbfb28599
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/boxbackup/Default
23 SUBMENU:=backup
24 SECTION:=utils
25 CATEGORY:=Utilities
26 URL:=http://www.boxbackup.org/
27 MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
28 endef
29
30 define Package/boxbackup
31 $(call Package/boxbackup/Default)
32 TITLE:=Secure network backup
33 MENU:=1
34 endef
35
36 define Package/bbstored
37 $(call Package/boxbackup/Default)
38 TITLE:=Server for secure network backup
39 DEPENDS:=boxbackup +libopenssl +zlib +libdb47 +libopenssl +libstdcpp +libreadline +libncurses
40 endef
41
42 define Package/bbstored/description
43 Boxbackup is an open source, completely automatic, on-line backup system.
44 This package is for the server (where the backups are stored). The
45 server is known as bbstored.
46 endef
47
48 define Package/bbstored/conffiles
49 /etc/config/bbbstored
50 endef
51
52
53 define Package/bbstored-config-external
54 $(call Package/boxbackup/Default)
55 TITLE:=Configure network backup server
56 DEPENDS:=boxbackup +openssl-util +microperl
57 endef
58
59 define Package/boxbackup-certs
60 $(call Package/boxbackup/Default)
61 TITLE:=Manage network backup security certificates
62 DEPENDS:=boxbackup +openssl-util +microperl
63 endef
64
65 define Package/bbackupd
66 $(call Package/boxbackup/Default)
67 TITLE:=Client for secure network backup
68 DEPENDS:=boxbackup +libopenssl +zlib +libdb47 +libopenssl +libreadline +libstdcpp +libncurses +openssl-util +microperl
69 endef
70
71 define Package/bbackupd/description
72 Box Backup is an open source, completely automatic, on-line backup system.
73 This package is for the client (host to be backed up).
74 endef
75
76
77 TARGET_CFLAGS += $(FPIC) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib
78
79 CONFIGURE_ARGS += \
80 --sysconfdir=/var/etc \
81 --enable-gnu-readline \
82 --with-bdb-headers=$(STAGING_DIR)/usr/include \
83 --with-bdb-lib=$(STAGING_DIR)/usr/lib \
84 --with-ssl-header=$(STAGING_DIR)/usr/include \
85 --with-ssl-lib=$(STAGING_DIR)/usr/lib \
86 --with-random=/dev/urandom \
87 --disable-static-bin
88
89 define Build/Install
90 mkdir -p $(PKG_INSTALL_DIR)
91 tar -C $(PKG_INSTALL_DIR) -xzf $(PKG_BUILD_DIR)/parcels/$(PKG_NAME)-$(PKG_VERSION)-backup-server-linux-gnu.tgz
92 tar -C $(PKG_INSTALL_DIR) -xzf $(PKG_BUILD_DIR)/parcels/$(PKG_NAME)-$(PKG_VERSION)-backup-client-linux-gnu.tgz
93 endef
94
95 BXBK_SRV_INSTALL_DIR = $(PKG_INSTALL_DIR)/$(PKG_NAME)-$(PKG_VERSION)-backup-server-linux-gnu
96 BXBK_CLIENT_INSTALL_DIR = $(PKG_INSTALL_DIR)/$(PKG_NAME)-$(PKG_VERSION)-backup-client-linux-gnu
97
98 define Package/boxbackup/install
99 true
100 endef
101
102 define Package/bbstored/install
103 $(INSTALL_DIR) $(1)/usr/sbin
104 $(INSTALL_BIN) $(BXBK_SRV_INSTALL_DIR)/bbstored $(1)/usr/sbin/
105 $(INSTALL_DIR) $(1)/usr/lib/boxbackup
106 $(INSTALL_BIN) $(BXBK_SRV_INSTALL_DIR)/bbstoreaccounts $(1)/usr/lib/boxbackup/
107 $(INSTALL_DIR) $(1)/etc/init.d
108 $(INSTALL_BIN) ./files/bbstored.init $(1)/etc/init.d/bbstored
109 $(INSTALL_DIR) $(1)/lib/functions
110 $(INSTALL_DATA) ./files/bbstored.sh $(1)/lib/functions/
111 $(INSTALL_DIR) $(1)/etc/config
112 $(INSTALL_DATA) ./files/bbstored.config $(1)/etc/config/bbstored
113 $(INSTALL_BIN) ./files/bbstoreaccounts $(1)/usr/sbin/
114 endef
115
116 define Package/bbstored-config-external/install
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(INSTALL_BIN) $(BXBK_SRV_INSTALL_DIR)/bbstored-config $(1)/usr/sbin/
119 $(INSTALL_BIN) $(BXBK_SRV_INSTALL_DIR)/raidfile-config $(1)/usr/sbin/
120 $(INSTALL_DIR) $(1)/etc/bbstored
121 endef
122
123 define Package/boxbackup-certs/install
124 $(INSTALL_DIR) $(1)/usr/sbin
125 $(INSTALL_BIN) $(BXBK_SRV_INSTALL_DIR)/bbstored-certs $(1)/usr/sbin/
126 endef
127
128 define Package/bbackupd/install
129 $(INSTALL_DIR) $(1)/usr/sbin
130 $(INSTALL_BIN) $(BXBK_CLIENT_INSTALL_DIR)/bbackupd $(1)/usr/sbin/
131 $(INSTALL_BIN) $(BXBK_CLIENT_INSTALL_DIR)/bbackupquery $(1)/usr/sbin/
132 $(INSTALL_BIN) $(BXBK_CLIENT_INSTALL_DIR)/bbackupctl $(1)/usr/sbin/
133 $(INSTALL_BIN) $(BXBK_CLIENT_INSTALL_DIR)/bbackupd-config $(1)/usr/sbin/
134 endef
135
136 $(eval $(call BuildPackage,boxbackup))
137 $(eval $(call BuildPackage,bbstored))
138 $(eval $(call BuildPackage,boxbackup-certs))
139 $(eval $(call BuildPackage,bbstored-config-external))
140 $(eval $(call BuildPackage,bbackupd))