noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / devel / diffutils / Makefile
1 #
2 # Copyright (C) 2008-2015 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:=diffutils
11 PKG_VERSION:=3.3
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/diffutils
16 PKG_MD5SUM:=99180208ec2a82ce71f55b0d7389f1b3
17 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
18 PKG_LICENSE:=GPL-3.0
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/diffutils
25 SECTION:=devel
26 CATEGORY:=Development
27 DEPENDS:=+USE_GLIBC:librt
28 TITLE:=diffutils
29 URL:=http://www.gnu.org/software/diffutils/
30 endef
31
32 define Package/diffutils/description
33 The Diffutils package contains programs that show the differences between
34 files or directories.
35 endef
36
37 CONFIGURE_VARS += \
38 ac_cv_func_mempcpy=n
39 TARGET_CFLAGS += --std=gnu99
40
41 define Package/diffutils/install
42 $(INSTALL_DIR) $(1)/usr/bin
43 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
44 endef
45
46 define Package/diffutils/preinst
47 #!/bin/sh
48 for x in sdiff diff3 diff cmp; do
49 [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x"
50 done
51 exit 0
52 endef
53
54 define Package/diffutils/postrm
55 #!/bin/sh
56 for x in sdiff diff3 diff cmp; do
57 /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x
58 done
59 exit 0
60 endef
61
62 $(eval $(call BuildPackage,diffutils))