Skip to content

Commit

Permalink
Merge pull request #6 from dev-nis/master
Browse files Browse the repository at this point in the history
Bump version to 1.0.7
  • Loading branch information
g7 authored May 22, 2024
2 parents 9940d8c + 5bd71e0 commit 25f75f3
Show file tree
Hide file tree
Showing 13 changed files with 419 additions and 29 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: SailfishOS App CI (aarch64, armv7hl, i486)
env:
sfos_target: 4.5.0.16

on:
push:
# tags:
# - 'v*-sfos4.2'
branches:
- 'master'
#pull_request:
# branches:
# - sfos4.2

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Prepare
run: mkdir RPMS

- name: Build armv7hl
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_target }}
arch: armv7hl

- name: Build i486
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_target }}
arch: i486

- name: Build aarch64
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_target }}
arch: aarch64

- name: Upload build result
uses: actions/upload-artifact@v4
with:
name: rpm-build-result
path: RPMS
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.aarch64
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.armv7hl
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.i486
jolla-settings-screenmonitor.changes
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
jolla-settings-screenmonitor.pro.user
jolla-settings-screenmonitor.pro.user.*
jolla-settings-screenmonitor.pro.autosave
jolla-settings-screenmonitor.pro.user.0a580b9

service/ScreenMonitor

RPMS/
62 changes: 47 additions & 15 deletions jolla-settings-screenmonitor.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TEMPLATE = aux

TARGET = jolla-settings-screenmonitor
jolla-settings-screenmonitor.depends += ScreenMonitor
screenmonitor-executable.CONFIG += no_check_exist

#CONFIG += sailfishapp

Expand All @@ -30,7 +31,7 @@ screenmonitor-dbus-configuration.files = service/dbus/eu.medesimo.ScreenMonitor.
screenmonitor-dbus-service.path = /usr/share/dbus-1/system-services
screenmonitor-dbus-service.files = service/dbus/eu.medesimo.ScreenMonitor.service

screenmonitor-systemd.path = /lib/systemd/system
screenmonitor-systemd.path = /usr/lib/systemd/system
screenmonitor-systemd.files = service/dbus/ScreenMonitor.service

INSTALLS += \
Expand All @@ -39,29 +40,60 @@ INSTALLS += \
screenmonitor-executable \
screenmonitor-dbus-configuration \
screenmonitor-dbus-service \
screenmonitor-systemd
screenmonitor-systemd

OTHER_FILES += \
rpm/jolla-settings-screenmonitor.spec \
rpm/jolla-settings-screenmonitor.yaml \
service/dbus_interface.vala \
service/ScreenMonitor.vala \
service/ScreenMonitor \
service/UnixTimer.vala \
service/service.vala \
service/Makefile \
service/dbus/eu.medesimo.ScreenMonitor.service \
service/dbus/eu.medesimo.ScreenMonitor.conf \
service/dbus/Makefile \
service/dbus_interface.vala \
service/ScreenMonitor.vala \
service/ScreenMonitor \
service/UnixTimer.vala \
service/service.vala \
service/Makefile \
service/dbus/eu.medesimo.ScreenMonitor.service \
service/dbus/eu.medesimo.ScreenMonitor.conf \
service/dbus/Makefile \
service/UnixTimer.vala \
settings/DetailItem.qml \
rpm/jolla-settings-screenmonitor.changes \
service/FileWatcher.vala

# to disable building translations every time, comment out the
# following CONFIG line
#CONFIG += sailfishapp_i18n
#TRANSLATIONS += translations/jolla-settings-screenmonitor-de.ts
TRANSLATIONS += $$files(translations/$${TARGET}-*.ts)
TS_FILE = $${_PRO_FILE_PWD_}/translations/$${TARGET}*.ts
HAVE_TRANSLATIONS = 0

TRANSLATION_SOURCES += $$_PRO_FILE_PWD_/settings/

# prefix all TRANSLATIONS with the src dir
# the qm files are generated from the ts files copied to out dir
for(t, TRANSLATIONS) {
TRANSLATIONS_IN += $${_PRO_FILE_PWD_}/$$t
TRANSLATIONS_OUT += $${OUT_PWD}/$$t
HAVE_TRANSLATIONS = 1
}

qm.files = $$replace(TRANSLATIONS_OUT, \.ts, .qm)
qm.path = /usr/share/translations
qm.CONFIG += no_check_exist

