• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2#***************************************************************************
3#                                  _   _ ____  _
4#  Project                     ___| | | |  _ \| |
5#                             / __| | | | |_) | |
6#                            | (__| |_| |  _ <| |___
7#                             \___|\___/|_| \_\_____|
8#
9# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
10#
11# This software is licensed as described in the file COPYING, which
12# you should have received as part of this distribution. The terms
13# are also available at https://curl.se/docs/copyright.html.
14#
15# You may opt to use, copy, modify, merge, publish, distribute and/or sell
16# copies of the Software, and permit persons to whom the Software is
17# furnished to do so, under the terms of the COPYING file.
18#
19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20# KIND, either express or implied.
21#
22# SPDX-License-Identifier: curl
23#
24###########################################################################
25
26set -eu
27
28# this should ideally be passed in
29timestamp=${1:-unknown}
30version=${2:-unknown}
31tag=$(echo "curl-$version" | tr '.' '_')
32
33cat <<MOO
34# Release tools used for curl $version
35
36The following tools and their Debian package version numbers were used to
37produce this release tarball.
38
39MOO
40
41exists=$(command -v dpkg 2>/dev/null)
42if test ! -e "$exists"; then
43  echo "(unknown, could not find dpkg)"
44  exit
45fi
46
47debian() {
48  echo "- $1: $(dpkg -l "$1" | grep ^ii | awk '{print $3}')"
49}
50debian autoconf
51debian automake
52debian libtool
53debian make
54debian perl
55debian git
56
57cat <<MOO
58
59# Reproduce the tarball
60
61- Clone the repo and checkout the tag: $tag
62- Install the same set of tools + versions as listed above
63
64## Do a standard build
65
66- autoreconf -fi
67- ./configure [...]
68- make
69
70## Generate the tarball with the same timestamp
71
72- export SOURCE_DATE_EPOCH=$timestamp
73- ./maketgz [version]
74
75MOO
76