Update, move and create some project files
This commit is contained in:
parent
6beba35d0f
commit
4b6609f56b
7 changed files with 15 additions and 62 deletions
|
@ -14,6 +14,7 @@ TARGET = harbour-batterybuddy
|
||||||
|
|
||||||
CONFIG += console sailfishapp sailfishapp_i18n
|
CONFIG += console sailfishapp sailfishapp_i18n
|
||||||
|
|
||||||
|
# Keep this in sync with "service.pro"
|
||||||
VER = 2.2
|
VER = 2.2
|
||||||
REL = 2
|
REL = 2
|
||||||
|
|
||||||
|
@ -42,9 +43,7 @@ DISTFILES += qml/harbour-batterybuddy.qml \
|
||||||
qml/pages\LicensePage.qml \
|
qml/pages\LicensePage.qml \
|
||||||
qml/cover/CoverPage.qml \
|
qml/cover/CoverPage.qml \
|
||||||
../rpm/harbour-batterybuddy.spec \
|
../rpm/harbour-batterybuddy.spec \
|
||||||
service/clear-write-permissions.sh \
|
|
||||||
service/harbour-batterybuddy.service \
|
service/harbour-batterybuddy.service \
|
||||||
service/set-write-permissions.sh \
|
|
||||||
translations/*.ts \
|
translations/*.ts \
|
||||||
harbour-batterybuddy.desktop \
|
harbour-batterybuddy.desktop \
|
||||||
qml/pages/MainPage.qml \
|
qml/pages/MainPage.qml \
|
||||||
|
@ -59,17 +58,14 @@ SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
|
||||||
|
|
||||||
TRANSLATIONS += translations/*.ts
|
TRANSLATIONS += translations/*.ts
|
||||||
|
|
||||||
OTHER_FILES += service/clear-write-permissions.sh \
|
# Executable provided by "service.pro"
|
||||||
service/harbour-batterybuddy.service \
|
OTHER_FILES += service/harbour-batterybuddy.service
|
||||||
service/set-write-permissions.sh
|
|
||||||
|
|
||||||
service.files = service
|
service.files = service
|
||||||
service.path = /usr/share/$${TARGET}
|
service.path = /usr/share/$${TARGET}
|
||||||
|
|
||||||
INSTALLS += service
|
INSTALLS += service
|
||||||
|
|
||||||
SUBDIRS += service
|
|
||||||
|
|
||||||
# Begin: include sound files
|
# Begin: include sound files
|
||||||
|
|
||||||
#OTHER_FILES += sounds/upperLimit.ogg \
|
#OTHER_FILES += sounds/upperLimit.ogg \
|
||||||
|
|
|
@ -18,11 +18,7 @@
|
||||||
Description=Battery Buddy file permission daemon
|
Description=Battery Buddy file permission daemon
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
ExecStart=/usr/bin/harbour-batterybuddy-daemon
|
||||||
ExecStart=/usr/share/harbour-batterybuddy/service/set-write-permissions.sh
|
|
||||||
RemainAfterExit=true
|
|
||||||
ExecStop=/usr/share/harbour-batterybuddy/service/clear-write-permissions.sh
|
|
||||||
StandardOutput=journal
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SPEC=rpm/$1.spec
|
SPEC=../rpm/$1.spec
|
||||||
if [[ $(grep "^Version: $2$" $SPEC | wc -l) = 0 ]]
|
if [[ $(grep "^Version: $2$" $SPEC | wc -l) = 0 ]]
|
||||||
then
|
then
|
||||||
sed -i "/^Version: /c\Version: $2" $SPEC
|
sed -i "/^Version: /c\Version: $2" $SPEC
|
||||||
|
|
|
@ -71,7 +71,6 @@ desktop-file-install --delete-original \
|
||||||
%posttrans
|
%posttrans
|
||||||
systemctl disable --now harbour-batterybuddy.service
|
systemctl disable --now harbour-batterybuddy.service
|
||||||
cp %{_datadir}/%{name}/service/harbour-batterybuddy.service /etc/systemd/system/
|
cp %{_datadir}/%{name}/service/harbour-batterybuddy.service /etc/systemd/system/
|
||||||
chmod 755 %{_datadir}/%{name}/service/*.sh
|
|
||||||
systemctl enable --now harbour-batterybuddy.service
|
systemctl enable --now harbour-batterybuddy.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Battery Buddy, a Sailfish application to prolong battery lifetime
|
|
||||||
#
|
|
||||||
# Copyright (C) 2019-2020 Matti Viljanen
|
|
||||||
#
|
|
||||||
# Battery Buddy is free software: you can redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License as published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Battery Buddy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
#
|
|
||||||
# See the GNU General Public License for more details. You should have received a copy of the GNU
|
|
||||||
# General Public License along with Battery Buddy. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Author: Matti Viljanen
|
|
||||||
|
|
||||||
chmod 644 /sys/class/power_supply/battery/input_suspend 2>/dev/null
|
|
||||||
chmod 644 /sys/class/power_supply/battery/charging_enabled 2>/dev/null
|
|
||||||
chmod 644 /sys/class/power_supply/usb/charger_disable 2>/dev/null
|
|
||||||
exit 0
|
|
|
@ -1,8 +1,16 @@
|
||||||
TARGET = harbour-batterybuddy-daemon
|
TARGET = harbour-batterybuddy-daemon
|
||||||
|
|
||||||
CONFIG = qt c++11 sailfish_build
|
CONFIG = qt console c++11 sailfish_build
|
||||||
|
|
||||||
QT = dbus network xml
|
QT = core network
|
||||||
|
|
||||||
|
# Keep this in sync with "application.pro"
|
||||||
|
VER = 2.2
|
||||||
|
REL = 2
|
||||||
|
|
||||||
|
VERSION = $${VER}-$${REL}
|
||||||
|
DEFINES += APP_VERSION=\"\\\"$$VERSION\\\"\"
|
||||||
|
DEFINES += APP_NAME=\"\\\"$$TARGET\\\"\"
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/filewatcher.h
|
src/filewatcher.h
|
||||||
|
@ -13,8 +21,6 @@ SOURCES += \
|
||||||
|
|
||||||
OTHER_FILES += harbour-batterybuddy-daemon.service
|
OTHER_FILES += harbour-batterybuddy-daemon.service
|
||||||
|
|
||||||
#include($$PWD/../common/common.pri)
|
|
||||||
|
|
||||||
service.path = /usr/lib/systemd/user/
|
service.path = /usr/lib/systemd/user/
|
||||||
service.files += harbour-batterybuddy-daemon.service
|
service.files += harbour-batterybuddy-daemon.service
|
||||||
target.path = /usr/bin/
|
target.path = /usr/bin/
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Battery Buddy, a Sailfish application to prolong battery lifetime
|
|
||||||
#
|
|
||||||
# Copyright (C) 2019-2020 Matti Viljanen
|
|
||||||
#
|
|
||||||
# Battery Buddy is free software: you can redistribute it and/or modify it under the terms of the
|
|
||||||
# GNU General Public License as published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Battery Buddy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
#
|
|
||||||
# See the GNU General Public License for more details. You should have received a copy of the GNU
|
|
||||||
# General Public License along with Battery Buddy. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Author: Matti Viljanen
|
|
||||||
|
|
||||||
chmod 666 /sys/class/power_supply/battery/input_suspend 2>/dev/null
|
|
||||||
chmod 666 /sys/class/power_supply/battery/charging_enabled 2>/dev/null
|
|
||||||
chmod 666 /sys/class/power_supply/usb/charger_disable 2>/dev/null
|
|
||||||
exit 0
|
|
Loading…
Reference in a new issue