diff --git a/Makefile b/Makefile index 16a820e..60ab651 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ DEPENDS = /bin/cmake PREFIX ?= /usr/local PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/${PKGNAME}.h -PKGIDENT=$(subst /,-,${PREFIX}) +PKGIDENT = $(subst /,-,$(subst /usr,,${PREFIX})) default_target: all @@ -124,7 +124,8 @@ install: check uninstall @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" - @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy" + @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" + @sed -e '\|annotate key=|s|/usr/bin|${PREFIX}/bin|' -e '/action id=/s/\.run/${PKGIDENT}\.run/' -i ${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ @@ -147,7 +148,7 @@ help: echo "... init"; \ echo "... debug"; \ echo "... prepare"; \ - echo "... compile"; \ + echo "... build"; \ echo "... install"; \ echo "... uninstall"; \ echo "... clean" \ No newline at end of file