Merge pull request '[package] update' (#2) from Applications/ubl-settings-datetime:develop into develop

Reviewed-on: Igor1/ubl-settings-datetime#2
pull/99/head
Igor Belitskiy 3 years ago
commit 003b8c96b1

@ -1,5 +1,4 @@
#!/usr/bin/make -f
#!/usr/bin/make -f
#SHELL := /bin/bash
MAKEFILE_FILEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
@ -7,52 +6,58 @@ MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH))))
MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH))
CMAKE_COMMAND = cmake
#CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
#CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
CMAKE_SOURCE_DIR = ./source
CMAKE_BUILD_DIR = ./compile
DEPENDS = cmake
pkgname = $(MAKEFILE_DIR)
#pkgname = ubl-settings-datetime
pkgdir =
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
#CMAKE_SOURCE_DIR = ./source
#CMAKE_BUILD_DIR = ./compile
FILE_VERSION = VERSION.md
DEPENDS = /bin/cmake
PREFIX ?= /usr
PKGNAME = $(MAKEFILE_DIR)
#PKGNAME = ubl-settings-datetime
default_target: all
.PHONY: all init depend debug prepare check build uninstall install clean up_ver help
all: init build
init:
@echo "Initialize ..."; \
sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' VERSION.md | cut -d" " -f2)\";/" -i source/ubl-settings-datetime.cc; \
sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/ubl-settings-datetime.cc; \
echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend:
@echo "Check depends ..."; \
if [ ! -f /bin/${DEPENDS} ]; then \
echo "-- Depend '${DEPENDS}' not fount !"; \
@echo "Check depends ..."
@for FILE_DEPEND in $(DEPENDS); do \
if [ ! -f $${FILE_DEPEND} ]; then \
echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \
exit 1; \
fi; \
done; \
echo "Check depends: OK"
# $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
debug:
@echo "Debug ..."
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="/usr"; \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
fi; \
echo "Debug: OK"
prepare:
@echo "Prepare ..."; \
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"; \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
fi; \
echo "Prepare: OK"
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 found !"; \
exit 1; \
fi
@ -66,55 +71,63 @@ uninstall:
@for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "$${PATH_FILE_MO}"; \
done
@for SIZE in 16x16 32x32 48x48 scalable; do \
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/ru.ublinux.${pkgname}.svg"; \
$(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/ru.ublinux.${pkgname}.png"; \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${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}; \
$(RM) "${DESTDIR}${PREFIX}/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}"
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null || true
@update-desktop-database --quiet &>/dev/null || true
@touch /usr/share/applications &>/dev/null || true
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
@$(RM) "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/logo-background.png"
@$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.pkexec.${PKGNAME}.exec.policy"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
@$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}"
@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; \
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi
@echo "Uninstall: OK"
install: check uninstall
@echo "Install ..."
@for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
install -dm755 "${pkgdir}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${pkgdir}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo $${FILE_PO}; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo "$${FILE_PO}"; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
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 "ru.ublinux.${pkgname}.svg" -o "${pkgdir}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/ru.ublinux.${pkgname}.png"; \
install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \
done
@install -dm755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps"
@install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/apps/" "ru.ublinux.${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,css,images}
@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/" "logo-background.png"
@install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-settings-datetime.checked.svg"
@install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ru.ublinux.ubl-settings-datetime.warning.svg"
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null || true
@update-desktop-database --quiet &>/dev/null || true
@touch /usr/share/applications &>/dev/null || true
@install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@install -dm755 "${DESTDIR}${PREFIX}/share/applications"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.pkexec.${PKGNAME}.exec.policy"
@install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images}
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "logo-background.png"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-datetime.checked.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-datetime.warning.svg"
@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; \
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi
@echo "Install: OK"
clean:
@ -126,6 +139,14 @@ clean:
echo "Clean: OK"; \
fi
up_ver:
@CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \
MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \
MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \
VER="$${MAJOR}.$$(($${MINOR}+1))"; \
sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \
echo "Updated version to VERSION.md: $${CURRENT} to $${VER}"
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"

@ -7,7 +7,7 @@
<vendor>UBLinux</vendor>
<vendor_url>https://ublinux.ru</vendor_url>
<action id="ru.ublinux.pkexec.ubl-settings-datetime.exec">
<action id="com.ublinux.pkexec.ubl-settings-datetime.exec">
<description>Run "Time date settings" as root</description>
<description xml:lang="ru">Запуск настройки даты и времени" с правами root</description>
<message>Authentication is required to run the time date settings</message>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -1,18 +0,0 @@
#!/bin/bash
##
## Update VERSION 1.4
## $1 - Version
## Default - current Version value plus one (in minor section)
##
FILE_VERSION="VERSION.md"
[[ $1 ]] && VER=$1
if [[ -z ${VER} ]] ; then
SOURCE_FILE_VERSION=$(find ../ -maxdepth 1 -type f -iname "${FILE_VERSION}" -print -quit)
CURRENT=$(cat ${SOURCE_FILE_VERSION} | grep 'VERSION' | cut -d" " -f2)
MAJOR=$(echo ${CURRENT} | cut -d. -f1)
MINOR=$(echo ${CURRENT} | cut -d. -f2)
VER="${MAJOR}.$(echo $((${MINOR} +1)))"
fi
echo ":: Updated VERSION ${CURRENT} to ${VER}"
find ../ -maxdepth 2 -type f -iname "${FILE_VERSION}" -exec echo ":: Insert version in file: {}" \; -exec sed "s/VERSION *[[:digit:]]*.*/VERSION ${VER}/" -i {} \;

