python packaging related cleanups for rdiff-backup and rrdtool
[openwrt/svn-archive/archive.git] / utils / rdiff-backup / Makefile
1 #
2 # Copyright (C) 2006-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:=rdiff-backup
12 PKG_VERSION:=1.0.5
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://savannah.nongnu.org/download/rdiff-backup/
17 PKG_MD5SUM:=fa2a165fa07a94be52c52e3545bc7758
18
19 PKG_BUILD_DEPENDS:=python
20
21 include $(INCLUDE_DIR)/package.mk
22 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
23
24 define Package/rdiff-backup
25 SUBMENU:=Python
26 SECTION:=lang
27 CATEGORY:=Languages
28 TITLE:=Incremental backup utility
29 URL:=http://www.nongnu.org/rdiff-backup
30 DEPENDS:=python-core +librsync +libpopt
31 endef
32
33 define Package/rdiff-backup/description
34 rdiff-backup backs up one directory to another, possibly over a
35 network. The target directory ends up a copy of the source directory,
36 but extra reverse diffs are stored in a special subdirectory of that
37 target directory, so you can still recover files lost some time ago.
38 The idea is to combine the best features of a mirror and an incremental
39 backup.
40 endef
41
42 define PyPackage/rdiff-backup/filespec
43 +|/usr/bin/rdiff-backup
44 +|$(PYTHON_PKG_DIR)/rdiff_backup
45 endef
46
47 define Build/Compile
48 $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
49 $(call Build/Compile/PyMod,., \
50 build --librsync-dir="$(STAGING_DIR)/usr" , \
51 )
52 $(call Build/Compile/PyMod,., \
53 install --prefix="$(PKG_INSTALL_DIR)/usr", \
54 )
55 endef
56
57 $(eval $(call PyPackage,rdiff-backup))
58 $(eval $(call BuildPackage,rdiff-backup))