diff options
author | JinWang An <jinwang.an@samsung.com> | 2020-09-22 01:17:27 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2020-11-23 15:12:09 +0900 |
commit | 235bc4c36205313621fbf333c6b2663a21f4143d (patch) | |
tree | 289302698e83b8e07031bbda1f29768989928e23 | |
parent | 965f36664defcfd645c6d053d04e3224d868de18 (diff) | |
download | desktop-file-utils-tizen_7.0.tar.gz desktop-file-utils-tizen_7.0.tar.bz2 desktop-file-utils-tizen_7.0.zip |
Bump to desktop-file-utils 0.26tizen_8.0_m2_releasetizen_7.0_m2_releasetizen_6.5.m2_releasesubmit/tizen_base/20201123.075843submit/tizen_base/20201123.075413submit/tizen_base/20201123.074701submit/tizen_base/20201123.064008submit/tizen_base/20201123.062817submit/tizen_6.5/20211028.163301submit/tizen/20201124.025026accepted/tizen/unified/20201125.124021accepted/tizen/8.0/unified/20231005.094751accepted/tizen/7.0/unified/hotfix/20221116.110708accepted/tizen/7.0/unified/20221110.062006accepted/tizen/6.5/unified/20211028.225608tizen_basetizen_8.0tizen_7.0_hotfixtizen_7.0tizen_6.5sandbox/jinwang.an/desktop-file-utils_0.26_20200915sandbox/backup/desktop-file-utils_0.26_20231207accepted/tizen_8.0_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unifiedaccepted/tizen_6.5_unified
Change-Id: I1823f3b6a625be33704e8a1dc52f61605e2a8d38
Signed-off-by: JinWang An <jinwang.an@samsung.com>
-rw-r--r-- | packaging/desktop-file-utils.manifest | 5 | ||||
-rw-r--r-- | packaging/desktop-file-utils.spec | 65 | ||||
-rw-r--r-- | packaging/macros.desktop-file-utils | 38 |
3 files changed, 108 insertions, 0 deletions
diff --git a/packaging/desktop-file-utils.manifest b/packaging/desktop-file-utils.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/desktop-file-utils.manifest @@ -0,0 +1,5 @@ +<manifest> + <request> + <domain name="_"/> + </request> +</manifest> diff --git a/packaging/desktop-file-utils.spec b/packaging/desktop-file-utils.spec new file mode 100644 index 0000000..30aa6cc --- /dev/null +++ b/packaging/desktop-file-utils.spec @@ -0,0 +1,65 @@ +Name: desktop-file-utils +Version: 0.26 +Release: 0 +Summary: Utilities for Manipulating Desktop Files +License: GPL-2.0+ +Group: Development/Tools/Other +Url: http://www.freedesktop.org/wiki/Software/desktop-file-utils +Source0: http://www.freedesktop.org/software/desktop-file-utils/releases/%{name}-%{version}.tar.xz +Source2: macros.desktop-file-utils +Source1001: desktop-file-utils.manifest +BuildRequires: glib2-devel +BuildRequires: pkg-config +BuildRequires: meson +BuildRequires: ninja +# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467 +BuildRequires: xz + +%description +This packages contains a couple of command line utilities for +working with desktop files. + +More information about desktop files can be found at: +http://freedesktop.org/wiki/Specifications/desktop-entry-spec + +%prep +%setup -q +cp %{SOURCE1001} . + +%build +export CFLAGS+=" -fPIC" + +mkdir -p builddir +meson --prefix /usr --libdir %{_libdir} builddir + +%install +DESTDIR=%{buildroot} ninja -C builddir install +# Install rpm macros +install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.desktop-file-utils +# Create ghosts based on default $XDG_DATA_DIRS: +mkdir -p %{buildroot}%{_datadir}/applications +touch %{buildroot}%{_datadir}/applications/mimeinfo.cache + +%post +%{_bindir}/update-desktop-database --quiet %{_datadir}/applications || true + +%files +%manifest %{name}.manifest +%defattr(-, root, root) +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/desktop-file-edit +%{_bindir}/desktop-file-install +%{_bindir}/desktop-file-validate +%{_bindir}/update-desktop-database +%ghost %{_datadir}/applications/mimeinfo.cache +%{_mandir}/man1/desktop-file-edit.1* +%{_mandir}/man1/desktop-file-install.1* +%{_mandir}/man1/desktop-file-validate.1* +%{_mandir}/man1/update-desktop-database.1* +# Own directories to not require emacs installed. +%dir %{_datadir}/emacs +%dir %{_datadir}/emacs/site-lisp +%{_datadir}/emacs/site-lisp/*.el* +%{_sysconfdir}/rpm/macros.desktop-file-utils + diff --git a/packaging/macros.desktop-file-utils b/packaging/macros.desktop-file-utils new file mode 100644 index 0000000..19266d4 --- /dev/null +++ b/packaging/macros.desktop-file-utils @@ -0,0 +1,38 @@ +# RPM macros for packages installing desktop files +# +### +# +# When a package installs a desktop file, it should use both macros: +# +# - %desktop_database_post in %post +# - %desktop_database_postun in %postun +# +# Note that these macros can optionally take as argument the directory +# where the desktop file is installed. If no argument is passed, then +# %{_datadir}/applications will be used (which is where applications +# usually install their desktop file). +# +### + +# On install, update the desktop database +%desktop_database_post() \ +if test -x %{_bindir}/update-desktop-database; then \ +%if "x%1" != "x%%1" \ + %{_bindir}/update-desktop-database --quiet "%1" || true \ +%else \ + %{_bindir}/update-desktop-database --quiet "%{_datadir}/applications" || true \ +%endif \ +fi + +# On uninstall, update the desktop database. Note: we ignore upgrades (already +# handled in %post of the new package). +%desktop_database_postun() \ +if [ $1 -eq 0 ]; then \ + if test -x %{_bindir}/update-desktop-database; then \ +%if "x%1" != "x%%1" \ + %{_bindir}/update-desktop-database --quiet "%1" || true \ +%else \ + %{_bindir}/update-desktop-database --quiet "%{_datadir}/applications" || true \ +%endif \ + fi \ +fi |