generated from gnu-ci-templates/ci-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-tarball.sh
executable file
·62 lines (49 loc) · 2.21 KB
/
build-tarball.sh
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
#!/bin/sh
# Copyright (C) 2024 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# This script builds the package.
# Usage: build-tarball.sh PACKAGE
# Its output is three tarballs:
# - libbacktrace.tar.gz
# - testdir-all.tar.gz
# - testdir-all-for-mingw.tar.gz
package="$1"
set -e
# Fetch prerequisite sources (uses package 'git').
git clone --depth 1 https://github.com/ianlancetaylor/libbacktrace.git
tar cfz libbacktrace.tar.gz libbacktrace
# Fetch sources (uses package 'git').
git clone --depth 1 https://git.savannah.gnu.org/git/"$package".git
# Apply patches.
#(cd "$package" && patch -p1 < ../patches/...)
cd "$package"
# List of modules to avoid.
avoids=
# This test exhibits spurious failures on FreeBSD, NetBSD, OpenBSD, mingw.
avoids="$avoids nonblocking-socket-tests"
# This test exhibits spurious failures on MSVC.
avoids="$avoids nonblocking-pipe-tests"
# This test always fails on 32-bit Cygwin.
avoids="$avoids year2038-tests"
avoids_for_mingw="$avoids"
# This test exhibits spurious failures on mingw and MSVC.
avoids_for_mingw="$avoids_for_mingw asyncsafe-spin-tests"
rm -rf ../testdir-all
./gnulib-tool --create-testdir --dir=../testdir-all --with-c++-tests --without-privileged-tests --single-configure `./all-modules` `for m in $avoids; do echo " --avoid=$m"; done`
rm -rf ../testdir-all-for-mingw
./gnulib-tool --create-testdir --dir=../testdir-all-for-mingw --without-c++-tests --without-privileged-tests --single-configure `./all-modules --for-msvc` `for m in $avoids_for_mingw; do echo " --avoid=$m"; done`
cd ..
tar cfz testdir-all.tar.gz testdir-all
tar cfz testdir-all-for-mingw.tar.gz testdir-all-for-mingw