From ed2bdfe8393fcc8aa408a698b7b95e4052d29731 Mon Sep 17 00:00:00 2001 From: asmeron Date: Tue, 10 Mar 2026 12:32:38 +0600 Subject: [PATCH] Fix Makefile --- Makefile | 20 ++++++++++++++++---- locale/kernel-list-addon.pot | 19 +++++++++++++++++++ locale/kernel-list-addon_ru.po | 20 ++++++++++---------- locale/kernel-list.pot | 19 +++++++++++++++++++ locale/kernel-list_ru.po | 20 ++++++++++---------- 5 files changed, 74 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index cb110e5..a3c3bc4 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ build: depend prepare uninstall: @echo "Uninstall ..." @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ -# PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ +# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ $(RM) "$${PATH_FILE_MO}"; \ done @@ -96,7 +96,12 @@ uninstall: done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" - @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy" + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \ + else \ +# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi @if [[ -z "${DESTDIR}" ]]; then \ [[ -d "${DESTDIR}/usr/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ @@ -115,6 +120,7 @@ install: check uninstall done @for SIZE in 16 32 48; do \ install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ +# rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done @for FILE_ICON in $(wildcard icons/*/*.svg); do \ @@ -123,8 +129,14 @@ install: check uninstall done @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy" - @sed -e "s+/usr/bin+/usr/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy" + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \ + else \ +# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ +# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + sed -e "s+/usr/bin+/usr/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi @if [[ -z "${DESTDIR}" ]]; then \ ldconfig -n ${DESTDIR}/usr/lib; \ [ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \ diff --git a/locale/kernel-list-addon.pot b/locale/kernel-list-addon.pot index 8b990e7..e4faae7 100644 --- a/locale/kernel-list-addon.pot +++ b/locale/kernel-list-addon.pot @@ -1,3 +1,22 @@ +# Language translations for ubl-settings-kernel package. +# Copyright (C) 2025, UBTech LLC +# This file is distributed under the same license as the ubl-settings-kernel.kernel-list-addon.csv package. +# UBLinux Team , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ubl-settings-kernel 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-05-22 16:12+0600\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + #: ./kernel-list-addon.csv:2 msgid "The Linux kernel headers v5.15" msgstr "" diff --git a/locale/kernel-list-addon_ru.po b/locale/kernel-list-addon_ru.po index 968027e..183c4c2 100644 --- a/locale/kernel-list-addon_ru.po +++ b/locale/kernel-list-addon_ru.po @@ -1,18 +1,18 @@ -# Language translations for ubinstal package. -# Copyright (C) 2022, UBTech LLC -# This file is distributed under the same license as the ubinstal package. -# UBLinux Team , 2022 +# Russian translations for ubl-settings-kernel package. +# Copyright (C) 2025, UBTech LLC +# This file is distributed under the same license as the ubl-settings-kernel package. +# UBLinux Team , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ubinstal 1.0\n" +"Project-Id-Version: ubl-settings-kernel 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-22 16:12+0600\n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: \n" +"POT-Creation-Date: 2025-05-22 16:12+0600\n" +"PO-Revision-Date: 2025-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: Russian - UBLinux Team \n" +"Language: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/locale/kernel-list.pot b/locale/kernel-list.pot index 55b11f5..568b188 100644 --- a/locale/kernel-list.pot +++ b/locale/kernel-list.pot @@ -1,3 +1,22 @@ +# Language translations for ubl-settings-kernel package. +# Copyright (C) 2025, UBTech LLC +# This file is distributed under the same license as the ubl-settings-kernel.kernel-list.csv package. +# UBLinux Team , 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ubl-settings-kernel 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-05-22 16:12+0600\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + #: ./kernel-list.csv:1 msgid "DESCRIPTION" msgstr "" diff --git a/locale/kernel-list_ru.po b/locale/kernel-list_ru.po index 2eeb5fb..7c47e3c 100644 --- a/locale/kernel-list_ru.po +++ b/locale/kernel-list_ru.po @@ -1,18 +1,18 @@ -# Language translations for ubinstal package. -# Copyright (C) 2022, UBTech LLC -# This file is distributed under the same license as the ubinstal package. -# UBLinux Team , 2022 +# Russian translations for ubl-settings-kernel package. +# Copyright (C) 2025, UBTech LLC +# This file is distributed under the same license as the ubl-settings-kernel package. +# UBLinux Team , 2025 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ubinstal 1.0\n" +"Project-Id-Version: ubl-settings-kernel 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-22 16:12+0600\n" -"PO-Revision-Date: \n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: \n" +"POT-Creation-Date: 2025-05-22 16:12+0600\n" +"PO-Revision-Date: 2025-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: Russian - UBLinux Team \n" +"Language: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n"