summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2025-12-24 14:02:37 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2025-12-24 14:02:37 -0800
commit0f5ecd39e5f2692b91674fa25204b987a1166dde (patch)
tree26a67ca38a0de6bfdfd8202ebe5bd4443c3cb3f4
parent5cb98e056cbbefd143f2dd5fd6329ad8e35c94b7 (diff)
setup script and build emacs from source
-rw-r--r--.gitmodules3
m---------emacs-source0
-rwxr-xr-xsetup.sh53
3 files changed, 56 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..f9d6815
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "emacs-source"]
+ path = emacs-source
+ url = git://git.savannah.gnu.org/emacs.git
diff --git a/emacs-source b/emacs-source
new file mode 160000
+Subproject 54ae1944e95c77be6492d69792413e507c2dfdb
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..7aa3086
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+set -e
+
+if [ ${PWD} != "/home/tmu/dotfiles" ]; then
+ echo "Not in ~/dotfiles, proceed manually"
+ exit 1
+fi
+
+git submodule update --init --recursive
+
+# handle files and symlinks
+awk -f install.awk ensureddirs.csv symlinks.csv
+
+# build various tools
+cd dwm
+./setup.sh
+cd ..
+
+cd st
+./setup.sh
+cd ..
+
+cd slstatus
+./setup.sh
+cd ..
+
+EMACSFULL="--with-x-toolkit=gtk3 --disable-build-details --with-cairo \
+ --with-harfbuzz --with-libsystemd=no --with-modules"
+
+EMACSMIN="--without-all \
+ --with-x-toolkit=no --without-xwidgets --without-x --without-ns --disable-ns-self-contained \
+ --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no \
+ --without-internationalization --without-tree-sitter --without-mailutils"
+
+EMACSALWAYS="--with-gnutls --with-file-notification=yes --with-native-compilation=yes --with-zlib=yes"
+
+if [[ "$(read -e -p 'Build minimal emacs? [y/N]> '; echo $REPLY)" == [Yy]* ]]; then
+ EMACSOPT="${EMACSMIN} ${EMACSALWAYS}"
+else
+ EMACSOPT="${EMACSFULL} ${EMACSALWAYS}"
+fi
+
+cd emacs-source
+./autogen.sh
+./configure --prefix="${HOME}/.local" \
+ ${EMACSOPT} \
+ CFLAGS='-O2 -pipe'
+make
+make install
+cd ..
+
+echo "All set up, remember to source ~/.bash_profile"