#!/bin/sh1#***************************************************************************2# _ _ ____ _3# Project ___| | | | _ \| |4# / __| | | | |_) | |5# | (__| |_| | _ <| |___6# \___|\___/|_| \_\_____|7#8# Copyright (C) Daniel Stenberg, <[email protected]>, et al.9#10# This software is licensed as described in the file COPYING, which11# you should have received as part of this distribution. The terms12# are also available at https://curl.se/docs/copyright.html.13#14# You may opt to use, copy, modify, merge, publish, distribute and/or sell15# copies of the Software, and permit persons to whom the Software is16# furnished to do so, under the terms of the COPYING file.17#18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY19# KIND, either express or implied.20#21# SPDX-License-Identifier: curl22#23###########################################################################2425set -eu2627# this should ideally be passed in28timestamp=${1:-unknown}29version=${2:-unknown}30tag=$(echo "curl-$version" | tr '.' '_')31commit=${3}32if [ -n "$commit" ] && [ -r "docs/tarball-commit.txt.dist" ]; then33# If commit is given, then the tag likely doesn't actually exist34tag="$(cat docs/tarball-commit.txt.dist)"35fi3637cat <<MOO38# Release tools used for curl $version3940The following tools and their Debian package version numbers were used to41produce this release tarball.4243MOO4445if ! command -v dpkg >/dev/null; then46echo "Error: could not find dpkg" >&247exit 148fi4950debian() {51echo "- $1: $(dpkg -l "$1" | grep ^ii | awk '{print $3}')"52}53debian autoconf54debian automake55debian libtool56debian make57debian perl58debian git5960cat <<MOO6162# Reproduce the tarball6364- Clone the repo and checkout the tag/commit: $tag65- Install the same set of tools + versions as listed above6667## Do a standard build6869- autoreconf -fi70- ./configure [...]71- make7273## Generate the tarball with the same timestamp7475- export SOURCE_DATE_EPOCH=$timestamp76- ./scripts/maketgz [version]7778MOO798081