1################################################################################
2#
3# cvs
4#
5################################################################################
6
7CVS_VERSION = 1.12.13
8CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz
9CVS_PATCH = cvs_$(CVS_VERSION)-12+squeeze1.diff.gz
10CVS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs
11CVS_LICENSE = GPL-1.0+, LGPL-2.0+, LGPL-2.1+ (glob)
12CVS_LICENSE_FILES = COPYING COPYING.LIB lib/glob-libc.h
13CVS_CPE_ID_VENDOR = gnu
14CVS_SELINUX_MODULES = apache cvs
15CVS_DEPENDENCIES = ncurses
16
17CVS_CONF_ENV = \
18	ac_cv_func_working_mktime=yes \
19	cvs_cv_func_printf_ptr=yes
20
21CVS_CONF_OPTS = \
22	--disable-old-info-format-support \
23	--with-editor=/bin/vi
24ifeq ($(BR2_PACKAGE_CVS_SERVER),y)
25CVS_CONF_OPTS += --enable-server
26else
27CVS_CONF_OPTS += --disable-server
28endif
29ifeq ($(BR2_PACKAGE_ZLIB),y)
30CVS_CONF_OPTS += --with-external-zlib
31endif
32
33define CVS_BZIP_UNPACK
34	$(BZCAT) $(@D)/cvs-$(CVS_VERSION).tar.bz2 | $(TAR) -C $(BUILD_DIR) $(TAR_OPTIONS) -
35	rm -f $(@D)/cvs-$(CVS_VERSION).tar.bz2
36endef
37
38CVS_POST_PATCH_HOOKS += CVS_BZIP_UNPACK
39
40ifneq ($(CVS_PATCH),)
41define CVS_DEBIAN_PATCHES
42	if [ -d $(@D)/debian/patches ]; then \
43		(cd $(@D)/debian/patches && for i in *; \
44		 do $(SED) 's,^\+\+\+ .*cvs-$(CVS_VERSION)/,+++ cvs-$(CVS_VERSION)/,' $$i; \
45		 done; \
46		); \
47		$(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*; \
48	fi
49endef
50endif
51
52CVS_POST_PATCH_HOOKS += CVS_DEBIAN_PATCHES
53
54define CVS_INSTALL_TARGET_CMDS
55	$(INSTALL) -D $(@D)/src/cvs $(TARGET_DIR)/usr/bin/cvs
56endef
57
58$(eval $(autotools-package))
59