aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2024-10-14 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2024-10-23 08:00:00 +0000
commit4aa31119988c4dcceaa9edce74121d2c057ad1f8 (patch)
tree69c7fabd96ce8ced1bb759ed20016bab17c536ea /ci
parentcd1533a5cc0b3f083054f6821ac6dec0dbf385a7 (diff)
downloadpam-4aa31119988c4dcceaa9edce74121d2c057ad1f8.tar.gz
pam-4aa31119988c4dcceaa9edce74121d2c057ad1f8.tar.bz2
pam-4aa31119988c4dcceaa9edce74121d2c057ad1f8.zip
ci: drop autotools support
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh53
-rwxr-xr-xci/install-dependencies.sh11
2 files changed, 54 insertions, 10 deletions
diff --git a/ci/build.sh b/ci/build.sh
new file mode 100755
index 00000000..c50bb7f2
--- /dev/null
+++ b/ci/build.sh
@@ -0,0 +1,53 @@
+#!/bin/sh -ex
+#
+# Copyright (c) 2018-2024 The strace developers.
+# All rights reserved.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+opts='-Doptimization=2 -Dwerror=true -Dpam_lastlog=enabled'
+
+case "${VENDORDIR-}" in
+ */*)
+ opts="$opts -Dvendordir=$VENDORDIR"
+ ;;
+esac
+
+case "${USE_OPENSSL-}" in
+ yes)
+ opts="$opts -Dopenssl=enabled"
+ ;;
+esac
+
+case "${ENABLE_DEBUG-}" in
+ yes)
+ opts="$opts -Dpam-debug=true"
+ ;;
+esac
+
+echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION'
+uname -a |head -1
+libc="$(ldd /bin/sh |sed -n 's|^[^/]*\(/[^ ]*/libc\.so[^ ]*\).*|\1|p' |head -1)"
+$libc |head -1
+$CC --version |head -1
+meson --version |head -1
+ninja --version |head -1
+kver="$(printf '%s\n%s\n' '#include <linux/version.h>' 'LINUX_VERSION_CODE' | $CC -E -P -)"
+printf 'kernel-headers %s.%s.%s\n' $((kver/65536)) $((kver/256%256)) $((kver%256))
+echo 'END OF BUILD ENVIRONMENT INFORMATION'
+
+mkdir build
+meson setup $opts build
+
+# If "meson dist" supported -v option, it could be used here
+# instead of all subsequent individual meson commands.
+
+meson compile -v -C build
+mkdir build/destdir
+DESTDIR=$(pwd)/build/destdir meson install -C build
+meson test -v -C build
+
+if git status --porcelain |grep '^?'; then
+ echo >&2 'git status reported untracked files'
+ exit 1
+fi
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 6583311b..d38aba98 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -9,7 +9,6 @@ j=-j`nproc` || j=
type sudo >/dev/null 2>&1 && sudo=sudo || sudo=
packages="
bison
-bzip2
docbook5-xml
docbook-xsl-ns
flex
@@ -20,6 +19,7 @@ libfl-dev
libselinux1-dev
libssl-dev
libxml2-utils
+meson
pkg-config
sed
w3m
@@ -47,15 +47,6 @@ apt_get_install()
install -y "$@"
}
-case "${BUILD-}" in
- meson)
- packages="$packages meson"
- ;;
- *)
- packages="$packages autoconf automake autopoint libtool make"
- ;;
-esac
-
case "$CC" in
gcc-*)
retry_if_failed \