remove PKG_CAT from packages
[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 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/librsync
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=implementation of the rolling-checksum algorithm
28 endef
29
30 define Package/librsync/description
31         librsync implements the rolling-checksum algorithm of remote file
32         synchronization that was popularized by the rsync utility and is
33         used in rproxy. This algorithm transfers the differences between 2
34         files without needing both files on the same system.
35 endef
36
37 define Build/Configure
38         $(call Build/Configure/Default, \
39                 --enable-shared \
40                 --enable-static \
41         );
42 endef
43
44 define Build/Compile
45         $(MAKE) -C $(PKG_BUILD_DIR) \
46                 DESTDIR="$(PKG_INSTALL_DIR)" \
47                 all install
48 endef
49
50 define Build/InstallDev
51         mkdir -p $(1)/usr/include
52         $(CP) $(PKG_INSTALL_DIR)/usr/include/librsync{,-config}.h $(1)/usr/include/
53         mkdir -p $(1)/usr/lib
54         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.{a,so*} $(1)/usr/lib/
55 endef
56
57 define Build/UninstallDev
58         rm -rf \
59                 $(STAGING_DIR)/usr/include/librsync{,-config}.h \
60                 $(STAGING_DIR)/usr/lib/librsync.{a,so*}
61 endef
62
63 define Package/librsync/install
64         $(INSTALL_DIR) $(1)/usr/lib
65         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librsync.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,librsync))