summaryrefslogtreecommitdiffstats
path: root/package/bsdiff/bsdiff.mk
blob: 276c6be1a39d71352ad00084f3c731dd95913359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#############################################################
#
# bsdiff
#
#############################################################
BSDIFF_VERSION = 4.3
BSDIFF_SOURCE = bsdiff-$(BSDIFF_VERSION).tar.gz
BSDIFF_SITE = http://www.daemonology.net/bsdiff
BSDIFF_DEPENDENCIES = bzip2

define BSDIFF_BUILD_CMDS
	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \
		$(@D)/bsdiff.c -o $(@D)/bsdiff
	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -lbz2 \
		$(@D)/bspatch.c -o $(@D)/bspatch
endef

define BSDIFF_INSTALL_TARGET_CMDS
	install -D -m 755 $(@D)/bsdiff $(TARGET_DIR)/usr/bin/bsdiff
	install -D -m 755 $(@D)/bspatch $(TARGET_DIR)/usr/bin/bspatch
endef

define BSDIFF_UNINSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/usr/bin/bsdiff $(TARGET_DIR)/usr/bin/bspatch
endef

define BSDIFF_CLEAN_CMDS
	rm -f $(@D)/bsdiff $(@D)/bspatch
endef

$(eval $(call GENTARGETS,package,bsdiff))