hurl/bin/release/create_deb_package.sh

47 lines
1.3 KiB
Bash
Raw Normal View History

2022-12-14 11:28:25 +03:00
#!/bin/bash
set -Eeuo pipefail
sudo rm -rf target/debian
mkdir target/debian
mkdir -p target/debian/usr/bin target/debian/DEBIAN
mkdir -p target/debian/usr/share/man/man1
mkdir -p target/debian/usr/share/doc/hurl
2022-07-30 05:49:56 +03:00
cp target/release/hurl target/release/hurlfmt target/debian/usr/bin
cp target/man/hurl.1.gz target/man/hurlfmt.1.gz target/debian/usr/share/man/man1
2021-10-07 18:19:23 +03:00
gzip -9 -n --stdout CHANGELOG.md > target/debian/usr/share/doc/hurl/changelog.Debian.gz
cat >target/debian/usr/share/doc/hurl/copyright <<END
Files: *
Copyright: 2020, Orange
License: http://www.apache.org/licenses/LICENSE-2.0
END
sudo chown -R root:root target/debian/usr
cat <<END >target/debian/DEBIAN/control
Package: hurl
Version: $VERSION
Section: web
Architecture: amd64
Priority: optional
Standards-Version: 3.9.4
Maintainer: Fabrice Reix <fabrice.reix@orange.com>
Depends: libc6 (>= 2.17), libcurl4, zlib1g, libxml2
Description: Run and test HTTP requests
Hurl is an HTTP client that performs HTTP requests defined in a simple plain
text format.
Hurl is very versatile, it enables to chain HTTP requests, capture values
from HTTP responses and make asserts.
END
dpkg --build target/debian
2021-02-20 16:17:42 +03:00
echo "Check Lintian"
2023-04-05 12:07:50 +03:00
sudo apt-get install -y lintian
2021-02-20 16:17:42 +03:00
lintian --verbose target/debian.deb
mkdir -p target/upload
cp target/debian.deb "target/upload/hurl_${VERSION}_amd64.deb"
2020-09-11 11:52:53 +03:00