[beast: 31/41] DATA: install links into standard filesystem hierarchy, update desktop database
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 31/41] DATA: install links into standard filesystem hierarchy, update desktop database
- Date: Fri, 16 Jun 2017 10:25:24 +0000 (UTC)
commit 96516e6250f15427685626c1befa8db3cb7c6fcf
Author: Tim Janik <timj gnu org>
Date: Wed Jun 14 21:32:52 2017 +0200
DATA: install links into standard filesystem hierarchy, update desktop database
Signed-off-by: Tim Janik <timj gnu org>
configure.ac | 1 +
data/Makefile.am | 33 ++++++++++++++++++++++++++++++---
2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b8ed1ad..b1f2f90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -660,6 +660,7 @@ AC_DEFUN([MC_DOC_REQUIREMENTS],
# find installation utilities
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database)
+AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database)
dnl # MC_PYTHON_REQUIREMENTS() - python checks
AC_DEFUN([MC_PYTHON_REQUIREMENTS],
diff --git a/data/Makefile.am b/data/Makefile.am
index 58d4399..fec9f73 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -81,8 +81,35 @@ EXTRA_DIST += $(dotapplications_DATA)
# mime_types=...,audio/mp1,audio/x-mp1,audio/mpg1,audio/x-mpg1,audio/mpeg1,audio/x-mpeg1
# mime_types=...,audio/mpeg,audio/x-mpeg
-# update mime database according to: http://www.freedesktop.org/Standards/shared-mime-info-spec
+# $(call INSTALL_SYMLINK, TARGET, LINKNAME) - install symbolic link to target file
+INSTALL_SYMLINK = ( d=$$(dirname $(2)) && set -x && rm -f $(2) && $(MKDIR_P) "$$d" && ln -s $(1) $(2) )
+
+# Create links into standard filesystem hierarchy (FHS) and update system databases
+# * https://www.freedesktop.org/wiki/Howto_desktop_files/
+# * https://www.freedesktop.org/Standards/shared-mime-info-spec
install-data-hook:
- test -z "$(UPDATE_MIME_DATABASE)" || $(UPDATE_MIME_DATABASE) "$(DESTDIR)${sharedmimedir}";
+ @$(call INSTALL_SYMLINK, '$(beastmandir)/man1/beast.1', '$(DESTDIR)$(mandir)/man1/beast.1')
+ @$(call INSTALL_SYMLINK, '$(beastmandir)/man1/bsewavetool.1',
'$(DESTDIR)$(mandir)/man1/bsewavetool.1')
+ @$(call INSTALL_SYMLINK, '$(beastmandir)/man5/bse.5', '$(DESTDIR)$(mandir)/man5/bse.5')
+ @$(call INSTALL_SYMLINK, '$(sharedpixmapsdir)/beast.png',
'$(DESTDIR)$(datarootdir)/pixmaps/beast.png')
+ @$(call INSTALL_SYMLINK, '$(sharedpixmapsdir)/beast-audio-x-bse.png',
'$(DESTDIR)$(datarootdir)/pixmaps/beast-audio-x-bse.png')
+ @$(call INSTALL_SYMLINK, '$(dotdesktopdir)/beast.desktop',
'$(DESTDIR)$(datarootdir)/applications/beast.desktop')
+ @$(call INSTALL_SYMLINK, '$(dotapplicationsdir)/beast.applications',
'$(DESTDIR)$(datarootdir)/application-registry/beast.applications')
+ @$(call INSTALL_SYMLINK, '$(sharedmimepackagedir)/beast.xml',
'$(DESTDIR)$(datarootdir)/mime/packages/beast.xml')
+ @$(call INSTALL_SYMLINK, '$(beastbindir)/beast', '$(DESTDIR)$(bindir)/beast')
+ @set -x && test -z '$(UPDATE_DESKTOP_DATABASE)' || $(UPDATE_DESKTOP_DATABASE)
'$(DESTDIR)${dotdesktopdir}';
+ @set -x && test -z '$(UPDATE_MIME_DATABASE)' || $(UPDATE_MIME_DATABASE) '$(DESTDIR)${sharedmimedir}';
+beastmandir = ${beastsharedir}/man
+
uninstall-local: uninstall-sharedmimepackageDATA
- test -z "$(UPDATE_MIME_DATABASE)" || $(UPDATE_MIME_DATABASE) "$(DESTDIR)${sharedmimedir}";
+ rm -f '$(DESTDIR)$(mandir)/man1/beast.1'
+ rm -f '$(DESTDIR)$(mandir)/man1/bsewavetool.1'
+ rm -f '$(DESTDIR)$(mandir)/man5/bse.5'
+ rm -f '$(DESTDIR)$(datarootdir)/pixmaps/beast.png'
+ rm -f '$(DESTDIR)$(datarootdir)/pixmaps/beast-audio-x-bse.png'
+ rm -f '$(DESTDIR)$(datarootdir)/applications/beast.desktop'
+ rm -f '$(DESTDIR)$(datarootdir)/application-registry/beast.applications'
+ rm -f '$(DESTDIR)$(datarootdir)/mime/packages/beast.xml'
+ rm -f '$(DESTDIR)$(bindir)/beast'
+ @set -x && test -z '$(UPDATE_DESKTOP_DATABASE)' || $(UPDATE_DESKTOP_DATABASE)
'$(DESTDIR)${dotdesktopdir}';
+ @set -x && test -z '$(UPDATE_MIME_DATABASE)' || $(UPDATE_MIME_DATABASE) '$(DESTDIR)${sharedmimedir}';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]