# Tests by default. No tests: rpm -ba --define 'dotests 0' emacs*.spec %{!?dotests: %define dotests 1} Summary: The libraries needed to run the GNU Emacs text editor. Name: emacs Version: 26.3 Release: 1 License: GPL Group: Applications/Editors %define PACKAGE_VERSION %{version} Source0: ftp://ftp.gnu.org/pub/gnu/emacs-%{version}.tar.xz Source1: ftp://ftp.gnu.org/pub/gnu/leim-21.4.tar.gz Patch0: emacs-26.1-info.info.patch Patch1: emacs-26.3-iconv.patch URL: http://www.gnu.org/software/emacs Prereq: /sbin/install-info %description Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs contains special code editing features, a scripting language (elisp), and the capability to read mail, news and more without leaving the editor. This package includes the libraries you need to run the Emacs editor, so you need to install this package if you intend to use Emacs. You also need to install the actual Emacs program package (emacs-nox or emacs-X11). Install emacs-nox if you are not going to use the X Window System; install emacs-X11 if you will be using X. %package el Summary: The sources for elisp programs included with Emacs. Group: Applications/Editors Requires: emacs %description el Emacs-el contains the emacs-elisp sources for many of the elisp programs included with the main Emacs text editor package. You need to install emacs-el only if you intend to modify any of the Emacs packages or see some elisp examples. %package leim Summary: Emacs Lisp code for input methods for international characters. Group: Applications/Editors Requires: emacs %description leim The emacs-leim package contains Emacs Lisp code for input methods for various international character scripts. Basically, the Lisp code provided by this package describes the consecutive keystrokes that a user must press in order to input a particular character in a non-English character set. Input methods for many different language's character sets are included in this package. %package nox Summary: The Emacs text editor without support for the X Window System. Group: Applications/Editors Requires: emacs = %{version}-%{release} Requires: dbus >= 1.11.12-1 Requires: glib2 >= 2.56.1-2 Requires: ncurses >= 6.1 Requires: libxml2 >= 2.9.5 Requires: zlib >= 1.2.11 Requires: libjpeg >= 9c %description nox Emacs-nox is the Emacs text editor program without support for the X Window System. You need to install this package only if you plan on exclusively using Emacs without the X Window System (emacs-X11 will work both in X and out of X, but emacs-nox will only work outside of X). You'll also need to install the emacs package in order to run Emacs. %package X11 Summary: The Emacs text editor for the X Window System. Group: Applications/Editors Requires: emacs = %{version}-%{release} Requires: dbus >= 1.11.12-1 Requires: glib2 >= 2.56.1-2 Requires: ncurses >= 6.1 Requires: libxml2 >= 2.9.5 Requires: zlib >= 1.2.11 Requires: libjpeg >= 9c Requires: libtiff >= 4.1.0 %description X11 Emacs-X11 includes the Emacs text editor program for use with the X Window System (it provides support for the mouse and other GUI elements). Emacs-X11 will also run Emacs outside of X, but it has a larger memory footprint than the 'non-X' Emacs package (emacs-nox). Install emacs-X11 if you're going to use Emacs with the X Window System. You should also install emacs-X11 if you're going to run Emacs both with and without X (it will work fine both ways). You'll also need to install the emacs package in order to run Emacs. %prep %setup -q -b 1 %patch0 -p1 # See cp info/info.info below %build export CFLAGS="$RPM_OPT_FLAGS -O2 -D_LARGE_FILES -maix32" #LIBXML2_LIBS is exported to hardcode /opt/freeware/lib/libxml2.a in the library search path. #This is needed because base AIX has its own /usr/lib/libxml2.a which conflicts #with /opt/freeware/lib/libxml2.a if AIX users export /usr/lib first in their LIBPATH. export LIBXML2_LIBS="/opt/freeware/lib/libxml2.a" CONFOPTS="--prefix=%{_prefix} --info=%{_infodir} --libexecdir=%{_prefix}/lib --sharedstatedir=/var --with-pop" export RM="/usr/bin/rm -f" export CC="gcc" export CXX="g++" export CONFIG_SHELL=/usr/bin/sh export CONFIG_ENV_ARGS=/usr/bin/sh export M4=/opt/freeware/bin/m4 export AR="/usr/bin/ar -X32_64" export PATH="/usr/bin:/opt/freeware/bin:$PATH" PUREDEF="-DNCURSES_OSPEED_T" XPUREDEF="-DNCURSES_OSPEED_T" cp info/info.info info/emacs.info.info # This is a work-around for an issue with libtoolize (seen on AIX 6.1 on 2016/02) echo "libtoolize version 2.4.3 removes emacs-%{version}/build-aux/snippet/*" echo "libtoolize version 2.4.6 removes emacs-%{version}/build-aux/depcomp and more" # ls -l /opt/freeware/src/packages/BUILD/emacs-%{version}/build-aux/snippet/c++defs.h # ls -l /opt/freeware/src/packages/BUILD/emacs-%{version}/build-aux/depcomp #libtoolize --force --copy --verbose --debug libtoolize --force --copy # ls -l /opt/freeware/src/packages/BUILD/emacs-%{version}/build-aux/snippet/c++defs.h # ls -l /opt/freeware/src/packages/BUILD/emacs-%{version}/build-aux/depcomp cd .. #/opt/freeware/bin/tar zxf /home/reshma/rpmbuild/SOURCES/emacs-%{version}.tar.gz emacs-%{version}/build-aux/snippet/* #/opt/freeware/bin/tar zxf /home/reshma/rpmbuild/SOURCES/emacs-%{version}.tar.gz emacs-%{version}/build-aux/depcomp #ls -l /home/reshma/rpmbuild/BUILD/emacs-%{version}/build-aux/snippet/c++defs.h #ls -l /home/reshma/rpmbuild/BUILD/emacs-%{version}/build-aux/depcomp cd - /opt/freeware/bin/patch -p0 < %{PATCH1} #Build binary with X support [ -d build-withx ] && rm -rf build-withx mkdir build-withx && cd build-withx CPPFLAGS=" -I/opt/freeware/include -I/usr/include" \ LDFLAGS="-L/opt/freeware/lib -L/usr/lib -s -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib" \ CFLAGS="$RPM_OPT_FLAGS -O2 -maix32 -D_LARGE_FILES -I/opt/freeware/include -I/usr/include" \ ../configure ${CONFOPTS} --with-x-toolkit=lucid --with-gif=no --without-png --with-gnutls=no gmake # xlc (v12 & v13) refuses this: # ../../lwlib/../src/lisp.h", line 1254.18: 1506-046 (S) Syntax error # enum { ALIGNOF_STRUCT_LISP_VECTOR = alignof (union { struct vectorlike_header a; Lisp_Object b; }) }; # though gcc accepts it... # configure: checking for gio-2.0 >= 2.26... yes CFLAGS='-qthreaded .... # gcc: error: unrecognized command line option '-qthreaded' # Compilation continues when -qthreaded removed (by hand...) # GSETTINGS_CFLAGS='-qthreaded -D_THREAD_SAFE # GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5 # configure : line 12146 # /opt/freeware/bin/pkg-config --cflags 'gio-2.0 >= 2.26' ====> # -qthreaded -D_THREAD_SAFE -I/opt/freeware/include/glib-2.0 -I/opt/freeware/lib/glib-2.0/include # grep qthread /opt/freeware/lib/pkgconfig/*.pc # -qthreaded comes from: /opt/freeware/lib/pkgconfig/gmodule-no-export-2.0.pc # Unknown keyword 'Libs.private' in '/opt/freeware/lib/pkgconfig/gmodule-no-export-2.0.pc' # line>Cflags: -qthreaded -D_THREAD_SAFE cd .. %define recompile build-withx/src/emacs -batch --no-init-file --no-site-file -f batch-byte-compile #Build binary without X support [ -d build-nox ] && rm -rf build-nox mkdir build-nox && cd build-nox CFLAGS="$RPM_OPT_FLAGS -O2 -D_LARGE_FILES -maix32" LDFLAGS="-L/opt/freeware/lib -L/usr/lib -s -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib" \ ../configure ${CONFOPTS} --with-x=no --with-gnutls=no gmake cd .. # recompile patched .el files #%{recompile} lisp/mail/mh-utils.el if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install export RM="/usr/bin/rm -f" echo "RPM_BUILD_ROOT: $RPM_BUILD_ROOT" echo "RPM_BUILD_ROOT%{_prefix}: $RPM_BUILD_ROOT%{_prefix}" rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_prefix} gmake install -C build-withx \ prefix=$RPM_BUILD_ROOT%{_prefix} \ infodir=${RPM_BUILD_ROOT}%{_prefix}/info \ mandir=${RPM_BUILD_ROOT}%{_prefix}/man \ libexecdir=$RPM_BUILD_ROOT%{_prefix}/lib \ sharedstatedir=$RPM_BUILD_ROOT/var rm -f $RPM_BUILD_ROOT%{_prefix}/info/dir # NO !! generates .gz.gz files !!! gzip -9nf $RPM_BUILD_ROOT%{_prefix}/info/* install -m755 build-nox/src/emacs $RPM_BUILD_ROOT%{_prefix}/bin/emacs-nox mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacs/site-lisp mv $RPM_BUILD_ROOT%{_prefix}/man/man1/ctags.1.gz $RPM_BUILD_ROOT%{_prefix}/man/man1/gctags.1.gz mv $RPM_BUILD_ROOT%{_prefix}/bin/ctags $RPM_BUILD_ROOT%{_prefix}/bin/gctags install -m644 build-nox/etc/DOC* $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{version}/etc # # create file lists # find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp \ -name '*.elc' -print | sed "s^$RPM_BUILD_ROOT^^" > core-filelist find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp \ -type d -printf "%%%%dir %%p\n" | sed "s^$RPM_BUILD_ROOT^^" >> core-filelist find $RPM_BUILD_ROOT%{_prefix}/lib/emacs/%{PACKAGE_VERSION} -type f | \ sed "s^$RPM_BUILD_ROOT^^" | grep -v movemail >> core-filelist # Include .el files which lack a corresponding byte compiled form for I in `find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp \ -name '*.el'`; do if [ ! -e `dirname $I`/`basename $I .el`.elc ]; then echo $I | sed "s^$RPM_BUILD_ROOT^^" fi done >> core-filelist # Include all non elisp files which emacs installs find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp -type f | \ sed "s^$RPM_BUILD_ROOT^^" | grep -v "\.el\(c\)\?$" >> core-filelist # 24.5 : leim moved to lisp/leim so that leim-filelist is included in core-filelist #find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp/leim \ # -name '*.elc' -print | sed "s^$RPM_BUILD_ROOT^^" > leim-filelist #find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp/leim \ # -mindepth 1 -type d -printf "%%%%dir %%p\n" | \ # sed "s^$RPM_BUILD_ROOT^^" >> leim-filelist # # be sure to exclude some files which are needed in the core package # > el-filelist for I in `find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp \ -name '*.el'`; do if [ -e `dirname $I`/`basename $I .el`.elc ]; then echo $I | sed "s^$RPM_BUILD_ROOT^^" fi done >> el-filelist # grep -v doesn't work properly find $RPM_BUILD_ROOT%{_prefix}/share/emacs/%{PACKAGE_VERSION}/lisp/leim \ -name "*.el" -print | sed "s^$RPM_BUILD_ROOT^^" >> el-filelist ## grep -v "leim\/leim\-list.el" >> el-filelist vi el-filelist < 26.3-1 - Update to 26.3 * Fri Mar 08 2019 Reshma V Kumar 26.1-1 - Update to latest version * Tue Nov 7 2017 Reshma V Kumar 25.2-1 - Update to version 25.2 * Thu Apr 14 2016 Ayappan P 24.5-1 - AIX toolbox build * Thu Mar 2 2016 Tony Reix 24.5-1 - Update to version 24.5 * Thu Feb 25 2016 Tony Reix 23.4-1 - Update to version 23.4 * Tue Feb 22 2005 David Clissold 21.3-1 - Update to version 21.3 - Add movemail security patch, CAN-2005-0100 * Tue Apr 23 2002 David Clissold - No functional change. Remove unnecessary political statement - from the original gzipped tarball, per request. * Thu Feb 15 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Mon Feb 21 2000 Preston Brown - add .emacs make the delete key work to delete forward character for X ver. * Wed Feb 16 2000 Cristian Gafton - fix bug #2988 - recompile patched .el files (suggested by Pavel.Janik@linux.cz) - prereq /sbin/install-info * Mon Feb 07 2000 Preston Brown - wmconfig gone * Thu Feb 03 2000 Cristian Gafton - fix descriptions and summary - fix permissions for emacs niaries (what the hell does 1755 means for a binary?) - added missing, as per emacs Changelog, NCURSES_OSPEED_T compilation flag; without it emacs on Linux is making global 'ospeed' short which is not the same as 'speed_t' expected by libraries. (reported by Michal Jaegermann ) * Mon Jan 10 2000 David S. Miller - Revert src/unexecelf.c to 20.4 version, fixes SPARC problems. * Sun Jan 9 2000 Matt Wilson - strip emacs binary - disable optimizations for now, they cause illegal instructions on SPARC. * Sun Jan 09 2000 Paul Fisher - upgrade to 20.5a - remove python-mode, wheelmouse support, and auctex menu - import emacs.desktop with icon from GNOME * Wed Dec 08 1999 Ngo Than - added python-mode, wheelmouse support and auctex menu - added Comment[de] in emacs.desktop * Sat Sep 25 1999 Preston Brown - added desktop entry * Thu Sep 23 1999 Preston Brown - tried to fix triggers, hopefully working now. * Wed Sep 01 1999 Preston Brown - added trigger for making symlink to /usr/bin/emacs in emacs-nox package * Thu Jul 22 1999 Paul Fisher - upgrade to 20.4 - cleaned up spec * Fri Apr 16 1999 Owen Taylor - replace bad xemacs compiled .elc file for mh-e with one compiled on emacs * Thu Apr 15 1999 Bill Nottingham - make sure movemail doesn't get %defattr()'d to root.root * Wed Apr 14 1999 Cristian Gafton - patch to make it work with dxpc * Wed Mar 31 1999 Preston Brown - updated mh-utils emacs lisp file to match our nmh path locations * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 9) * Fri Feb 26 1999 Cristian Gafton - linker scripts hack to make it build on the alpha * Fri Jan 1 1999 Jeff Johnson - add leim package (thanks to Pavel.Janik@inet.cz). * Fri Dec 18 1998 Cristian Gafton - build against glibc 2.1 * Wed Sep 30 1998 Cristian Gafton - backed up changes to uncompress.el (it seems that the one from 20.2 works much better) * Mon Sep 28 1998 Jeff Johnson - eliminate /tmp race in rcs2log * Wed Sep 09 1998 Cristian Gafton - upgrade to 20.3 * Tue Jun 9 1998 Jeff Johnson - add --with-pop to X11 compile. - include contents of /usr/share/.../etc with main package. * Mon Jun 01 1998 Prospector System - translations modified for de, fr * Mon Jun 01 1998 David S. Miller - fix signals when linked with glibc on non-Intel architectures NOTE: This patch is not needed with emacs >20.2 * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Thu May 07 1998 Cristian Gafton - added /usr/lib/emacs/20.2/*-redhat-linux directory in the filelist * Thu Apr 09 1998 Cristian Gafton - alpha started to like emacs-nox again :-) * Thu Nov 6 1997 Michael Fulbright - alpha just doesnt like emacs-nox, taking it out for now * Mon Nov 3 1997 Michael Fulbright - added multibyte support back into emacs 20.2 - added wmconfig for X11 emacs - fixed some errant buildroot references * Thu Oct 23 1997 Michael Fulbright - joy a new version of emacs! Of note - no lockdir any more. - use post/preun sections to handle numerous GNU info files * Mon Oct 06 1997 Erik Troan - stopped stripping it as it seems to break things * Sun Sep 14 1997 Erik Troan - turned off ecoff support on the Alpha (which doesn't build anymore) * Mon Jun 16 1997 Erik Troan - built against glibc * Fri Feb 07 1997 Michael K. Johnson - Moved ctags to gctags to fit in the more powerful for C (but less general) exuberant ctags as the binary /usr/bin/ctags and the man page /usr/man/man1/ctags.1