# update the ts files in the src dir and then copy them to the out dir
qm.commands += lupdate -noobsolete $${TRANSLATION_SOURCES} -ts $${TS_FILE} && \
mkdir -p translations && \
[ \"$${OUT_PWD}\" != \"$${_PRO_FILE_PWD_}\" -a $$HAVE_TRANSLATIONS -eq 1 ] && \
cp -af $${TRANSLATIONS_IN} $${OUT_PWD}/translations || :

# create the qm files
qm.commands += ; [ $$HAVE_TRANSLATIONS -eq 1 ] && lrelease -nounfinished $${TRANSLATIONS_OUT} || :

# special case: as TS_FILE serves as both source file as well as
# the English translation source, create the en qm file from it:
qm.files += $$replace(TS_FILE, \.ts, -en.qm)
qm.commands += lrelease -nounfinished $$TS_FILE -qm $$replace(TS_FILE, \.ts, -en.qm)

INSTALLS += qm

OTHER_FILES += $$TRANSLATIONS

# This is needed to compile the DBus service
screenmonitor-service.target = ScreenMonitor
Expand Down
14 changes: 14 additions & 0 deletions rpm/jolla-settings-screenmonitor.changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
# * date Author's Name <author's email> version-release
# - Summary of changes

* Sat May 04 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.8-1
- Add Swedish translation (thanks to https://github.com/eson57 )

* Thu Apr 04 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.7-1
- Fix Icon size (thanks to https://github.com/carmenfdezb )
- Add Spanish translation (thanks to https://github.com/carmenfdezb )
- Add German translation

* Fri Mar 29 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.6-1
- Fix the build for aarch64 on modern SailfishOS-versions:
- Changed call to systemd to new path
- Fixed inclusion of systemd-service in RPM packaging


* Sun Jun 14 2020 Juanro49 <[email protected]> 1.0.4-1
- jolla-settings-screenmonitor.qml: Fix show percentages in DetailItems
- jolla-settings-screenmonitor.yaml: Add nemo-qml-plugin-contextkit-qt5 dependency to fix compatibility with Sailfish OS 3.0.3 (Rokua)+
Expand Down
13 changes: 7 additions & 6 deletions rpm/jolla-settings-screenmonitor.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.27
# Generated by: spectacle version 0.32
#

Name: jolla-settings-screenmonitor
Expand All @@ -13,7 +13,7 @@ Name: jolla-settings-screenmonitor
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: jolla-settings-screenmonitor
Version: 1.0.4
Version: 1.0.8
Release: 1
Group: Applications/System
License: GPL2
Expand Down Expand Up @@ -61,20 +61,21 @@ rm -rf %{buildroot}

%preun
# >> preun
/bin/systemctl disable ScreenMonitor.service
/usr/bin/systemctl disable ScreenMonitor.service
# << preun

%post
# >> post
/bin/systemctl enable ScreenMonitor.service
/usr/bin/systemctl enable ScreenMonitor.service
# << post

%files
%defattr(-,root,root,-)
%{_bindir}
%{_bindir}/ScreenMonitor
%{_sysconfdir}/dbus-1
%{_datadir}/dbus-1
%{_datadir}/jolla-settings
/lib/systemd/system
%{_datadir}/translations/%{name}-*.qm
%{_unitdir}/ScreenMonitor.service
# >> files
# << files
7 changes: 4 additions & 3 deletions rpm/jolla-settings-screenmonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: jolla-settings-screenmonitor
Summary: jolla-settings-screenmonitor
Version: 1.0.4
Version: 1.0.8
Release: 1
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
Expand Down Expand Up @@ -38,11 +38,12 @@ Requires:

# All installed files
Files:
- '%{_bindir}'
- '%{_bindir}/ScreenMonitor'
- '%{_sysconfdir}/dbus-1'
- '%{_datadir}/dbus-1'
- '%{_datadir}/jolla-settings'
- '/lib/systemd/system'
- '%{_datadir}/translations/%{name}-*.qm'
- '%{_unitdir}/ScreenMonitor.service'

# For more information about yaml and what's supported in Sailfish OS
# build system, please see https://wiki.merproject.org/wiki/Spectacle
Expand Down
Binary file modified settings/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions settings/jolla-settings-screenmonitor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Page {
font.pixelSize: Theme.fontSizeHuge
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTrId("%1%").arg(percentage)
text: qsTrId("%1%").arg(percentage)
}
}

Expand All @@ -186,13 +186,13 @@ Page {
DetailItem {
width: parent.width
label: qsTr("Battery")
value: qsTrId("%1%").arg(batteryPercentage.value)
value: qsTrId("%1%").arg(batteryPercentage.value)
}

DetailItem {
width: parent.width
label: qsTr("Brightness")
value: qsTrId("%1%").arg(brightness)
value: qsTrId("%1%").arg(brightness)
}

}
Expand Down
4 changes: 2 additions & 2 deletions settings/screenmonitor.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"translation_catalog": "settings-system",
"translation_catalog": "jolla-settings-screenmonitor",
"entries": [
{
"path": "system_settings/info",
Expand All @@ -9,7 +9,7 @@
"order": 600
},
{
"path": "system_settings/info/screenmonitor",
"path": "system_settings/info/screenmonitor",
"title": "Screen usage",
"translation_id": "settings_system-screenmonitor",
"type": "page",
Expand Down
70 changes: 70 additions & 0 deletions translations/jolla-settings-screenmonitor-de.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de">
<context>
<name></name>
<message id="%1%">
<source></source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>jolla-settings-screenmonitor</name>
<message>
<source>No data</source>
<translation>Keine Daten</translation>
</message>
<message>
<source>Since last reset</source>
<translation>Seit dem letzten Zurücksetzen</translation>
</message>
<message>
<source>Since the phone start-up</source>
<translation>Seit dem Starten des Geräts</translation>
</message>
<message>
<source>Since the disconnection from the charger</source>
<translation>Seit dem Trennen des Ladegeräts</translation>
</message>
<message>
<source>%1 day, </source>
<translation>%1 Tag, </translation>
</message>
<message>
<source>%1 days, </source>
<translation>%1 Tage, </translation>
</message>
<message>
<source>%1 hour, </source>
<translation>%1 Stunde, </translation>
</message>
<message>
<source>%1 hours, </source>
<translation>%1 Stunden, </translation>
</message>
<message>
<source>%1 minute</source>
<translation>%1 Minute, </translation>
</message>
<message>
<source>%1 minutes</source>
<translation>%1 Minuten</translation>
</message>
<message>
<source>Reset</source>
<translation>Zurücksetzen</translation>
</message>
<message>
<source>Screen usage</source>
<translation>Bildschirmnutzung</translation>
</message>
<message>
<source>Battery</source>
<translation>Akku</translation>
</message>
<message>
<source>Brightness</source>
<translation>Helligkeit</translation>
</message>
</context>
</TS>
Loading

0 comments on commit 25f75f3

Please sign in to comment.