diff --git a/Makefile b/Makefile index 7ddaa26..39c6a5d 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,8 @@ CMAKE_COMMAND = cmake CMAKE_SOURCE_DIR = ./source CMAKE_BUILD_DIR = ./compile DEPENDS = cmake -PKGNAME = $(MAKEFILE_DIR) -#PKGNAME = ubl-settings-datetime +pkgname = $(MAKEFILE_DIR) +#pkgname = ubl-settings-datetime pkgdir = default_target: all @@ -48,10 +48,10 @@ prepare: check: @echo "Check ..."; \ - if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \ + if [ -f ${CMAKE_BUILD_DIR}/${pkgname} ]; then \ echo "Check: OK"; \ else \ - echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not fount !"; \ + echo "Check: ${CMAKE_BUILD_DIR}/${pkgname} not fount !"; \ exit 1; \ fi @@ -69,18 +69,18 @@ uninstall: $(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ done @for SIZE in 16x16 32x32 48x48 scalable; do \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.svg"; \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.png"; \ + $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.svg"; \ + $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${pkgname}.png"; \ done @for FILE_SVG in $(wildcard *.svg); do \ for SIZE in 16x16 32x32 48x48 scalable; do \ $(RM) "/usr/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done - @$(RM) "/usr/bin/${PKGNAME}" - @$(RM) "/usr/share/applications/${PKGNAME}.desktop" - @$(RM) "/usr/share/polkit-1/actions/ru.ublinux.pkexec.${PKGNAME}.exec.policy" - @$(RM) -rd "/usr/share/${PKGNAME}" + @$(RM) "/usr/bin/${pkgname}" + @$(RM) "/usr/share/applications/${pkgname}.desktop" + @$(RM) "/usr/share/polkit-1/actions/ru.ublinux.pkexec.${pkgname}.exec.policy" + @$(RM) -rd "/usr/share/${pkgname}" @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications @@ -98,19 +98,19 @@ install: check uninstall done @for SIZE in 16 32 48; do \ install -dm755 "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data ${PKGNAME}.svg -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.png"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data ${pkgname}.svg -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${pkgname}.png"; \ done @install -dm755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "${PKGNAME}.svg" - @install -Dm755 -t "${pkgdir}/usr/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" - @install -Dm644 -t "${pkgdir}/usr/share/applications/" "${PKGNAME}.desktop" - @install -Dm644 -t "${pkgdir}/usr/share/polkit-1/actions/" "ru.ublinux.pkexec.${PKGNAME}.exec.policy" - @install -dm755 "${pkgdir}/usr/share/${PKGNAME}"/{ui,images,css} - @install -Dm644 -t "${pkgdir}/usr/share/${PKGNAME}/ui/" "${PKGNAME}.glade" - @install -Dm644 -t "${pkgdir}/usr/share/${PKGNAME}/css/" style.css - @install -Dm644 -t "${pkgdir}/usr/share/${PKGNAME}/images/" "${PKGNAME}.svg" - @install -Dm644 -t "${pkgdir}/usr/share/${PKGNAME}/images/" "${PKGNAME}.png" - @install -Dm644 -t "${pkgdir}/usr/share/${PKGNAME}/images/" bg_top.png + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "${pkgname}.svg" + @install -Dm755 -t "${pkgdir}/usr/bin/" "${CMAKE_BUILD_DIR}/${pkgname}" + @install -Dm644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop" + @install -Dm644 -t "${pkgdir}/usr/share/polkit-1/actions/" "ru.ublinux.pkexec.${pkgname}.exec.policy" + @install -dm755 "${pkgdir}/usr/share/${pkgname}"/{ui,images,css} + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/ui/" "${pkgname}.glade" + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/css/" style.css + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.svg" + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.png" + @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" bg_top.png @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications