Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 9dcf1496ca7ddb9096ff1aa8db481305 > files > 8

emacs-24.5-8.3.mga6.src.rpm

%define _localstatedir /var/lib

%define site_lisp %{_datadir}/emacs/site-lisp
%define site_start_d %{site_lisp}/site-start.d

Summary:	GNU Emacs text editor with X11 support

Name:		emacs
Version:	24.5
%define subrel	3
Release:	%mkrel 8
License:	GPLv3+
Group:		Editors
URL:		http://www.gnu.org/software/emacs/

Source0:	ftp://ftp.gnu.org/pub/gnu/emacs/emacs-%{version}.tar.xz
Source2:	gnu-mini.png
Source3:	gnu-normal.png
Source4:	gnu-large.png
Source5:	emacs-config

Patch100:	emacs-24.4-infofix.patch
Patch101:	emacs-23.1.92-version.patch
Patch111:	emacs-24.2-ispell-dictionaries-list-iso-8859-15.patch
Patch112:	emacs-24.4-CVE-2017-14482.patch
# from Arch linux, to fix #18470
Patch200:       emacs-24.5-gtk3-icons.patch

BuildRequires:	x11-server-common
BuildRequires:	libx11-devel
BuildRequires:	gcc
BuildRequires:	libjpeg-devel
BuildRequires:	libpng-devel
BuildRequires:	libtiff-devel
BuildRequires:	ncurses-devel
BuildRequires:	giflib-devel
BuildRequires:  texinfo
BuildRequires:	xpm-devel
BuildRequires:	gtk+3-devel
BuildRequires:	imagemagick-devel
BuildRequires:	gnutls-devel
BuildRequires:	libxml2-devel
BuildRequires:	pkgconfig(librsvg-2.0)
BuildRequires:	pkgconfig(libotf)
BuildRequires:	pkgconfig(m17n-flt)
BuildRequires:	gpm-devel
BuildRequires:	acl-devel

Requires(preun): update-alternatives
Requires(post):  update-alternatives

Requires:	%{name}-common = %{version}
Provides:	emacs = %{version}-%{release}
Provides:	emacs-bin = %{version}-%{release}
Provides:	emacs-gtk = %{version}-%{release}

Conflicts:	emacs-snapshot < %{version}-%{release}
Obsoletes:	emacs-gtk <= 22.3
Obsoletes:	emacs-X11 < 22.0.50
Obsoletes:	xemacs < 21.4.22-28
Obsoletes:	xemacs-extras < 21.4.22-28
Obsoletes:	xemacs-mule < 21.4.22-28
Provides:	emacs-X11 = %{version}-%{release}

Recommends:	hunspell

%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 provides an emacs binary with support for X Windows. 

%package	el
Summary:	GNU Emacs Lisp source files
Group:		Editors
Requires:	%{name}-common = %{version}
Conflicts:	emacs-snapshot-el
BuildArch:	noarch
Obsoletes:	xemacs-devel < 21.4.22-28
Obsoletes:	xemacs-el < 21.4.22-28
Obsoletes:	xemacs-mule-el < 21.4.22-28

%description	el
The emacs-snapshot-el package contains the emacs elisp sources for
many of the elisp programs included with the main Emacs text editor
package.

You need to install this package only if you intend to modify any of
the Emacs packages or see some elisp examples.

%package	doc
Summary:	GNU Emacs documentation
Group:		Editors
Requires:	%{name}-common = %{version}
BuildArch:	noarch
Conflicts:	emacs-snapshot-doc

%description	doc
Documentation for GNU Emacs.

%package	leim
Summary:	GNU Emacs Lisp code for international input methods
Group:		Editors
BuildArch:	noarch
Requires:	%{name}-common = %{version}
Conflicts:	emacs-snapshot-leim

%description	leim
This package contains Emacs Lisp code for input methods for various
international character scripts.

%package	nox
Summary:	GNU Emacs text editor without support for X11
Group:		Editors
Requires:	%{name}-common = %{version}
Provides:	emacs-bin = %{version}-%{release}

