I would like to adopt and update desktop-file-utils as it validates
former mime-types now media-types, and does not even support fonts,
issuing errors during setup:

Error in file "/usr/share/applications/org.fontforge.FontForge.desktop":
"font/otf" is an invalid MIME type ("font" is an unregistered media type)
Error in file "/usr/share/applications/org.fontforge.FontForge.desktop":
"font/ttf" is an invalid MIME type ("font" is an unregistered media type)
Error in file "/usr/share/applications/org.fontforge.FontForge.desktop":
"font/woff" is an invalid MIME type ("font" is an unregistered media type)
Error in file "/usr/share/applications/org.fontforge.FontForge.desktop":
"font/woff2" is an invalid MIME type ("font" is an unregistered media type)

Build has been changed from autotools (no longer supported) to meson.
I would like advice on how to name and where to install the emacs files,
as the Fedora spec (in Cygport comments) desktop-file-utils differs from
our previous name desktop-entry-mode.

Description:
Desktop files describe applications to show in GNOME or KDE menus:
desktop-file-validate checks whether a .desktop file complies with the
specification at http://www.freedesktop.org/standards/;
desktop-file-install installs a .desktop file to the standard directory,
optionally fixing it up in the process.

License:        GPL-2.0-or-later

For more info see the project home page:

        https://freedesktop.org/wiki/Software/desktop-file-utils

Attached cygport and at:

https://cygwin.com/cgit/cygwin-packages/desktop-file-utils/tree/desktop-file-utils.cygport?h=playground

package build:

        https://cygwin.com/cgi-bin2/jobs.cgi?srcpkg=desktop-file-utils

log at:

https://github.com/cygwin/scallywag/actions/runs/10857533685/job/30134155527


For changes since the previous Cygwin release see below:

2023-10-05      0.27

common

- Remove Autotools support.
- Minor updates to project documentation.
- Add pledge(2) support to remaining utilities
- Add --version support to utilities

desktop-file-validate

- Support desktop spec version 1.5
- Add LXQt to categories
- Use DDE category for Deepin desktop
- Add Endless to list of desktop IDs
- Fix field code escaping in messages

desktop-entry-mode.el

- Highlight action groups when ID includes hyphens


2020-06-19      0.26

This version fixes an error that snuck into the Meson build files in
version 0.25. The Autotools build is unaffected. Since the previous
release has only been out for a day, Autotools support is maintained in
this release.

update-desktop-database

- Fix erroneous installation as "desktop-file-update" when using the
  Meson build system


2020-06-18      0.25

This version adds support for the Meson build system and deprecates
Autotools. Support for the latter will be removed in the next release.

common

- Add Meson build system

desktop-file-validate

- Allow desktop file spec version 1.4.
- Make it possible to deprecate keys starting with "X-"
- Add the "Implements" field from spec version 1.2
- Add the "PrefersNonDefaultGPU" key and deprecate "X-KDE-RunOnDiscreteGpu"
- Set locale for correct output message encoding
- Add coloured output support
- Fix parsing of escaped double quote in quoted strings
- Add GNOME Flashback, GNOME Classic desktops


2019-07-25      0.24

desktop-file-validate

- Allow desktop file spec version 1.2
- Add Budgie, Deepin, Enlightenment and Pantheon to list of
  registered desktop environments

update-desktop-database

- Sort output lines internally to conserve reproduceability
- Use pledge(2) on OpenBSD to limit capabilities

common

- Fix missing ; when appending to a list not ending with one
- Add font as valid media type
- Fix broken emacs blocking compile
#|/usr/bin/cygport
# desktop-file-utils.cygport - desktop-file-utils Cygwin package build control 
script definitions

NAME=desktop-file-utils
VERSION=0.27
RELEASE=1

CATEGORY="X11 Utils"
SUMMARY="utilities for manipulating desktop files"
DESCRIPTION="Desktop files describe applications to show in GNOME or KDE menus:
desktop-file-validate checks whether a .desktop file complies with the
specification at http://www.freedesktop.org/standards/;
desktop-file-install installs a desktop file to the standard directory,
optionally fixing it up in the process."

HOMEPAGE=https://freedesktop.org/wiki/Software/desktop-file-utils
SRC_URI=https://freedesktop.org/software/$NAME/releases/$NAME-$VERSION.tar.xz
SRC_URI+=" $SRC_URI.asc"        # $SRC_URI.sha256sum 

LICENSE=GPL-2.0-or-later
LICENSE_URI=COPYING

DOCS="AUTHORS README NEWS $LICENSE_URI"

BUILD_REQUIRES="libglib2.0-devel libintl-devel emacs meson ninja pkg-config"

desktop_file_utils_CONTENTS="
        etc/postinstall/zp_$NAME.sh
        etc/preremove/$NAME.sh
        usr/bin/
        usr/share/doc/$NAME/
        usr/share/emacs/site-lisp/desktop-entry-mode.*
        usr/share/man/man1/desktop-file-*.1*
        usr/share/man/man1/update-desktop-database.1*
"
# %{_emacs_sitelispdir}/desktop-file-utils/

inherit meson

CYGMESON_ARGS=

# mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/desktop-file-utils
# mv $RPM_BUILD_ROOT%{_emacs_sitelispdir}/*.el* 
$RPM_BUILD_ROOT%{_emacs_sitelispdir}/desktop-file-utils
# install -Dpm 644 %{SOURCE1} 
$RPM_BUILD_ROOT%{_emacs_sitestartdir}/desktop-entry-mode-init.el
# touch $RPM_BUILD_ROOT%{_emacs_sitestartdir}/desktop-entry-mode-init.elc

src_install() {
        local mimeinfo_cache=/usr/share/applications/mimeinfo.cache

        cd $S
        meson_install

        dodir /etc/postinstall /etc/preremove

        cat > ${D}/etc/postinstall/zp_$NAME.sh <<EOF
if [ ! -f $mimeinfo_cache ]
then
    /usr/bin/update-desktop-database ${mimeinfo_cache%/*}
fi
find ${mimeinfo_cache%/*} -name '*.desktop' -cnewer $mimeinfo_cache -exec 
/usr/bin/update-desktop-database ${mimeinfo_cache%/*} \;
EOF
        cat > ${D}/etc/preremove/$NAME.sh <<EOF
rm -f $mimeinfo_cache
EOF

        chmod +x ${D}/etc/{postinstall,preremove}/*.sh
}

Reply via email to