Conditionalise build of alternative binaries
With this, builds can be significantly speeded up by, e.g., ``` fedpkg mockbuild --without=nw --without=lucid --without=gtkx11 ```
This commit is contained in:
parent
d3db50bc99
commit
bce17310e3
194
emacs.spec
194
emacs.spec
@ -3,6 +3,10 @@
|
|||||||
%bcond gpm %[!(0%{?rhel} >= 10)]
|
%bcond gpm %[!(0%{?rhel} >= 10)]
|
||||||
%bcond webkit %[!(0%{?rhel} >= 10)]
|
%bcond webkit %[!(0%{?rhel} >= 10)]
|
||||||
|
|
||||||
|
%bcond_without gtkx11
|
||||||
|
%bcond_without lucid
|
||||||
|
%bcond_without nw
|
||||||
|
|
||||||
# This file is encoded in UTF-8. -*- coding: utf-8 -*-
|
# This file is encoded in UTF-8. -*- coding: utf-8 -*-
|
||||||
Summary: GNU Emacs text editor
|
Summary: GNU Emacs text editor
|
||||||
Name: emacs
|
Name: emacs
|
||||||
@ -36,63 +40,68 @@ Patch5: emacs-pgtk-on-x-error-message.patch
|
|||||||
Patch: 0001-Fix-flymake-tests-with-GCC-14.patch
|
Patch: 0001-Fix-flymake-tests-with-GCC-14.patch
|
||||||
Patch: 0001-Tag-process-tests-multiple-threads-waiting-unstable-.patch
|
Patch: 0001-Tag-process-tests-multiple-threads-waiting-unstable-.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: atk-devel
|
|
||||||
BuildRequires: cairo-devel
|
|
||||||
BuildRequires: freetype-devel
|
|
||||||
BuildRequires: fontconfig-devel
|
|
||||||
BuildRequires: dbus-devel
|
|
||||||
BuildRequires: giflib-devel
|
|
||||||
BuildRequires: glibc-devel
|
|
||||||
BuildRequires: libpng-devel
|
|
||||||
BuildRequires: libjpeg-turbo-devel
|
|
||||||
BuildRequires: libjpeg-turbo
|
|
||||||
BuildRequires: libtiff-devel
|
|
||||||
BuildRequires: libX11-devel
|
|
||||||
BuildRequires: libXau-devel
|
|
||||||
BuildRequires: libXdmcp-devel
|
|
||||||
BuildRequires: libXi-devel
|
|
||||||
BuildRequires: libXrender-devel
|
|
||||||
BuildRequires: libXt-devel
|
|
||||||
BuildRequires: libXpm-devel
|
|
||||||
BuildRequires: ncurses-devel
|
|
||||||
BuildRequires: xorg-x11-proto-devel
|
|
||||||
BuildRequires: zlib-devel
|
|
||||||
BuildRequires: gnutls-devel
|
|
||||||
BuildRequires: librsvg2-devel
|
|
||||||
BuildRequires: m17n-lib-devel
|
|
||||||
BuildRequires: libotf-devel
|
|
||||||
BuildRequires: libselinux-devel
|
|
||||||
BuildRequires: alsa-lib-devel
|
BuildRequires: alsa-lib-devel
|
||||||
%if %{with gpm}
|
BuildRequires: atk-devel
|
||||||
BuildRequires: gpm-devel
|
|
||||||
%endif
|
|
||||||
BuildRequires: libxml2-devel
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: bzip2
|
BuildRequires: bzip2
|
||||||
BuildRequires: cairo
|
BuildRequires: cairo
|
||||||
BuildRequires: texinfo
|
BuildRequires: cairo-devel
|
||||||
BuildRequires: gzip
|
BuildRequires: dbus-devel
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: libappstream-glib
|
BuildRequires: fontconfig-devel
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: freetype-devel
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: giflib-devel
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: gnupg2
|
||||||
|
BuildRequires: gnutls-devel
|
||||||
|
BuildRequires: gtk3-devel
|
||||||
|
BuildRequires: gzip
|
||||||
BuildRequires: harfbuzz-devel
|
BuildRequires: harfbuzz-devel
|
||||||
BuildRequires: jansson-devel
|
BuildRequires: jansson-devel
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: libacl-devel
|
||||||
|
BuildRequires: libappstream-glib
|
||||||
BuildRequires: libgccjit-devel
|
BuildRequires: libgccjit-devel
|
||||||
|
BuildRequires: libjpeg-turbo
|
||||||
|
BuildRequires: libjpeg-turbo-devel
|
||||||
|
BuildRequires: libotf-devel
|
||||||
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: librsvg2-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
|
BuildRequires: libtiff-devel
|
||||||
BuildRequires: libtree-sitter-devel
|
BuildRequires: libtree-sitter-devel
|
||||||
BuildRequires: sqlite-devel
|
|
||||||
BuildRequires: libwebp-devel
|
BuildRequires: libwebp-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: m17n-lib-devel
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: sqlite-devel
|
||||||
|
BuildRequires: systemd-devel
|
||||||
|
BuildRequires: texinfo
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
%if %{with gpm}
|
||||||
|
BuildRequires: gpm-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: gtk3-devel
|
|
||||||
%if %{with webkit}
|
%if %{with webkit}
|
||||||
BuildRequires: webkit2gtk4.1-devel
|
BuildRequires: webkit2gtk4.1-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: gnupg2
|
%if %{with lucid} || %{with gtkx11}
|
||||||
|
BuildRequires: libX11-devel
|
||||||
|
BuildRequires: libXau-devel
|
||||||
|
BuildRequires: libXdmcp-devel
|
||||||
|
BuildRequires: libXi-devel
|
||||||
|
BuildRequires: libXpm-devel
|
||||||
|
BuildRequires: libXrender-devel
|
||||||
|
BuildRequires: libXt-devel
|
||||||
|
BuildRequires: xorg-x11-proto-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
# For lucid
|
%if %{with lucid}
|
||||||
BuildRequires: Xaw3d-devel
|
BuildRequires: Xaw3d-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
# for Patch3
|
# for Patch3
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
@ -100,10 +109,10 @@ BuildRequires: pkgconfig(systemd)
|
|||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: make
|
|
||||||
|
|
||||||
# Emacs doesn't run without a font, rhbz#732422
|
# Emacs doesn't run without a font, rhbz#732422
|
||||||
Requires: google-noto-sans-mono-vf-fonts
|
Requires: google-noto-sans-mono-vf-fonts
|
||||||
|
|
||||||
Requires(preun): /usr/sbin/alternatives
|
Requires(preun): /usr/sbin/alternatives
|
||||||
Requires(posttrans): /usr/sbin/alternatives
|
Requires(posttrans): /usr/sbin/alternatives
|
||||||
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
Requires: emacs-common = %{epoch}:%{version}-%{release}
|
||||||
@ -129,6 +138,7 @@ This package provides an emacs binary with support for Wayland, using the
|
|||||||
GTK toolkit.
|
GTK toolkit.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
%package gtk+x11
|
%package gtk+x11
|
||||||
Summary: GNU Emacs text editor with GTK toolkit X support
|
Summary: GNU Emacs text editor with GTK toolkit X support
|
||||||
Requires: libgccjit
|
Requires: libgccjit
|
||||||
@ -142,8 +152,10 @@ Supplements: (xorg-x11-server-Xorg and emacs-common)
|
|||||||
%desc
|
%desc
|
||||||
This package provides an emacs-gtk+x11 binary with support for the X
|
This package provides an emacs-gtk+x11 binary with support for the X
|
||||||
Window System, using the GTK toolkit.
|
Window System, using the GTK toolkit.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
%package lucid
|
%package lucid
|
||||||
Summary: GNU Emacs text editor with Lucid toolkit X support
|
Summary: GNU Emacs text editor with Lucid toolkit X support
|
||||||
Requires: google-noto-sans-mono-vf-fonts
|
Requires: google-noto-sans-mono-vf-fonts
|
||||||
@ -156,8 +168,10 @@ Provides: emacs(bin) = %{epoch}:%{version}-%{release}
|
|||||||
%desc
|
%desc
|
||||||
This package provides an emacs-lucid binary with support for the X
|
This package provides an emacs-lucid binary with support for the X
|
||||||
Window System, using the Lucid toolkit.
|
Window System, using the Lucid toolkit.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
%package nw
|
%package nw
|
||||||
Summary: GNU Emacs text editor with no window system support
|
Summary: GNU Emacs text editor with no window system support
|
||||||
Requires(preun): /usr/sbin/alternatives
|
Requires(preun): /usr/sbin/alternatives
|
||||||
@ -171,6 +185,7 @@ Obsoletes: emacs-nox < 1:30
|
|||||||
%desc
|
%desc
|
||||||
This package provides an emacs-nw binary without graphical display
|
This package provides an emacs-nw binary without graphical display
|
||||||
support, for running on a terminal only.
|
support, for running on a terminal only.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package -n emacsclient
|
%package -n emacsclient
|
||||||
@ -279,6 +294,7 @@ ln -s ../../%{name}/%{version}/etc/NEWS doc
|
|||||||
export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}"
|
export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}"
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
# Build Lucid binary
|
# Build Lucid binary
|
||||||
mkdir build-lucid && cd build-lucid
|
mkdir build-lucid && cd build-lucid
|
||||||
ln -s ../configure .
|
ln -s ../configure .
|
||||||
@ -306,8 +322,11 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
|
|||||||
--with-xpm
|
--with-xpm
|
||||||
%{setarch} %make_build bootstrap
|
%{setarch} %make_build bootstrap
|
||||||
%{setarch} %make_build
|
%{setarch} %make_build
|
||||||
|
rm src/emacs-%{version}.*
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
# Build binary without X support
|
# Build binary without X support
|
||||||
mkdir build-nw && cd build-nw
|
mkdir build-nw && cd build-nw
|
||||||
ln -s ../configure .
|
ln -s ../configure .
|
||||||
@ -322,8 +341,11 @@ ln -s ../configure .
|
|||||||
--with-x=no
|
--with-x=no
|
||||||
%{setarch} %make_build bootstrap
|
%{setarch} %make_build bootstrap
|
||||||
%{setarch} %make_build
|
%{setarch} %make_build
|
||||||
|
rm src/emacs-%{version}.*
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
# Build GTK/X11 binary
|
# Build GTK/X11 binary
|
||||||
mkdir build-gtk+x11 && cd build-gtk+x11
|
mkdir build-gtk+x11 && cd build-gtk+x11
|
||||||
ln -s ../configure .
|
ln -s ../configure .
|
||||||
@ -351,7 +373,9 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
|
|||||||
%{?with_webkit:--with-xwidgets}
|
%{?with_webkit:--with-xwidgets}
|
||||||
%{setarch} %make_build bootstrap
|
%{setarch} %make_build bootstrap
|
||||||
%{setarch} %make_build
|
%{setarch} %make_build
|
||||||
|
rm src/emacs-%{version}.*
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
# Build pure GTK binary
|
# Build pure GTK binary
|
||||||
mkdir build-pgtk && cd build-pgtk
|
mkdir build-pgtk && cd build-pgtk
|
||||||
@ -379,11 +403,10 @@ LDFLAGS=-Wl,-z,relro; export LDFLAGS;
|
|||||||
%{?with_webkit:--with-xwidgets}
|
%{?with_webkit:--with-xwidgets}
|
||||||
%{setarch} %make_build bootstrap
|
%{setarch} %make_build bootstrap
|
||||||
%{setarch} %make_build
|
%{setarch} %make_build
|
||||||
|
ls -l src/emacs-%{version}.*
|
||||||
|
rm src/emacs-%{version}.*
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Remove versioned file so that we end up with .1 suffix and only one DOC file
|
|
||||||
rm build-{gtk+x11,lucid,nw,pgtk}/src/emacs-%{version}.*
|
|
||||||
|
|
||||||
# Create pkgconfig file
|
# Create pkgconfig file
|
||||||
cat > emacs.pc << EOF
|
cat > emacs.pc << EOF
|
||||||
sitepkglispdir=%{site_lisp}
|
sitepkglispdir=%{site_lisp}
|
||||||
@ -404,6 +427,7 @@ cat > macros.emacs << EOF
|
|||||||
%%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%*
|
%%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%*
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd build-pgtk
|
cd build-pgtk
|
||||||
%make_install
|
%make_install
|
||||||
@ -421,19 +445,25 @@ gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz
|
|||||||
mv %{buildroot}%{_bindir}/emacs-%{version} %{buildroot}%{_bindir}/emacs-%{version}-pgtk
|
mv %{buildroot}%{_bindir}/emacs-%{version} %{buildroot}%{_bindir}/emacs-%{version}-pgtk
|
||||||
ln -s emacs-%{version}-pgtk %{buildroot}%{_bindir}/emacs-pgtk
|
ln -s emacs-%{version}-pgtk %{buildroot}%{_bindir}/emacs-pgtk
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
# Install the emacs binary using mixed GTK and X11
|
# Install the emacs binary using mixed GTK and X11
|
||||||
install -p -m 0755 build-gtk+x11/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-gtk+x11
|
install -p -m 0755 build-gtk+x11/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-gtk+x11
|
||||||
ln -s emacs-%{version}-gtk+x11 %{buildroot}%{_bindir}/emacs-gtk+x11
|
ln -s emacs-%{version}-gtk+x11 %{buildroot}%{_bindir}/emacs-gtk+x11
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
# Install the emacs with Lucid toolkit
|
# Install the emacs with Lucid toolkit
|
||||||
install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid
|
install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid
|
||||||
ln -s emacs-%{version}-lucid %{buildroot}%{_bindir}/emacs-lucid
|
ln -s emacs-%{version}-lucid %{buildroot}%{_bindir}/emacs-lucid
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
# Install the emacs without graphical display
|
# Install the emacs without graphical display
|
||||||
install -p -m 0755 build-nw/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nw
|
install -p -m 0755 build-nw/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nw
|
||||||
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-%{version}-nox
|
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-%{version}-nox
|
||||||
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox
|
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox
|
||||||
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nw
|
ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nw
|
||||||
|
%endif
|
||||||
|
|
||||||
# Make sure movemail isn't setgid
|
# Make sure movemail isn't setgid
|
||||||
chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
|
chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
|
||||||
@ -518,49 +548,57 @@ grep -vhE '%{site_lisp}(|/(default\.el|site-start\.d|site-start\.el))$' {common,
|
|||||||
# Remove old icon
|
# Remove old icon
|
||||||
rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg
|
rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg
|
||||||
|
|
||||||
# Install all the pdmp with fingerprints
|
# Install the pdmp with fingerprints
|
||||||
pgtk_pdmp="emacs-$(./build-pgtk/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
pgtk_pdmp="emacs-$(./build-pgtk/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
||||||
install -p -m 0644 build-pgtk/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${pgtk_pdmp}
|
install -p -m 0644 build-pgtk/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${pgtk_pdmp}
|
||||||
|
|
||||||
gtkx11_pdmp="emacs-$(./build-gtk+x11/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
|
||||||
install -p -m 0644 build-gtk+x11/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${gtkx11_pdmp}
|
|
||||||
|
|
||||||
lucid_pdmp="emacs-$(./build-lucid/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
|
||||||
install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${lucid_pdmp}
|
|
||||||
|
|
||||||
nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
|
||||||
install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp}
|
|
||||||
|
|
||||||
# Install native compiled Lisp of all builds
|
# Install native compiled Lisp of all builds
|
||||||
pgtk_comp_native_ver=$(ls -1 build-pgtk/native-lisp)
|
pgtk_comp_native_ver=$(ls -1 build-pgtk/native-lisp)
|
||||||
gtkx11_comp_native_ver=$(ls -1 build-gtk+x11/native-lisp)
|
|
||||||
lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp)
|
|
||||||
nw_comp_native_ver=$(ls -1 build-nw/native-lisp)
|
|
||||||
cp -ar build-pgtk/native-lisp/${pgtk_comp_native_ver} %{buildroot}%{native_lisp}
|
cp -ar build-pgtk/native-lisp/${pgtk_comp_native_ver} %{buildroot}%{native_lisp}
|
||||||
cp -ar build-gtk+x11/native-lisp/${gtkx11_comp_native_ver} %{buildroot}%{native_lisp}
|
|
||||||
cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp}
|
|
||||||
cp -ar build-nw/native-lisp/${nw_comp_native_ver} %{buildroot}%{native_lisp}
|
|
||||||
|
|
||||||
(TOPDIR=${PWD}
|
|
||||||
cd %{buildroot}
|
|
||||||
find .%{native_lisp}/${gtkx11_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk+x11-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk+x11-dirs "%%%%dir %%p\n" \)
|
|
||||||
)
|
|
||||||
(TOPDIR=${PWD}
|
(TOPDIR=${PWD}
|
||||||
cd %{buildroot}
|
cd %{buildroot}
|
||||||
find .%{native_lisp}/${pgtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/pgtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/pgtk-dirs "%%%%dir %%p\n" \)
|
find .%{native_lisp}/${pgtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/pgtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/pgtk-dirs "%%%%dir %%p\n" \)
|
||||||
)
|
)
|
||||||
|
echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-eln-filelist
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
|
gtkx11_pdmp="emacs-$(./build-gtk+x11/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
||||||
|
install -p -m 0644 build-gtk+x11/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${gtkx11_pdmp}
|
||||||
|
|
||||||
|
gtkx11_comp_native_ver=$(ls -1 build-gtk+x11/native-lisp)
|
||||||
|
cp -ar build-gtk+x11/native-lisp/${gtkx11_comp_native_ver} %{buildroot}%{native_lisp}
|
||||||
|
(TOPDIR=${PWD}
|
||||||
|
cd %{buildroot}
|
||||||
|
find .%{native_lisp}/${gtkx11_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk+x11-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk+x11-dirs "%%%%dir %%p\n" \)
|
||||||
|
)
|
||||||
|
echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-eln-filelist
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
|
lucid_pdmp="emacs-$(./build-lucid/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
||||||
|
install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${lucid_pdmp}
|
||||||
|
|
||||||
|
lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp)
|
||||||
|
cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp}
|
||||||
(TOPDIR=${PWD}
|
(TOPDIR=${PWD}
|
||||||
cd %{buildroot}
|
cd %{buildroot}
|
||||||
find .%{native_lisp}/${lucid_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/lucid-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/lucid-dirs "%%%%dir %%p\n" \)
|
find .%{native_lisp}/${lucid_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/lucid-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/lucid-dirs "%%%%dir %%p\n" \)
|
||||||
)
|
)
|
||||||
|
echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
|
nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp"
|
||||||
|
install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp}
|
||||||
|
|
||||||
|
nw_comp_native_ver=$(ls -1 build-nw/native-lisp)
|
||||||
|
cp -ar build-nw/native-lisp/${nw_comp_native_ver} %{buildroot}%{native_lisp}
|
||||||
(TOPDIR=${PWD}
|
(TOPDIR=${PWD}
|
||||||
cd %{buildroot}
|
cd %{buildroot}
|
||||||
find .%{native_lisp}/${nw_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nw-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nw-dirs "%%%%dir %%p\n" \)
|
find .%{native_lisp}/${nw_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nw-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nw-dirs "%%%%dir %%p\n" \)
|
||||||
)
|
)
|
||||||
echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-eln-filelist
|
|
||||||
echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-eln-filelist
|
|
||||||
echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist
|
|
||||||
echo %{emacs_libexecdir}/${nw_pdmp} >> nw-eln-filelist
|
echo %{emacs_libexecdir}/${nw_pdmp} >> nw-eln-filelist
|
||||||
|
%endif
|
||||||
|
|
||||||
# remove leading . from filelists
|
# remove leading . from filelists
|
||||||
sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs
|
sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs
|
||||||
@ -579,17 +617,23 @@ cd build-pgtk
|
|||||||
%make_build check
|
%make_build check
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
cd build-gtk+x11
|
cd build-gtk+x11
|
||||||
%make_build check
|
%make_build check
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
cd build-lucid
|
cd build-lucid
|
||||||
%make_build check
|
%make_build check
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
cd build-nw
|
cd build-nw
|
||||||
%make_build check
|
%make_build check
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml
|
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml
|
||||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
|
||||||
@ -603,6 +647,7 @@ fi
|
|||||||
%posttrans
|
%posttrans
|
||||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || :
|
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || :
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
%preun lucid
|
%preun lucid
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-lucid || :
|
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-lucid || :
|
||||||
@ -610,7 +655,9 @@ fi
|
|||||||
|
|
||||||
%posttrans lucid
|
%posttrans lucid
|
||||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-lucid 70 || :
|
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-lucid 70 || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
%preun gtk+x11
|
%preun gtk+x11
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-gtk+x11 || :
|
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-gtk+x11 || :
|
||||||
@ -618,7 +665,9 @@ fi
|
|||||||
|
|
||||||
%posttrans gtk+x11
|
%posttrans gtk+x11
|
||||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-gtk+x11 75 || :
|
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-gtk+x11 75 || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
%preun nw
|
%preun nw
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-nw || :
|
/usr/sbin/alternatives --remove emacs %{_bindir}/emacs-nw || :
|
||||||
@ -626,6 +675,7 @@ fi
|
|||||||
|
|
||||||
%posttrans nw
|
%posttrans nw
|
||||||
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || :
|
/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || :
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun common
|
%preun common
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
@ -636,28 +686,35 @@ fi
|
|||||||
/usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
/usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
||||||
--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || :
|
--slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || :
|
||||||
|
|
||||||
|
|
||||||
%files -f pgtk-eln-filelist -f pgtk-dirs
|
%files -f pgtk-eln-filelist -f pgtk-dirs
|
||||||
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
||||||
%{_bindir}/emacs-%{version}-pgtk
|
%{_bindir}/emacs-%{version}-pgtk
|
||||||
%{_bindir}/emacs-pgtk
|
%{_bindir}/emacs-pgtk
|
||||||
%{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
|
%{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml
|
||||||
|
|
||||||
|
%if %{with gtkx11}
|
||||||
%files gtk+x11 -f gtk+x11-eln-filelist -f gtk+x11-dirs
|
%files gtk+x11 -f gtk+x11-eln-filelist -f gtk+x11-dirs
|
||||||
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
||||||
%{_bindir}/emacs-%{version}-gtk+x11
|
%{_bindir}/emacs-%{version}-gtk+x11
|
||||||
%{_bindir}/emacs-gtk+x11
|
%{_bindir}/emacs-gtk+x11
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with lucid}
|
||||||
%files lucid -f lucid-eln-filelist -f lucid-dirs
|
%files lucid -f lucid-eln-filelist -f lucid-dirs
|
||||||
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
||||||
%{_bindir}/emacs-%{version}-lucid
|
%{_bindir}/emacs-%{version}-lucid
|
||||||
%{_bindir}/emacs-lucid
|
%{_bindir}/emacs-lucid
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with nw}
|
||||||
%files nw -f nw-eln-filelist -f nw-dirs
|
%files nw -f nw-eln-filelist -f nw-dirs
|
||||||
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
%attr(0755,-,-) %ghost %{_bindir}/emacs
|
||||||
%{_bindir}/emacs-%{version}-nox
|
%{_bindir}/emacs-%{version}-nox
|
||||||
%{_bindir}/emacs-%{version}-nw
|
%{_bindir}/emacs-%{version}-nw
|
||||||
%{_bindir}/emacs-nox
|
%{_bindir}/emacs-nox
|
||||||
%{_bindir}/emacs-nw
|
%{_bindir}/emacs-nw
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n emacsclient
|
%files -n emacsclient
|
||||||
%license etc/COPYING
|
%license etc/COPYING
|
||||||
@ -703,5 +760,6 @@ fi
|
|||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/emacs-module.h
|
%{_includedir}/emacs-module.h
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
Loading…
Reference in New Issue
Block a user