blob: cddd1a03ab0f8ed030a709a2df380c30e1bc2d04 (
plain) (
blame)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
#|/usr/bin/cygport
# bash-completion.cygport - bash-completion Cygwin package build control script definitions
NAME=bash-completion
VERSION=2.17.0
RELEASE=1
CATEGORY="Shells"
SUMMARY="Command options and arguments auto-completion under the Bash shell"
DESCRIPTION="bash-completion provides auto-completion for options of and
arguments to hundreds of commands; and a collection of shell functions
to develop those using the bash programmable completion commands."
SITE=https://github.com/scop
HOMEPAGE=$SITE/$NAME
SRC_URI=$SITE/$NAME/releases/download/$VERSION/$NAME-$VERSION.tar.xz
SRC_URI+=" ${SRC_URI%/*}/sha256sums.txt#/$NAME-$VERSION.sha256sum"
SRC_URI+=" ChangeLog.sed" # -- CHANGELOG.md > ChangeLog
GIT_URI=$HOMEPAGE
PATCH_URI=
DOCS="AUTHORS COPYING ChangeLog CHANGELOG.md README.md"
ARCH=noarch
BUILD_REQUIRES="automake dejagnu make screen" # tcllib used under Fedora
PKG_NAMES="$NAME-devel $NAME"
bash_completion_devel_SUMMARY="$SUMMARY (development)"
bash_completion_devel_REQUIRES="$NAME"
bash_completion_devel_CONTENTS="
usr/share/cmake/$NAME
usr/share/pkgconfig/$NAME.pc
"
bash_completion_REQUIRES="bash"
bash_completion_CONTENTS="
etc/
usr/share/$NAME
usr/share/doc/$NAME
"
DIFF_EXCLUDES="ChangeLog"
__sum_verify() {
local _file=${1#${DISTDIR}/};
local _filedesc=${2};
local _filetype=${3};
local _sum=${3%sum};
if ! check_prog cksum
then
# display notice only once
if ! defined _cksum_not_found_
then
inform "cksum must be installed in order to check checksums.";
_cksum_not_found_=1
fi
return 0;
fi
# {b2,b2b}{,sum} -> blake2b; ck{,sum} -> crc; {,sum} -> bsd
[ -z "${_sum}" ] && _sum=${_sum:-bsd}
[ "b2" = "${_sum}" ] && _sum=blake2b
[ "b2b" = "${_sum}" ] && _sum=blake2b
[ "ck" = "${_sum}" ] && _sum=crc
if defined DISTDIR && [ -d ${DISTDIR} ] && [ -f ${DISTDIR}/${_file} ]
then
cd ${DISTDIR}
inform "${_filedesc} ${_filetype} checksum verification follows:";
if [ "${_sum}" = "crc" ] || [ "${_sum}" = "bsd" ] || [ "${_sum}" = "sysv" ]
then
cksum -a ${_sum} ${_file%.${_filetype}} || true;
else
cksum -a ${_sum} -c ${_file} || true;
fi
fi
}
CYGPORT_USE_UNSTABLE_API=1
# validate tarball checksum in file
src_unpack_hook() {
local src_pkg sigext n=0;
local sum_exts="sha512 sha384 sha256 sha224 b2 b2b blake2b sm3 sha1 md5 ck crc bsd sysv";
# prefer newer stronger keys for faster lookup
# blake2b bsd crc md5 sha1 sha224 sha256 sha384 sha512 sm3 sysv
# {b2,b2b}{,sum} -> blake2b; ck{,sum} -> crc; {,sum} -> bsd
for src_pkg in ${_src_orig_pkgs}
do
for sigext in ${sum_exts} '' # final entry is BSD .sum -> ''
do
if [ "${src_pkg}" != "${src_pkg%.${sigext}sum}" ]
then
__sum_verify ${src_pkg} "SOURCE $((n++))" "${sigext}sum";
break;
elif [ "${src_pkg}" != "${src_pkg%.${sigext}}" ] # fail if '' unless *.
then
__sum_verify ${src_pkg} "SOURCE $((n++))" "${sigext}";
break;
fi
done
n=$((++n))
done
if [ -x $OLDPWD/ChangeLog.sed ] && [ -s $OLDPWD/CHANGELOG.md ]
then
inform "Generating ChangeLog";
$OLDPWD/ChangeLog.sed $OLDPWD/CHANGELOG.md > $OLDPWD/ChangeLog
fi
}
src_test() {
cd $B
# cygtest
# For some tests involving non-ASCII filenames: borrowed from Fedora
export LANG=C.UTF-8
export -f cygtest # run in subshell
# Tests need a terminal so run under screen: borrowed from dejagnu
tmpfile=$(mktemp bash-completion.screen.XXXXXXXXXX.tmp)
screen -D -m bash -c '( cygtest ; echo $? ) >'$tmpfile
# cat $tmpfile
# test result value is in last line of tmp file
result=$(tail -n 1 $tmpfile)
rm -f $tmpfile
return $result
}
LICENSE=GPL-2.0-or-later
# SPDX-License-Identifier: GPL-2.0-or-later
LICENSE_SPDX="SPDX-License-Identifier: $LICENSE"
LICENSE_URI=COPYING
CYGWIN_MAINTAINER=Eric%20Blake
CYGWIN_MAINTAINER_EMAIL=eblake@redhat.com
CYGWIN_CO_MAINTAINER=Brian%20Inglis
CYGWIN_CO_MAINTAINER_EMAIL=Brian.Inglis@SystematicSW.ab.ca
UPSTREAM_MAINTAINER=Scop%2FVille%20Skyttä
UPSTREAM_MAINTAINER_EMAIL=ville.skytta@IKI.fi
SUBJECT=${OSTYPE^}%20Package%20$NAME%20$VERSION
MAILTO=mailto:$UPSTREAM_MAINTAINER%20%3C$UPSTREAM_MAINTAINER_EMAIL%3E\
?from=$CYGWIN_MAINTAINER%20%3C$CYGWIN_MAINTAINER_EMAIL%3E\
\&cc=$CYGWIN_CO_MAINTAINER%20%3C$CYGWIN_CO_MAINTAINER_EMAIL%3E\
\&subject=$SUBJECT\&body=Hi%20$UPSTREAM_MAINTAINER,%20$SUBJECT
|