2013-05-24 10:47:07 +00:00
committed by Git OBS Bridge
parent 43f6555818
commit 9f976d12b6
3 changed files with 111 additions and 44 deletions

View File

@@ -80,11 +80,14 @@ License: GPL-3.0+
Group: Productivity/Editors/Emacs
Provides: nxml-mode = 20041004
Obsoletes: nxml-mode < 20041004
Provides: epg = 1.0.0
Obsoletes: epg < 1.0.0
Source: ftp://ftp.gnu.org/gnu/emacs/emacs-24.3.tar.xz
Source1: app-defaults.Emacs
Source2: site-lisp.tar.bz2
Source3: dot.gnu-emacs
Source4: emacs-rpmlintrc
Source5: emacs.sh
Patch: emacs-24.3.dif
Patch2: emacs-24.3-glibc.patch
Patch3: emacs-24.3-decl.dif
@@ -100,7 +103,6 @@ Patch22: emacs-24.1-bnc628268.patch
Patch23: emacs-24.3-xevent.patch
Patch25: emacs-24.3-giflib5.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global bug_345669 0
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%define _x11lib %{_exec_prefix}/%{_lib}
@@ -423,49 +425,8 @@ install -m 0755 emacs-gtk %{buildroot}/usr/bin/
install -m 0755 emacs-x11 %{buildroot}/usr/bin/
make install DESTDIR=%{buildroot}
rm -vf %{buildroot}/usr/bin/emacs
%if %bug_345669
cat > %{buildroot}/usr/bin/emacs <<-"EOF"
#!/bin/bash
# Avoid trouble with maximize/minimize within KDE (bug #345669)
# -> under KWin emacs does not maximize in the correct way if
# GTK/GDK is used as toolkit. After click on the maximize
# button emacs shrinks to fit to the current font which
# destroys the maximize state in KWin.
# Avoid trouble with "iconic" state information (bug #342385)
# -> under KWin emacs with GTK/GDK toolkit does not hold its
# "iconic" state if a desktop state is saved before logout
# and restored after login.
if test -z "$EMACS_TOOLKIT" ; then
EMACS_TOOLKIT=gtk
KDE_FULL_SESSION=$(xprop -root KDE_FULL_SESSION 2>/dev/null)
case "$KDE_FULL_SESSION" in
*true*) EMACS_TOOLKIT=x11
esac
fi
exec -a ${0} ${0}-${EMACS_TOOLKIT} ${1+"$@"}
EOF
%else
cat > %{buildroot}/usr/bin/emacs <<-"EOF"
#!/bin/bash
# Possible values are nox, gtk, or x11
: ${EMACS_TOOLKIT:=gtk}
if test "$EMACS_TOOLKIT" = gtk; then
LC_NUMERIC=POSIX
export LC_NUMERIC
fi
if test -e ${0}-${EMACS_TOOLKIT} ; then
exec -a ${0} ${0}-${EMACS_TOOLKIT} ${1+"$@"}
elif test -e ${0}-x11 ; then
exec -a ${0} ${0}-x11 ${1+"$@"}
elif test -e ${0}-nox ; then
exec -a ${0} ${0}-nox ${1+"$@"}
else
echo "no emacs binary found"
exit 1
fi
EOF
%endif
chmod 0755 %{buildroot}/usr/bin/emacs
install -p %{S:5} %{buildroot}/usr/bin/emacs
chmod 0755 %{buildroot}/usr/bin/emacs
tar cf - `find site-lisp/ -name '*.el' -o -name '*.elc'` | \
tar -x -f - -C %{buildroot}%{_datadir}/emacs/%{version}/
mkdir -p %{buildroot}%{_docdir}/emacs