dc379bcd79b78332e9c10c92f86a928269f2c9c8
[openwrt/svn-archive/archive.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: Makefile 5329 2006-10-28 22:43:08Z nico $
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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/librsync
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=librsync implements the rolling-checksum algorithm of remote file synchronization
29 DESCRIPTION:=\
30 librsync implements the rolling-checksum algorithm of remote file\\\
31 synchronization that was popularized by the rsync utility and is\\\
32 used in rproxy. This algorithm transfers the differences between 2\\\
33 files without needing both files on the same system.
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-shared \
39 --enable-static \
40 );
41 endef
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 $(STAGING_DIR)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(STAGING_DIR)/usr/include/
52 mkdir -p $(STAGING_DIR)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.{a,so*} $(STAGING_DIR)/usr/lib/
54 endef
55
56 define Build/UninstallDev
57 rm -rf \
58 $(STAGING_DIR)/usr/include/librsync{,-config}.h \
59 $(STAGING_DIR)/usr/lib/librsync.{a,so*}
60 endef
61
62 define Package/librsync/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.so.* $(1)/usr/lib/
65 endef
66
67 $(eval $(call BuildPackage,librsync))