diff options
author | Taj Morton <tajmorton@gmail.com> | 2022-11-27 17:49:01 -0800 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-03 22:12:13 +0000 |
commit | 14baf35441681263363d1b713d955f7f8cc6d05f (patch) | |
tree | 0151506432afd17686565185134ca90b28b31179 /Ports/alpine/package.sh | |
parent | 69f41eb062bf2c3ca4495201915a3b660ea73df5 (diff) | |
download | serenity-14baf35441681263363d1b713d955f7f8cc6d05f.zip |
Ports/alpine: Add patches to build Alpine on Serenity
Diffstat (limited to 'Ports/alpine/package.sh')
-rwxr-xr-x | Ports/alpine/package.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Ports/alpine/package.sh b/Ports/alpine/package.sh new file mode 100755 index 0000000000..ffa0d03280 --- /dev/null +++ b/Ports/alpine/package.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env -S bash ../.port_include.sh +port='alpine' +version='2.26' +useconfigure='true' +configopts=( + '--disable-static' + '--enable-shared' +) +use_fresh_config_sub='true' +use_fresh_config_guess='true' +files="https://alpineapp.email/alpine/release/src/alpine-2.26.tar.xz alpine-${version}.tar.xz c0779c2be6c47d30554854a3e14ef5e36539502b331068851329275898a9baba" +auth_type='sha256' +depends=( + 'openssl' + 'ncurses' + 'ca-certificates' +) +launcher_name='Alpine' +launcher_category='Internet' +launcher_command='/usr/local/bin/alpine' +launcher_run_in_terminal='true' +icon_file='web/cgi/favicon.ico' + +pre_configure() { + # Rebuild after patching configure.ac to support serenity host. + + # `automake` may exit with a warning about how there is a mismatch + # between the versions of autoconf and automake that were previously + # used to generate aclocal and specifed in configure.ac. + # We just need `automake` to generate `./compile` (so that we can run + # autoreconf to regenerate everything). + run automake --add-missing || true + run autoreconf +} + +configure() { + run ./"$configscript" \ + "${configopts[@]}" \ + --host="${SERENITY_ARCH}-pc-serenity" \ + --build="$($workdir/config.guess)" \ + --with-ssl-lib-dir="${SERENITY_INSTALL_ROOT}/usr/local/lib" \ + --with-include-path="${SERENITY_INSTALL_ROOT}/usr/local/include:${SERENITY_INSTALL_ROOT}/usr/local/include/openssl" \ + --with-system-pinerc='/etc/pine.conf' \ + --with-system-fixed-pinerc='/etc/pine.conf.fixed' +} + +install() { + run make DESTDIR="$DESTDIR" "${installopts[@]}" install + # Install system configuration file that tells Alpine where to find CA certificates + # installed from the `ca-certificates` package. + # (The full `/usr/bin/install` path is used because `install()` is a function within this script.) + run /usr/bin/install \ + --mode=644 \ + --no-target-directory \ + -D \ + pine-system.serenity.conf "${SERENITY_INSTALL_ROOT}/etc/pine.conf" +} + +post_install() { + echo "==== Post Installation Instructions ====" + echo "To save account passwords, create an empty file named .alpine.pwd" + echo "in your home diretory:" + echo " touch ~/.alpine.pwd" +} |