Conflicts:	emacs-snapshot-nox

Requires(preun): update-alternatives
Requires(post):  update-alternatives

%description	nox
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 provides an emacs binary with no X Windows support for
running on a terminal.

%package	common
Summary:	Common files for GNU Emacs
Group:		Editors

Obsoletes:	gnus-emacs < 5.13.0
Provides:	gnus-emacs = 5.13.0

Obsoletes:	emacs-cedet < 1.0-0.pre7
Provides:	emacs-cedet = 1.0-0.pre7

Conflicts:	emacs-speedbar < 1.0
Provides:	emacs-speedbar = 1.0

Obsoletes:	emacs-tramp < 2.1.18-pre
Provides:	emacs-tramp = 2.1.18-pre

# (Lev) This doesn't look correct:
Obsoletes:	emacs-pcomplete <= 2.4.2
Provides:	emacs-pcomplete = 1.1.1

Obsoletes:	eshell-emacs <= 2.4.2
Provides:	eshell-emacs = 2.4.2

Obsoletes:	emacs-easypg < 1.0.0
Provides:	emacs-easypg = 1.0.0

Obsoletes:	emacs-erc < 5.3
Provides:	emacs-erc = 5.3

Conflicts:	emacs-snapshot-common

# conflicts due to %%_bindir/{etags,rcs-checkin}
Conflicts: xemacs-extras

%description	common
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 contains all of the common files needed by emacs-snapshot
or emacs-snapshot-nox

%prep
%setup -q

%__perl -p -i -e 's/ctags/gctags/g' etc/etags.1

%patch100 -p1
%patch101 -p1 -b .version
%patch111 -p1
%patch112 -p1 -b .CVE-2017-14482
%patch200 -p1 -b .gtk3

%build
autoreconf -fi -I m4

PUREDEF="-DNCURSES_OSPEED_T"
XPUREDEF="-DNCURSES_OSPEED_T"

# new giflib5 does not have this function and it is unused anyway...
export ac_cv_lib_gif_EGifPutExtensionLast=yes

export CFLAGS="$RPM_OPT_FLAGS $PUREDEF -fno-zero-initialized-in-bss"

%configure2_5x --with-x=no
%make bootstrap

%make distclean
# Build binary without X support
%configure2_5x --with-x=no --with-gpm
%make
mv src/emacs src/nox-emacs

%make distclean
# Build binary with X support
%configure2_5x --with-x-toolkit=gtk3
%make

# Create macros.emacs RPM macro file
cat > macros.emacs << EOF
%%_emacs_version %{version}
%%_emacs_ev %{?epoch:%{epoch}:}%{version}
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
%%_emacs_sitelispdir %{site_lisp}
%%_emacs_sitestartdir %{site_start_d}
%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile
EOF

%install
mkdir -p %{buildroot}/usr

PATH=$PATH:/sbin
ARCHDIR=%{_target_platform}
%makeinstall sharedstatedir=%{buildroot}/var

rm -f %{buildroot}%{_bindir}/emacs
rm -f %{buildroot}%{_infodir}/dir

# remove sun specific stuff
rm -f %{buildroot}%{_datadir}/emacs/%{version}/etc/{emacstool.1,emacs.1,ctags.1,etags.1,sex.6}

# rename ctags to gctags
mv %{buildroot}%{_mandir}/man1/ctags.1.gz %{buildroot}%{_mandir}/man1/gctags.1.gz
mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags

mkdir -p %{buildroot}%{_sysconfdir}/emacs
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
(cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)

install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d

# Install rpm macro definition file
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/


install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
chmod -t %{buildroot}%{_bindir}/emacs*

# create file lists

#
# emacs-doc file list
#
# 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
# NB: etc/ps-prin{0,1}.ps are needed by ps-print
find %{buildroot}%{_datadir}/emacs/%{version}/etc/ -type f | \
  egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
  sed "s^%{buildroot}^^" > doc-filelist

#
# emacs-el file list
#

