Last active
April 9, 2020 14:41
-
-
Save tsjk/663b7819bf058dc2a98197b30260b07d to your computer and use it in GitHub Desktop.
Static compilation of DH1080_tcl.so on Gentoo (given net-irc/irssi-mod-fish/irssi-mod-fish-9999.ebuild in /usr/local/portage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[[ -d "/usr/local/portage/net-irc/irssi-mod-fish" ]] && DH1080_TCL_REPO=$(mktemp -d) && \ | |
( cd /usr/local/portage/net-irc/irssi-mod-fish && sudo ebuild irssi-mod-fish-9999.ebuild clean compile ) && \ | |
( sudo chown -R "$(id -nu)": "/tmp/portage/net-irc/irssi-mod-fish-9999" ) && \ | |
( cd "${DH1080_TCL_REPO}" && git clone "https://github.com/orkim/dh1080_tcl.git" ) && \ | |
( cd "/tmp/portage/net-irc/irssi-mod-fish-9999/work/irssi-mod-fish-9999/src" && \ | |
cp -av "${DH1080_TCL_REPO}/dh1080_tcl"/* ./ && rm -rf "${DH1080_TCL_REPO}" && \ | |
sed -i -E 's@^TCLINC=.*@TCLINC=\/usr\/include@' make_linux* && \ | |
./make_linux64.sh && cp -av DH1080.so DH1080_tcl.so ~/ ) && \ | |
( cd /usr/local/portage/net-irc/irssi-mod-fish && sudo ebuild irssi-mod-fish-9999.ebuild clean ) && \ | |
unset DH1080_TCL_REPO | |
# Or dynamically on Arch Linux ARM for Raspberry Pi 1 | |
[[ -s "/etc/makepkg.conf" ]] && BUILDDIR=$(grep -oP '(?<=^BUILDDIR=).*' /etc/makepkg.conf) && \ | |
[[ -n "${BUILDDIR}" && -d "${BUILDDIR}" && -d "/tmp" ]] && \ | |
( cd /tmp && wget -qO- "https://aur.archlinux.org/cgit/aur.git/snapshot/fish-irssi-git.tar.gz" | bsdtar xvf - && \ | |
( cd fish-irssi-git && mkpkg -As ) ) && \ | |
DH1080_TCL_REPO=$(mktemp -d) && ( cd "${DH1080_TCL_REPO}" && git clone "https://github.com/orkim/dh1080_tcl.git" ) && | |
( cd "${BUILDDIR}/fish-irssi-git/src/fish-irssi-git/src" && cp -av "${DH1080_TCL_REPO}/dh1080_tcl"/* ./ && \ | |
rm -rf "${DH1080_TCL_REPO}" && \ | |
sed -i -E 's@^TCLINC=.*@TCLINC=\/usr\/include@' make_linux* && sed -i -E 's@\ -static@@' make_linux* && \ | |
./make_linux64.sh && cp -av DH1080.so DH1080_tcl.so ~/ && rm -rf "${BUILDDIR}/fish-irssi-git" /tmp/fish-irssi-git ) && \ | |
unset DH1080_TCL_REPO BUILDDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment