Permalink
Browse files

Use ${datarootdir} instead of ${datadir} for data files that go

in directories which are shared with other apps. In practical
terms, this doesn't change anything for most users since
${datarootdir} and ${datadir} are the same by default. But this
is useful for distros/OSes which like to store the application
specific files somewhere else then at the root of /usr/share.
Changes to allow this in audacious-plugins will follow.

	modified:   Makefile
	modified:   configure.ac
	modified:   pixmaps/Makefile
	modified:   src/audacious/Makefile
  • Loading branch information...
1 parent 7c714a8 commit 4bbeba0d0723986c8adc29b2bda047421eeba86f Christoph J. Thompson committed Jan 31, 2013
Showing with 13 additions and 13 deletions.
  1. +3 −3 Makefile
  2. +3 −3 configure.ac
  3. +6 −6 pixmaps/Makefile
  4. +1 −1 src/audacious/Makefile
View
@@ -17,7 +17,7 @@ install-extra:
done
for i in audacious.desktop; do \
${INSTALL_STATUS}; \
- if ${MKDIR_P} ${DESTDIR}${datadir}/applications && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/applications/$$i; then \
+ if ${MKDIR_P} ${DESTDIR}${datarootdir}/applications && ${INSTALL} -m 644 $$i ${DESTDIR}${datarootdir}/applications/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
@@ -38,8 +38,8 @@ uninstall-extra:
fi; \
done
for i in audacious.desktop; do \
- if test -f ${DESTDIR}${datadir}/applications/$$i; then \
- if rm -f ${DESTDIR}${datadir}/applications/$$i; then \
+ if test -f ${DESTDIR}${datarootdir}/applications/$$i; then \
+ if rm -f ${DESTDIR}${datarootdir}/applications/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
View
@@ -247,16 +247,16 @@ if test -z "$datadir"; then
datadir="${prefix}/share"
fi
-localedir="$datadir/locale"
+localedir="$datarootdir/locale"
AC_SUBST([localedir])
AUDACIOUS_DEFINES="-DPLUGINSUBS=$pluginsubs"
AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_BINDIR=\\\"$bindir\\\""
AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_DATADIR=\\\"$datadir/audacious\\\""
AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_PLUGINDIR=\\\"$plugindir\\\""
AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_LOCALEDIR=\\\"$localedir\\\""
-AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_DESKTOPFILE=\\\"${datadir}/applications/audacious.desktop\\\""
-AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_ICONFILE=\\\"${datadir}/pixmaps/audacious.png\\\""
+AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_DESKTOPFILE=\\\"${datarootdir}/applications/audacious.desktop\\\""
+AUDACIOUS_DEFINES="$AUDACIOUS_DEFINES -DHARDCODE_ICONFILE=\\\"${datarootdir}/pixmaps/audacious.png\\\""
AC_SUBST([AUDACIOUS_DEFINES])
View
@@ -1,11 +1,11 @@
include ../buildsys.mk
install-extra:
- ${MKDIR_P} ${DESTDIR}${datadir}/icons/hicolor/48x48/apps
- ${MKDIR_P} ${DESTDIR}${datadir}/icons/hicolor/scalable/apps
- ${INSTALL} -m 644 audacious.png "${DESTDIR}${datadir}/icons/hicolor/48x48/apps/audacious.png"
- ${INSTALL} -m 644 audacious.svg "${DESTDIR}${datadir}/icons/hicolor/scalable/apps/audacious.svg"
+ ${MKDIR_P} ${DESTDIR}${datarootdir}/icons/hicolor/48x48/apps
+ ${MKDIR_P} ${DESTDIR}${datarootdir}/icons/hicolor/scalable/apps
+ ${INSTALL} -m 644 audacious.png "${DESTDIR}${datarootdir}/icons/hicolor/48x48/apps/audacious.png"
+ ${INSTALL} -m 644 audacious.svg "${DESTDIR}${datarootdir}/icons/hicolor/scalable/apps/audacious.svg"
uninstall-extra:
- if test -f "${DESTDIR}${datadir}/icons/hicolor/48x48/apps/audacious.png" ; then ${RM} "${DESTDIR}${datadir}/icons/hicolor/48x48/apps/audacious.png" ; fi
- if test -f "${DESTDIR}${datadir}/icons/hicolor/scalable/apps/audacious.svg" ; then ${RM} "${DESTDIR}${datadir}/icons/hicolor/scalable/apps/audacious.svg" ; fi
+ if test -f "${DESTDIR}${datarootdir}/icons/hicolor/48x48/apps/audacious.png" ; then ${RM} "${DESTDIR}${datarootdir}/icons/hicolor/48x48/apps/audacious.png" ; fi
+ if test -f "${DESTDIR}${datarootdir}/icons/hicolor/scalable/apps/audacious.svg" ; then ${RM} "${DESTDIR}${datarootdir}/icons/hicolor/scalable/apps/audacious.svg" ; fi
View
@@ -122,7 +122,7 @@ DBUS_BINDINGS_SOURCES = objects.xml \
mpris_player.xml
desktop_DATA = audacious.desktop
-desktopdir = ${datadir}/applications
+desktopdir = ${datarootdir}/applications
dbus-server-bindings.h: ${DBUS_BINDINGS_SOURCES}
${DBUS_BINDING_TOOL} --mode=glib-server --prefix=audacious_rc objects.xml > $@

0 comments on commit 4bbeba0

Please sign in to comment.