diff --git a/flameshot.pro b/flameshot.pro index 1d21c26c..30289cee 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -199,36 +199,38 @@ RESOURCES += \ # installs unix:!macx { - packaging { - USRPATH = /usr - } else { - USRPATH = /usr/local + isEmpty(PREFIX) { + packaging { + PREFIX = /usr + } else { + PREFIX = /usr/local + } } - target.path = $${BASEDIR}$${USRPATH}/bin/ + target.path = $${BASEDIR}$${PREFIX}/bin/ - qmfile.path = $${BASEDIR}/usr/share/flameshot/translations/ + qmfile.path = $${BASEDIR}$${PREFIX}/share/flameshot/translations/ qmfile.files = $${TRANSLATIONS_FILES} - dbus.path = $${BASEDIR}/usr/share/dbus-1/interfaces/ + dbus.path = $${BASEDIR}$${PREFIX}/share/dbus-1/interfaces/ dbus.files = dbus/org.dharkael.Flameshot.xml - icon.path = $${BASEDIR}$${USRPATH}/share/icons/ + icon.path = $${BASEDIR}$${PREFIX}/share/icons/ icon.files = img/flameshot.png - completion.path = /usr/share/bash-completion/completions/ + completion.path = $${BASEDIR}$${PREFIX}/share/bash-completion/completions/ completion.files = docs/bash-completion/flameshot - desktopentry.path = $${BASEDIR}$${USRPATH}/share/applications + desktopentry.path = $${BASEDIR}$${PREFIX}/share/applications desktopentry.files = docs/desktopEntry/package/flameshot.desktop - desktopentryinit.path = $${BASEDIR}$${USRPATH}/share/applications + desktopentryinit.path = $${BASEDIR}$${PREFIX}/share/applications desktopentryinit.files = docs/desktopEntry/package/flameshot-init.desktop - desktopentryconfig.path = $${BASEDIR}$${USRPATH}/share/applications + desktopentryconfig.path = $${BASEDIR}$${PREFIX}/share/applications desktopentryconfig.files = docs/desktopEntry/package/flameshot-config.desktop - servicedbus.path = $${BASEDIR}/usr/share/dbus-1/services/ + servicedbus.path = $${BASEDIR}$${PREFIX}/share/dbus-1/services/ packaging { servicedbus.files = dbus/package/org.dharkael.Flameshot.service } else {