spec cleanup

This commit is contained in:
Jan Synacek 2016-01-05 10:42:42 +01:00
parent 1b003d3a54
commit 0dafdeebbc

View File

@ -66,20 +66,9 @@ BuildRequires: gzip
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: libacl-devel BuildRequires: libacl-devel
%if 0%{?rhel} == 6
BuildRequires: gtk2-devel
%else
%if 0%{?rhel} == 7
BuildRequires: gtk3-devel
BuildRequires: python2-devel
# Buildrequire both python2 and python3 on systems containing both,
# since below we turn off the brp-python-bytecompile script
%else
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python3-devel BuildRequires: python3-devel
%endif
%endif
%ifarch %{ix86} %ifarch %{ix86}
BuildRequires: util-linux BuildRequires: util-linux
@ -93,19 +82,10 @@ Requires(posttrans): %{_sbindir}/alternatives
Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: emacs-common = %{epoch}:%{version}-%{release}
Provides: emacs(bin) = %{epoch}:%{version}-%{release} Provides: emacs(bin) = %{epoch}:%{version}-%{release}
%if 0%{!?rhel:1}
# Turn off the brp-python-bytecompile script since this script doesn't # Turn off the brp-python-bytecompile script since this script doesn't
# properly dtect the correct python runtime for the files emacs2.py and # properly dtect the correct python runtime for the files emacs2.py and
# emacs3.py # emacs3.py
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%endif
%define paranoid 1
%if 0%{?fedora}
%define expurgate 0
%else
%define expurgate 1
%endif
%define site_lisp %{_datadir}/emacs/site-lisp %define site_lisp %{_datadir}/emacs/site-lisp
%define site_start_d %{site_lisp}/site-start.d %define site_start_d %{site_lisp}/site-start.d
@ -201,14 +181,8 @@ grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \
&& mv lisp/Makefile.in.new lisp/Makefile.in && mv lisp/Makefile.in.new lisp/Makefile.in
# Avoid trademark issues # Avoid trademark issues
%if %{paranoid}
rm -f lisp/play/tetris.el lisp/play/tetris.elc rm -f lisp/play/tetris.el lisp/play/tetris.elc
rm -f lisp/play/pong.el lisp/play/pong.el rm -f lisp/play/pong.el lisp/play/pong.el
%endif
%if %{expurgate}
rm -f etc/sex.6 etc/condom.1 etc/celibacy.1 etc/COOKIES etc/future-bug etc/JOKES
%endif
%define info_files ada-mode auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq-w32 efaq eieio eintr elisp emacs-gnutls emacs-mime emacs epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info 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 %define info_files ada-mode auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq-w32 efaq eieio eintr elisp emacs-gnutls emacs-mime emacs epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info 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
@ -237,11 +211,7 @@ export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS"
mkdir build-gtk && cd build-gtk mkdir build-gtk && cd build-gtk
ln -s ../configure . ln -s ../configure .
%if 0%{?rhel} == 6
%define toolkit gtk
%else
%define toolkit gtk3 %define toolkit gtk3
%endif
LDFLAGS=-Wl,-z,relro; export LDFLAGS; LDFLAGS=-Wl,-z,relro; export LDFLAGS;
@ -353,13 +323,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
%SOURCE6 %SOURCE6
# Byte compile emacs*.py with correct python interpreters # Byte compile emacs*.py with correct python interpreters
%if 0%{?rhel:1}
rm -f %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py
%else
%py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs.py %py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs.py
%py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs2.py %py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs2.py
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py %py_byte_compile %{__python3} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py
%endif
# #
# Create file lists # Create file lists
@ -437,7 +403,6 @@ update-desktop-database &> /dev/null || :
%{_datadir}/applications/emacs.desktop %{_datadir}/applications/emacs.desktop
%{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/hicolor/*/apps/emacs.png %{_datadir}/icons/hicolor/*/apps/emacs.png
#%{_datadir}/icons/hicolor/*/apps/emacs22.png
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg %{_datadir}/icons/hicolor/scalable/apps/emacs.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg %{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg
@ -455,7 +420,6 @@ update-desktop-database &> /dev/null || :
%{_bindir}/etags.emacs %{_bindir}/etags.emacs
%{_bindir}/gctags %{_bindir}/gctags
%{_bindir}/grep-changelog %{_bindir}/grep-changelog
#%{_bindir}/rcs-checkin
%{_mandir}/*/* %{_mandir}/*/*
%{_infodir}/* %{_infodir}/*
%dir %{_datadir}/emacs/%{version} %dir %{_datadir}/emacs/%{version}