#9 Prefer upstream emacs.desktop
Merged 2 years ago by defolos. Opened 3 years ago by mavit.
rpms/ mavit/emacs dot-desktop  into  rawhide

file removed
-12
@@ -1,12 +0,0 @@ 

- [Desktop Entry]

- Name=Emacs

- GenericName=Text Editor

- Comment=Edit text

- Comment[zh_TW]=編輯文字

- MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

- Exec=emacs %f

- Icon=emacs

- Type=Application

- Terminal=false

- Categories=Utility;TextEditor;X-Red-Hat-Base;

- StartupWMClass=Emacs

file modified
+11 -11
@@ -5,7 +5,7 @@ 

  Name:          emacs

  Epoch:         1

  Version:       27.2

- Release:       3%{?dist}

+ Release:       4%{?dist}

  License:       GPLv3+ and CC0-1.0

  URL:           http://www.gnu.org/software/emacs/

  Source0:       https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz
@@ -14,7 +14,6 @@ 

  # wget https://ftp.gnu.org/gnu/gnu-keyring.gpg

  # gpg2 --keyring ./gnu-keyring.gpg --armor --export E6C9029C363AD41D787A8EBB91C1262F01EB8D39 > gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg

  Source2:       gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg

- Source3:       emacs.desktop

  Source4:       dotemacs.el

  Source5:       site-start.el

  Source6:       default.el
@@ -196,9 +195,6 @@ 

  %patch5 -p1

  autoconf

  

- # We prefer our emacs.desktop file

- cp %SOURCE3 etc/emacs.desktop

- 

  grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \

     && mv lisp/Makefile.in.new lisp/Makefile.in

  grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \
@@ -368,16 +364,13 @@ 

  # After everything is installed, remove info dir

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

  

- # Remove duplicate emacs.service file

- rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.service

- 

  # Install desktop files

- mkdir -p %{buildroot}%{_datadir}/applications

- desktop-file-install --dir=%{buildroot}%{_datadir}/applications \

-                      %SOURCE3

  desktop-file-install --dir=%{buildroot}%{_datadir}/applications \

                       %SOURCE7

  

+ # Remove duplicate desktop-related files

+ rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.{desktop,service}

+ 

  #

  # Create file lists

  #
@@ -400,6 +393,9 @@ 

  # Remove old icon

  rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg

  

+ %check

+ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop

+ 

  %preun

  %{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}

  
@@ -485,6 +481,10 @@ 

  %{_includedir}/emacs-module.h

  

  %changelog

+ * Tue May 25 2021 Peter Oliver <rpm@mavit.org.uk> - 1:27.2-4

+ - Prefer upstream emacs.desktop.

+ - Remove duplicate emacs.desktop from /usr/share/emacs/27.2/etc/.

+ 

  * Mon Apr 26 2021 Dan Čermák <dan.cermak@cgc-instruments.com> - 1:27.2-3

  - Add emacs-modula2.patch

  - Fixes rhbz#1950158

The upstream emacs.desktop looks fine to me, so I don’t think we need to maintain our own.

While we're here, remove the duplicate emacs.desktop from /usr/share/emacs/27.2/etc/.

The upstream emacs.desktop looks fine to me, so I don’t think we need to maintain our own.

They are basically equal ;-)

While we're here, remove the duplicate emacs.desktop from /usr/share/emacs/27.2/etc/.

Thanks!

I'd merge this unless there are any objections? If you could add the desktop file validation, that'd be great, but I can do that later myself.

1 new commit added

  • Validate .desktop files.
2 years ago

I've added the desktop file validation. I notice we're also missing metainfo validation, which I'll add in another pull request.

Awesome, thanks a lot!

Pull-Request has been merged by defolos

2 years ago
Metadata