# take every .el and .el.gz which have a corresponding .elc
find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
  grep -v /leim/ | while read I; do
  f=`basename $I .gz`
  f=`basename $f .el`
  if [ -e `dirname $I`/$f.elc ]; then
    echo $I | sed "s^%{buildroot}^^"
  fi
done > el-filelist

#
# emacs-common file list
#

# everything not in previous filelists, and remove a few things listed in %%files
find %{buildroot}%{_datadir}/emacs/%{version} -type f -print -o -type d -printf "%%%%dir %%p\n" | \
  grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
while read I; do
  grep -qxF $I doc-filelist el-filelist || echo $I
done < common-filelist.raw > common-filelist

find %{buildroot}%{_libexecdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
  egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist

# this conflicts with the info package
rm -f %{buildroot}%{_infodir}/info.info.gz

%define info_files ada-mode auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq eieio eintr elisp emacs emacs-gnutls emacs-mime epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido mairix-el message mh-e newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp url vip viper widget wisent woman
have_info_files=$(echo $(ls %{buildroot}%{_infodir} | sed -e 's/\.info\.gz$//' | egrep -v -- '-[0-9]+$' | LC_ALL=C sort))

[ "$have_info_files" = "%info_files" ] || {
  echo "you must modify the spec file, %%info_files should be: $have_info_files"
  exit 1
}


%post common
# --section="GNU Emacs"
for f in %{info_files}; do  %_install_info $f
done
:

%preun
for f in %{info_files}; do  %_remove_install_info $f
done
:

%post nox
update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nox 10

[[ ! -f %{_bindir}/emacs ]] && update-alternatives --auto emacs
:

%postun nox
[[ ! -f %{_bindir}/emacs-nox ]] && \
    /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-nox
:

%post
/usr/sbin/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 21

%postun
[[ ! -f %{_bindir}/emacs-%{version} ]] && \
    /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| :

%files -f common-filelist common
%{_rpmconfigdir}/macros.d/macros.emacs
%doc BUGS README src/COPYING
%{_localstatedir}/games/emacs
%dir %{_sysconfdir}/emacs/site-start.d
%dir %{_sysconfdir}/emacs
%config(noreplace) %{_sysconfdir}/emacs/site-start.el
%dir %{_datadir}/emacs
%dir %{_datadir}/emacs/site-lisp
%{_datadir}/emacs/%{version}/lisp/site-start.el
%attr(2755,root,mail) %{_libexecdir}/emacs/%{version}/%{_target_platform}/movemail
%attr(4755,games,root) %{_libexecdir}/emacs/%{version}/%{_target_platform}/update-game-score
%{_bindir}/emacsclient
%{_bindir}/etags
%{_bindir}/ebrowse
%{_bindir}/grep-changelog
%{_bindir}/gctags
%{_mandir}/*/*
%{_infodir}/*

%files -f doc-filelist doc

%files -f el-filelist el
%doc src/COPYING
%{_datadir}/emacs/%{version}/site-lisp/subdirs.el
%{_datadir}/emacs/site-lisp/subdirs.el
%{_datadir}/emacs/%{version}/lisp/leim/ja-dic/*.el.gz
%{_datadir}/emacs/%{version}/lisp/leim/quail/*.el.gz

%files leim
%doc src/COPYING
%{_datadir}/emacs/%{version}/lisp/leim/leim-list.el
%dir %{_datadir}/emacs/%{version}/lisp/leim/ja-dic
%{_datadir}/emacs/%{version}/lisp/leim/ja-dic/*.elc
%dir %{_datadir}/emacs/%{version}/lisp/leim/quail
%{_datadir}/emacs/%{version}/lisp/leim/quail/*.elc

%files nox
%doc src/COPYING
%{_bindir}/emacs-nox

%files
%doc src/COPYING
%{_bindir}/emacs-%{version}
%{_datadir}/applications/emacs.desktop
%{_iconsdir}/hicolor/*/apps/emacs*.png
%{_iconsdir}/hicolor/scalable/apps/emacs.svg
%{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg


%changelog
* Tue May 01 2018 kekepower <kekepower> 24.5-8.3.mga6
  (not released yet)
+ Revision: 1224345
- Rebuild for ImageMagic 6.9.9.41
- Rebuild for new ImageMagick
+ luigiwalser <luigiwalser>
- add patch from debian to fix CVE-2017-14482

* Sat May 27 2017 shlomif <shlomif> 24.5-8.mga6
+ Revision: 1105214
- rebuild for new imagemagick lib-major

* Sat Dec 31 2016 wally <wally> 24.5-7.mga6
+ Revision: 1078831
- fix rpm macros

* Fri Jul 15 2016 eatdirt <eatdirt> 24.5-6.mga6
+ Revision: 1042174
- Fixing missing gtk3 icons (mga#18470)

* Thu Jun 16 2016 tv <tv> 24.5-5.mga6
+ Revision: 1021697
- add emacs macros for rpm

* Fri Feb 12 2016 marja <marja> 24.5-4.mga6
+ Revision: 959287
- re-add conflict, to ensure smooth upgrading
- get rid of some "unversioned-explicit-*" rpmlint warnings
  o add = %%{version}-%%{release} where needed
  o remove obs/prov for emacs-url
- fix macro in comment
- make emacs obsolete xemacs

* Mon Jan 11 2016 luigiwalser <luigiwalser> 24.5-3.mga6
+ Revision: 921801
- rebuild for gnutls

* Thu Jan 07 2016 luigiwalser <luigiwalser> 24.5-2.mga6
+ Revision: 920393
- rebuild for giflib
- add fix from opensuse to fix build with giflib5

* Thu Sep 03 2015 luigiwalser <luigiwalser> 24.5-1.mga6
+ Revision: 872603
- reinstate leim (paths were wrong)
- drop leim subpackage as it is not building with 24.5
- build with acl support
- 24.5
- 24.4
- remove no longer needed patch 1 and patch 6
- rediff patch 100
- remove patch 112 (fixed upstream)
- remove upstream patches 150-153

* Mon Jun 29 2015 tv <tv> 24.3-11.mga6
+ Revision: 847565
- s/old_makeinstall/makeinstall/

* Wed Nov 26 2014 eatdirt <eatdirt> 24.3-10.mga5
+ Revision: 799369
- Fix ispell/hunspell compatibility name when using non-default dictionaries

* Wed Nov 26 2014 eatdirt <eatdirt> 24.3-9.mga5
+ Revision: 799355
- Default dictionnary to hunspell (workaround mga#5439)

* Wed Oct 15 2014 umeabot <umeabot> 24.3-8.mga5
+ Revision: 738965
- Second Mageia 5 Mass Rebuild

* Fri Oct 03 2014 doktor5000 <doktor5000> 24.3-7.mga5
+ Revision: 736407
- added BuildRequires on pkgconfig(librsvg-2.0)
  o fixes broken Help -> About Emacs window (mga#14223)
- added some more BuildRequires to enable other features:
  o pkgconfig(libotf) for OpenType font support
  o pkgconfig(m17n-flt) for text shaping
  o gpm-devel for gpm support in non-x11 version

* Tue Sep 16 2014 umeabot <umeabot> 24.3-6.mga5
+ Revision: 678992
- Mageia 5 Mass Rebuild

* Fri May 30 2014 luigiwalser <luigiwalser> 24.3-5.mga5
+ Revision: 628025
- add patches from fedora to fix CVE-2014-342[1-4]

* Sat Oct 19 2013 umeabot <umeabot> 24.3-4.mga5
+ Revision: 526086
- Mageia 4 Mass Rebuild

* Mon Jun 03 2013 fwang <fwang> 24.3-3.mga4
+ Revision: 435825
- rebuild for new libpng

* Wed May 29 2013 blino <blino> 24.3-2.mga4
+ Revision: 429871
- do not ship info.info (conflicts with info package)

* Tue May 28 2013 blino <blino> 24.3-1.mga4
+ Revision: 429809
- do not package rcs-checkin (removed upstream)
- sync info files list
- drop merged rpath patch
- 24.3

* Tue May 28 2013 fwang <fwang> 24.2-6.mga4
+ Revision: 429149
- rebuild for new imagemagick

* Fri Jan 11 2013 umeabot <umeabot> 24.2-5.mga3
+ Revision: 349596
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Jan 07 2013 luigiwalser <luigiwalser> 24.2-4.mga3
+ Revision: 340533
- fix for changed _libexecdir

* Fri Dec 14 2012 fwang <fwang> 24.2-3.mga3
+ Revision: 330771
- rebuild for new imagemagick

* Fri Oct 12 2012 fwang <fwang> 24.2-2.mga3
+ Revision: 305159
- rebuild for new imagemagick

* Sun Oct 07 2012 luigiwalser <luigiwalser> 24.2-1.mga3
+ Revision: 303174
- 24.2
- remove upstreamed patches 8 and 112
- cosmetic fixes

* Thu Sep 06 2012 luigiwalser <luigiwalser> 24.1-2.mga3
+ Revision: 288887
- add patch from upstream via gentoo to fix compilation with glibc 2.16
- add patch from fedora to fix CVE-2012-3479

* Sun Jun 10 2012 blino <blino> 24.1-1.mga3
+ Revision: 259558
- build with gtk3 instead of gtk2
- remove deprecated b2m (Babyl to mbox)
- update info file list
- adapt to info files being gzipped by upstream build
- no need to manually remove fakemail, not upstream anymore
- explicitely buildrequire imagemagick devel for imagemagick support
- explicitely buildrequire gnutls devel for gnutls support
- explicitely buildrequire libxml2-devel for xml support
- fix autoreconf by using m4 dir
- drop unused xaw3d from requires
- drop ia64 patch, which seems to add a conflicting function prototype
- drop merged patches
- drop merged string format patch
- remove lzma patch, upstream now supports xz info pages (we only have a few remaining packages using lzma info pages, they should be rebuild to use xz)
- drop unmaintained ppc/ppc64 patches (seems to be handled upstream anyway, with macppc and powerpc64 archs)
- rediff ispell patch
- drop toolbar hide patch, keep upstream default
- drop x86_64 patch, this arch is handled in configure as amdx86-64
- drop sendmail patch, emacs now defaults to sendmail as well (instead of fakemail previously)
- remove bzip2 patch, emacs now supports compressed info pages (this is even the default)
- rediff rpath patch
- 24.1

* Thu Apr 12 2012 blino <blino> 23.3-8.mga2
+ Revision: 230325
- adapt to svn 1.7 change, with no .svn directory in each sub directory (patch from upstream)
+ malo <malo>
- Change emacs-config to use enchant by default (Bug #4462)

* Mon Feb 13 2012 dmorgan <dmorgan> 23.3-6.mga2
+ Revision: 208353
- Fix buildrequires

* Sat Jan 28 2012 malo <malo> 23.3-5.mga2
+ Revision: 202643
- bump rel
- added missing %%postun (that was preventing correct alternative upgrade, #3201)

* Fri Dec 23 2011 fwang <fwang> 23.3-4.mga2
+ Revision: 186506
- rebuild for new libtiff

* Fri Nov 11 2011 blino <blino> 23.3-3.mga2
+ Revision: 166533
- fix infinite loop in text mode select() when built with gtk support
  this has been exposed by glib >= 2.31 (emacs #9754, mga #3259)

* Mon Sep 19 2011 fwang <fwang> 23.3-2.mga2
+ Revision: 145302
- rebuild for new libpng

* Thu Sep 08 2011 tv <tv> 23.3-1.mga2
+ Revision: 141574
- new release
- rediff patch 100
- drop patch 117 (fixed other way upstream)

* Fri Sep 02 2011 tv <tv> 23.2-4.mga2
+ Revision: 137802
- make the somewhat huge el subpackage be noarch

* Thu Jan 13 2011 ahmad <ahmad> 23.2-3.mga1
+ Revision: 8303
- adapt emacs-23.1.92-version.patch and emacs-config to the distro changes
- drop old/unneeded scriptlets
- imported package emacs