Last active
April 1, 2024 13:15
-
-
Save harrifeng/a3ebd9a2af4c65cacfd4 to your computer and use it in GitHub Desktop.
Compile emacs on redhat and centos
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
yum -y groupinstall "Development Tools" | |
yum -y install gtk+-devel gtk2-devel | |
yum -y install libXpm-devel | |
yum -y install libpng-devel | |
yum -y install giflib-devel | |
yum -y install libtiff-devel libjpeg-devel | |
yum -y install ncurses-devel | |
yum -y install gpm-devel dbus-devel dbus-glib-devel dbus-python | |
yum -y install GConf2-devel pkgconfig | |
yum -y install libXft-devel | |
wget https://ftp.gnu.org/pub/gnu/emacs/emacs-25.1.tar.xz | |
tar xvJf emacs-25.1.tar.xz | |
cd emacs-25.1 | |
./configure | |
make | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For advanced users:
create:
/etc/rpm/macros.set-build-flags
based on:
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/20#request_diff
(don't include the deprecated macros)
yum install yum-utils rpmdevtools rpm-build
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs-spellchecker.patch
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs-system-crypto-policies.patch
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/dotemacs.el
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs.appdata.xml
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs.desktop
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs.service
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs-terminal.desktop
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/emacs-terminal.sh
wget https://src.fedoraproject.org/rpms/emacs/raw/f6258eb59adcb47e0e93ff0c22ee571b623b1b7a/f/site-start.el
cd ~/rpmbuild/SPECS/
wget https://download.copr.fedorainfracloud.org/results/mcsontos/emacs-27/epel-7-x86_64/01832730-emacs/emacs.spec
Somehow deal with %{gpgverify} macro, you decide. Left as exercise for the reader.
Somehow deal with Source2: gpgkey-D405AA2C862C54F17EEE6BE0E8BCD7866AFCF978.gpg
sudo yum-builddep emacs.spec
rpmbuild --undefine=_disable_source_fetch -ba emacs.spec
cd ../RPMS/
find *
noarch
noarch/emacs-terminal-27.1-1.el7.noarch.rpm
noarch/emacs-filesystem-27.1-1.el7.noarch.rpm
x86_64
x86_64/emacs-27.1-1.el7.x86_64.rpm
x86_64/emacs-nox-27.1-1.el7.x86_64.rpm
x86_64/emacs-common-27.1-1.el7.x86_64.rpm
x86_64/emacs-devel-27.1-1.el7.x86_64.rpm
x86_64/emacs-debuginfo-27.1-1.el7.x86_64.rpm
sudo yum install x86_64/emacs-nox-27.1-1.el7.x86_64.rpm x86_64/emacs-common-27.1-1.el7.x86_64.rpm noarch/emacs-filesystem-27.1-1.el7.noarch.rpm