@ -6,7 +6,7 @@ const string path_app = "/usr/bin/";
const string path_glade = "/usr/share/ubl-settings-datetime/ui/";
const string app_name = "ubl-settings-datetime";
const string path_locale = "/usr/share/locale/";
const string path_css = "/usr/share/ubl-settings-datetime/css/style.css";
const string path_css = "/usr/share/ubl-settings-datetime/css/ubl-settings-datetime.css";
bool flag_datetime = false;
bool flag_timezone = false;
bool flag_ntp_mode = false;
@ -110,7 +110,7 @@ void MainWindow::settings() {
boxButton->set_sensitive(false);
btnSave->set_sensitive(false);
this->event();
imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU);
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU);
info_status_app("boxInfoMessError");
lblWarning->set_text(_("The program must be run as root"));
}
@ -654,7 +654,7 @@ string MainWindow::get_ubconfig_value(string &cmd){
void MainWindow::info_warning_error(int mess) {
if (error_info > 0 || warning_info > 0) {
info_status_app("boxInfoMessError");
imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU);
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU);
error_info = 0;
warning_info = 0;
string mess_error = "";
@ -682,7 +682,7 @@ void MainWindow::info_warning_error(int mess) {
}
else {
info_status_app("boxInfoMessOK");
imgInfo->set_from_icon_name("ru.ublinux.ubl-settings-datetime.checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT);
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.checked", Gtk::ICON_SIZE_MENU);//Gtk::IconSize::INHERIT);
if (mess == 0) {
lblWarning->set_text(_("Local configuration downloaded successfully"));
}

@ -8,7 +8,7 @@ Comment=Date time settings
Comment[ru]=Приложение для настройки даты и времени
Type=Application
Exec=pkexec ubl-settings-datetime
Icon=ru.ublinux.ubl-settings-datetime
Icon=com.ublinux.ubl-settings-datetime
Terminal=false
X-XfcePluggable=true
X-UBLPluggable=true

@ -23,7 +23,7 @@
Подробнее в &lt;a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"&gt;GNU General Public License, версии 2 или позднее&lt;/a&gt;.</property>
<property name="authors">UBGroup</property>
<property name="artists">UBGroup</property>
<property name="logo-icon-name">ru.ublinux.ubl-settings-datetime</property>
<property name="logo-icon-name">com.ublinux.ubl-settings-datetime</property>
<property name="wrap-license">True</property>
<property name="license-type">gpl-2-0</property>
<child internal-child="vbox">
@ -228,7 +228,7 @@
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="pixel-size">69</property>
<property name="icon-name">ru.ublinux.ubl-settings-datetime</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
</object>
<packing>
<property name="expand">False</property>
@ -974,7 +974,7 @@ Format: DD.MM.YYYY</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="pixel-size">32</property>
<property name="icon-name">ru.ublinux.ubl-settings-datetime</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
</object>
</child>
<child>
@ -1165,7 +1165,7 @@ Format: DD.MM.YYYY</property>
<object class="GtkWindow" id="windowMessDchp">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="icon-name">ru.ublinux.ubl-settings-datetime</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
<property name="type-hint">dialog</property>
<child>
<object class="GtkBox">
@ -1249,7 +1249,7 @@ Format: DD.MM.YYYY</property>
<property name="type">popup</property>
<property name="title" translatable="yes">Внимание!</property>
<property name="window-position">center</property>
<property name="icon-name">ru.ublinux.ubl-settings-datetime</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
<property name="type-hint">dialog</property>
<child>
<object class="GtkBox">

@ -1,16 +1,17 @@
# Russian translations for PACKAGE package.
# Copyright (C) 2023 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Automatically generated, 2023.
# Russian translations for ubl-settings-datetime package.
# Copyright (C) 2022, UBTech LLC
# This file is distributed under the same license as the ubl-settings-datetime package.
# UBLinux Team <info@ublinux.com>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ubconfig 1.0\n"
"Report-Msgid-Bugs-To: info@ublinux.ru\n"
"POT-Creation-Date: 2020-02-22 23:22+0600\n"
"PO-Revision-Date: 2020-02-22 23:28+0600\n"
"Last-Translator: ublinux <info@ublinux.ru>\n"
"Language-Team: Russian - UBLinux Team <info@ublinux.ru>\n"
"Project-Id-Version: ubl-settings-datetime 1.0\n"
"Report-Msgid-Bugs-To: info@ublinux.com\n"
"POT-Creation-Date: 2023-01-01 00:00+0600\n"
"PO-Revision-Date: 2023-01-01 00:00+0600\n"
"Last-Translator: UBLinux Team <info@ublinux.com>\n"
"Language-Team: Russian - UBLinux Team <info@ublinux.com>\n"
"Language: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

Loading…
Cancel
Save