Last active
March 2, 2021 02:06
-
-
Save qiuchengxuan/00d0b1ac3ab7dda6e97cad5700c6b52c to your computer and use it in GitHub Desktop.
build latest emacs into rpm package
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
Name: emacs25 | |
Version: 25.3 | |
Release: 1%{?dist} | |
Summary: GNU Emacs | |
#Group: | |
License: GPL | |
URL: http://www.gnu.org/software/emacs/ | |
Source0: http://mirrors.ustc.edu.cn/gnu/emacs/emacs-%{version}.tar.gz | |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
BuildRequires: ncurses-devel | |
#Requires: | |
Obsoletes: emacs | |
%description | |
Latest GNU Emacs | |
%prep | |
[ -f %{SOURCE0} ] || curl -L http://mirrors.ustc.edu.cn/gnu/emacs/emacs-%{version}.tar.gz -o %{SOURCE0} | |
tar xzf %{SOURCE0} --strip-components=1 | |
%build | |
%configure --without-x | |
make %{?_smp_mflags} | |
%install | |
rm -rf $RPM_BUILD_ROOT | |
make install DESTDIR=$RPM_BUILD_ROOT | |
find %{buildroot} -name ctags* -exec rm -f {} \; | |
rm -f %{buildroot}%{_infodir}/dir | |
mv %{buildroot}%{_infodir}/{info.info.gz,info.gz} | |
%clean | |
# rm -rf $RPM_BUILD_ROOT | |
%files | |
%defattr(-,root,root,-) | |
%doc | |
%{_bindir}/* | |
%{_mandir}/*/* | |
%{_infodir}/* | |
/usr/libexec/emacs | |
/usr/share/appdata/emacs.appdata.xml | |
/usr/share/applications/emacs.desktop | |
/usr/share/emacs | |
/usr/share/icons/hicolor/*/apps/* | |
/usr/share/icons/hicolor/scalable/mimetypes/emacs-document*.svg | |
/var/games/emacs | |
%changelog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment