5fe3c7211f4a426773e8906b32b854b8872fd289
[packages.git] / libs / librsync / Makefile
1
2 # Copyright (C) 2006 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:=librsync
12 PKG_VERSION:=0.9.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/librsync
17 PKG_MD5SUM:=24cdb6b78f45e0e83766903fd4f6bc84
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/librsync
22   SECTION:=libs
23   CATEGORY:=Libraries
24   TITLE:=implementation of the rolling-checksum algorithm
25 endef
26
27 define Package/librsync/description
28         librsync implements the rolling-checksum algorithm of remote file
29         synchronization that was popularized by the rsync utility and is
30         used in rproxy. This algorithm transfers the differences between 2
31         files without needing both files on the same system.
32 endef
33
34 define Build/Configure
35         $(call Build/Configure/Default, \
36                 --enable-shared \
37                 --enable-static \
38         );
39 endef
40
41 define Build/Compile
42         $(MAKE) -C $(PKG_BUILD_DIR) \
43                 DESTDIR="$(PKG_INSTALL_DIR)" \
44                 all install
45 endef
46
47 define Build/InstallDev
48         mkdir -p $(1)/usr/include
49         $(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(1)/usr/include/
50         mkdir -p $(1)/usr/lib
51         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.{a,so*} $(1)/usr/lib/
52 endef
53
54 define Package/librsync/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,librsync))