[package] add 4GB file handling patch to librsync (#5642)
[packages.git] / libs / librsync / Makefile
1
2 # Copyright (C) 2006-2009 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:=librsync
11 PKG_VERSION:=0.9.7
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/librsync
16 PKG_MD5SUM:=24cdb6b78f45e0e83766903fd4f6bc84
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/librsync
21   SECTION:=libs
22   CATEGORY:=Libraries
23   TITLE:=implementation of the rolling-checksum algorithm
24   URL:=http://librsync.sourceforge.net/
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 TARGET_CFLAGS += $(FPIC)
42
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR) \
45                 DESTDIR="$(PKG_INSTALL_DIR)" \
46                 all install
47 endef
48
49 define Build/InstallDev
50         mkdir -p $(1)/usr/include
51         $(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(1)/usr/include/
52         mkdir -p $(1)/usr/lib
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.{a,so*} $(1)/usr/lib/
54 endef
55
56 define Package/librsync/install
57         $(INSTALL_DIR) $(1)/usr/lib
58         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.so.* $(1)/usr/lib/
59 endef
60
61 $(eval $(call BuildPackage,librsync))