Compare commits
4
Commits
none-kernel
...
amazfish
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84cba00242 | ||
|
|
18d6098210 | ||
|
|
d8d55f76b2 | ||
|
|
dbdacde199 |
No files matched your search
@@ -0,0 +1,70 @@
|
||||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=amazfish
|
||||
pkgver=1.7.1_git20201219
|
||||
pkgrel=0
|
||||
_commit="f74ceb81b7a9e87e478ddbaf7acc60b8d433fa8a"
|
||||
_commit_qble="d47239a4c2e125257c1fe1ed7cca85094a64fc94"
|
||||
_commit_libwatchfish="c0457613537ad9ddab26e46c3c3e2b074a6c208a"
|
||||
pkgdesc="Companion app for several smartwatches"
|
||||
url="https://github.com/piggz/harbour-amazfish"
|
||||
arch="all"
|
||||
license="AGPL-3.0-ONLY"
|
||||
depends="kirigami2"
|
||||
makedepends="
|
||||
cmake
|
||||
dbus-dev
|
||||
kcontacts-dev
|
||||
kdb-dev
|
||||
kirigami2-dev
|
||||
qt5-qtbase-dev
|
||||
qt5-qtconnectivity-dev
|
||||
qt5-qtlocation-dev
|
||||
qtmpris-dev
|
||||
"
|
||||
source="https://github.com/piggz/harbour-amazfish/archive/$_commit/harbour-amazfish-$_commit.tar.gz
|
||||
https://github.com/piggz/qble/archive/$_commit_qble/qble-$_commit_qble.tar.gz
|
||||
https://github.com/piggz/libwatchfish/archive/$_commit_libwatchfish/libwatchfish-$_commit_libwatchfish.tar.gz
|
||||
build-fix.patch
|
||||
cmake.patch
|
||||
cmake-qble.diff
|
||||
"
|
||||
options="!check" # No tests
|
||||
builddir="$srcdir/harbour-amazfish-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
rmdir \
|
||||
qble \
|
||||
daemon/libwatchfish
|
||||
mv "$srcdir/qble-$_commit_qble" qble
|
||||
mv "$srcdir/libwatchfish-$_commit_libwatchfish" daemon/libwatchfish
|
||||
|
||||
cd "$builddir"/qble
|
||||
patch -p1 < "$srcdir"/cmake-qble.diff
|
||||
}
|
||||
|
||||
build() {
|
||||
# qmake-qt5 \
|
||||
# PREFIX=/usr \
|
||||
# FLAVOR=kirigami
|
||||
# make
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
#cmake --build build
|
||||
VERBOSE=1 make -C build -j1
|
||||
}
|
||||
|
||||
package() {
|
||||
# INSTALL_ROOT="$pkgdir" make install
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="e32a6179aeed9fe543938bb4ff428619f368c3c532f6bd148739c07305f5ae16d64c578c0885133595a649ee2006f5123579c6d4fc8b73c212f39b4630ca7f8b harbour-amazfish-f74ceb81b7a9e87e478ddbaf7acc60b8d433fa8a.tar.gz
|
||||
999082ad1045aab724ef858166e58fdee3818cccc77cb1595631161bcf199eb5db7725fce826dc58bd3a1bbc1bfb4dcaf31abc4d8cc37532ec0d531caaa28680 qble-d47239a4c2e125257c1fe1ed7cca85094a64fc94.tar.gz
|
||||
44decc27fa889a87ed74925d67b81bcacf27b06becaf094c52caf4eb9a954443c6c83321d70db351c087d82d1423abc50a0f63455318c8e41d750698707e09de libwatchfish-c0457613537ad9ddab26e46c3c3e2b074a6c208a.tar.gz
|
||||
cf7795f53966a1624d0ba4da72944f7d986a81073ca96e2e0c30389111c09c4c1abb8016f909e71c74e8340a538bdd9efcbe14b9b1bd7829219545cd82f3e30e build-fix.patch
|
||||
d894938110ecdd90820a7979e9c1b936884fd7a5324485832889f838dfd38fb7cf271e0593e19deafda8f626f4f20568932eaf0581e502165349272ebeb5a12c cmake.patch
|
||||
0ea41b2d64ee64a8872d588958f084961d57fd37acf97498238eee3f2f52a11e0c57462a9a860eb63ab30e61cd92a03c3dc3185883c911124444e725856aef43 cmake-qble.diff"
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/daemon/src/devices/abstractfirmwareinfo.h b/daemon/src/devices/abstractfirmwareinfo.h
|
||||
index 061d4b0..dc97e65 100644
|
||||
--- a/daemon/src/devices/abstractfirmwareinfo.h
|
||||
+++ b/daemon/src/devices/abstractfirmwareinfo.h
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
protected:
|
||||
QByteArray m_bytes;
|
||||
uint16_t m_crc16;
|
||||
- u_int32_t m_crc32;
|
||||
+ uint32_t m_crc32;
|
||||
Type m_type;
|
||||
QString m_version;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/ui/ui.pro b/ui/ui.pro
|
||||
index 537cb59..dd7689b 100644
|
||||
--- a/ui/ui.pro
|
||||
+++ b/ui/ui.pro
|
||||
@@ -231,7 +231,7 @@ js.path = $$DATADIR/qml/tools
|
||||
icons.files = qml/pics/*.png qml/pics/devices qml/custom-icons
|
||||
icons.path = $$DATADIR/qml/pics
|
||||
|
||||
-qmlplatform.extra = mkdir -p ${INSTALL_ROOT}$$DATADIR/qml/components/platform && cp -L -v $$PWD/qml/components/platform.$$FLAVOR/*.qml -t ${INSTALL_ROOT}$$DATADIR/qml/components/platform
|
||||
+qmlplatform.extra = mkdir -p ${INSTALL_ROOT}$$DATADIR/qml/components/platform && cp -L -v $$PWD/qml/components/platform.$$FLAVOR/*.qml ${INSTALL_ROOT}$$DATADIR/qml/components/platform
|
||||
qmlplatform.path = $$DATADIR/qml/platform
|
||||
|
||||
INSTALLS += qmlplatform qml js icons
|
||||
@@ -0,0 +1,16 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..4ee7a57
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,10 @@
|
||||
+list(APPEND SRC
|
||||
+ ${cmake_current_source_dir}/qbledevice.cpp
|
||||
+ ${cmake_current_source_dir}/qbleservice.cpp
|
||||
+ ${cmake_current_source_dir}/qblecharacteristic.cpp
|
||||
+ ${cmake_current_source_dir}/bluezadapter.cpp)
|
||||
+set(APPEND HEADERS
|
||||
+ ${cmake_current_source_dir}/qbledevice.h
|
||||
+ ${cmake_current_source_dir}/qbleservice.h
|
||||
+ ${cmake_current_source_dir}/qblecharacteristic.h
|
||||
+ ${cmake_current_source_dir}/bluezadapater.h)
|
||||
@@ -0,0 +1,104 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..8de6be0
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,98 @@
|
||||
+include(GenerateExportHeader)
|
||||
+
|
||||
+option(WATCHFIST_FEATURE_NOTIFICATIONMONITOR "Build notification monitor" TRUE)
|
||||
+option(WATCHFIST_FEATURE_WALLTIME "Build walltime" TRUE)
|
||||
+option(WATCHFIST_FEATURE_MUSIC "Build music" TRUE)
|
||||
+option(WATCHFIST_FEATURE_CALENDAR "Build calendar" TRUE)
|
||||
+option(WATCHFIST_FEATURE_VOICECALL "Build voicecall" TRUE)
|
||||
+option(WATCHFIST_FEATURE_VOLUME "Build volume" TRUE)
|
||||
+
|
||||
+add_library(watchfish SHARED)
|
||||
+generate_export_header(watchfish)
|
||||
+
|
||||
+if (EXISTS "/usr/lib/qt5/qml/Sailfish/Silica/SilicaGridView.qml")
|
||||
+ set(MER_EDITION_SAILFISH TRUE)
|
||||
+ target_link_libraries(
|
||||
+ Qt5::Contacts)
|
||||
+else()
|
||||
+ set(MER_EDITION_SAILFISH FALSE)
|
||||
+endif()
|
||||
+
|
||||
+target_link_libraries(watchfish
|
||||
+ Qt::DBus)
|
||||
+if (WATCHFIST_FEATURE_NOTIFICATIONMONITOR)
|
||||
+ target_link_libraries(watchfish
|
||||
+ dbus-1)
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ notificationmonitor.cpp
|
||||
+ notification.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ notificationmonitor.h
|
||||
+ notificationmonitor_p.h
|
||||
+ notification.h)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_WALLTIME)
|
||||
+ target_link_libraries(watchfish
|
||||
+ timed-qt5)
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ walltimemonitor.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ walltimemonitor.h
|
||||
+ walltimemonitor_p.h)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_MUSIC)
|
||||
+ target_link_libraries(watchfish
|
||||
+ mpris-qt5)
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ musiccontroller.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ musiccontroller.h
|
||||
+ musiccontroller_p.h)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_CALENDAR)
|
||||
+ if (EXISTS "/usr/lib/qt5/qml/Sailfish/Silica/SilicaGridView.qml")
|
||||
+ target_link_libraries(watchfish
|
||||
+ libmkcal-qt5
|
||||
+ libkcalcoren-qt5)
|
||||
+ else()
|
||||
+ target_link_libraries(watchfish
|
||||
+ KF5::Contacts)
|
||||
+ endif()
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ calendarsource.cpp
|
||||
+ calendarevent.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ calendarsource.h
|
||||
+ calendarevent.h)
|
||||
+
|
||||
+ if (MER_EDITION_SAILFISH)
|
||||
+ list(APPEND HEADERS
|
||||
+ calendarsource_p.h)
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_VOICECALL)
|
||||
+ list(APPEND SRC
|
||||
+ voicecallcontroller.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ voicecallcontroller.h
|
||||
+ voicecallcontroller_p.h)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_VOLUME)
|
||||
+ list(APPEND SRC
|
||||
+ volumecontroller.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ volumecontroller.h
|
||||
+ volumecontroller_p.h)
|
||||
+endif()
|
||||
+
|
||||
+install(TARGETS watchfish
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -0,0 +1,307 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..4d9d77d
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,37 @@
|
||||
+cmake_minimum_required(VERSION 3.13.0)
|
||||
+
|
||||
+project(harbour-amazfish
|
||||
+ VERSION 1.7.2
|
||||
+ DESCRIPTION "Companion application for various smartwatches")
|
||||
+
|
||||
+set(CMAKE_AUTOMOC ON)
|
||||
+set(CMAKE_AUTORCC ON)
|
||||
+
|
||||
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
+
|
||||
+include(FeatureSummary)
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
+option(FLAVOR "Supported platforms: kirigami, silica, qtcontrols, ubports" silica)
|
||||
+
|
||||
+set(QT_MIN_VERSION "5.6.0")
|
||||
+set(KF5_MIN_VERSION "5.75.0")
|
||||
+find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS Qml Bluetooth Location REQUIRED)
|
||||
+find_package(PkgConfig REQUIRED)
|
||||
+find_package(KF5Contacts ${KF5_MIN_VERSION} CONFIG REQUIRED)
|
||||
+find_package(KDb CONFIG REQUIRED)
|
||||
+find_package(DBus1 CONFIG REQUIRED)
|
||||
+
|
||||
+pkg_check_modules(MPRIS-QT mpris-qt5 REQUIRED IMPORTED_TARGET)
|
||||
+
|
||||
+if(MPRIS-QT_FOUND)
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND mpris-qt5)
|
||||
+else()
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND mpris-qt5)
|
||||
+endif()
|
||||
+
|
||||
+add_subdirectory(lib)
|
||||
+add_subdirectory(daemon)
|
||||
+#add_subdirectory(ui)
|
||||
+
|
||||
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..29ae2c6
|
||||
--- /dev/null
|
||||
+++ b/daemon/CMakeLists.txt
|
||||
@@ -0,0 +1,233 @@
|
||||
+set(SRC
|
||||
+ src/devices/abstractfirmwareinfo.cpp
|
||||
+ src/devices/biplitedevice.cpp
|
||||
+ src/devices/biplitefirmwareinfo.cpp
|
||||
+ src/devices/gtsdevice.cpp
|
||||
+ src/devices/gtsfirmwareinfo.cpp
|
||||
+ src/devices/pinetimejfdevice.cpp
|
||||
+ src/operations/updatefirmwareoperationnew.cpp
|
||||
+ src/qaesencryption.cpp
|
||||
+ src/services/currenttimeservice.cpp
|
||||
+ src/services/pinetimemusicservice.cpp
|
||||
+ src/typeconversion.cpp
|
||||
+ src/bipbatteryinfo.cpp
|
||||
+ src/devicefactory.cpp
|
||||
+ src/services/mibandservice.cpp
|
||||
+ src/services/miband2service.cpp
|
||||
+ src/services/alertnotificationservice.cpp
|
||||
+ src/services/hrmservice.cpp
|
||||
+ src/services/deviceinfoservice.cpp
|
||||
+ src/services/bipfirmwareservice.cpp
|
||||
+ src/operations/abstractoperation.cpp
|
||||
+ src/operations/activityfetchoperation.cpp
|
||||
+ src/operations/logfetchoperation.cpp
|
||||
+ src/operations/sportssummaryoperation.cpp
|
||||
+ src/operations/updatefirmwareoperation.cpp
|
||||
+ src/devices/abstractdevice.cpp
|
||||
+ src/devices/bipdevice.cpp
|
||||
+ src/devices/bipfirmwareinfo.cpp
|
||||
+ src/dbushrm.cpp
|
||||
+ src/activitysummary.cpp
|
||||
+ src/deviceinterface.cpp
|
||||
+ src/activitysample.cpp
|
||||
+ src/activitykind.cpp
|
||||
+ src/operations/sportsdetailoperation.cpp
|
||||
+ src/operations/abstractfetchoperation.cpp
|
||||
+ src/bipactivitydetailparser.cpp
|
||||
+ src/activitycoordinate.cpp
|
||||
+ src/harbour-amazfish-daemon.cpp
|
||||
+ src/huamiweathercondition.cpp
|
||||
+
|
||||
+ # Qble
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qbledevice.cpp
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qbleservice.cpp
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qblecharacteristic.cpp
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/bluezadapter.cpp
|
||||
+ )
|
||||
+set(HEADERS
|
||||
+ src/devices/abstractfirmwareinfo.h
|
||||
+ src/devices/biplitedevice.h
|
||||
+ src/devices/biplitefirmwareinfo.h
|
||||
+ src/devices/gtsdevice.h
|
||||
+ src/devices/gtsfirmwareinfo.h
|
||||
+ src/devices/pinetimejfdevice.h
|
||||
+ src/operations/updatefirmwareoperationnew.h
|
||||
+ src/qaesencryption.h
|
||||
+ src/services/currenttimeservice.h
|
||||
+ src/services/pinetimemusicservice.h
|
||||
+ src/typeconversion.h
|
||||
+ src/bipbatteryinfo.h
|
||||
+ src/deviceinterface.h
|
||||
+ src/activitykind.h
|
||||
+ src/devices/bipfirmwareinfo.h
|
||||
+ src/dbushrm.h
|
||||
+ src/activitysummary.h
|
||||
+ src/activitysample.h
|
||||
+ src/devicefactory.h
|
||||
+ src/services/mibandservice.h
|
||||
+ src/services/miband2service.h
|
||||
+ src/services/alertnotificationservice.h
|
||||
+ src/services/hrmservice.h
|
||||
+ src/services/deviceinfoservice.h
|
||||
+ src/services/bipfirmwareservice.h
|
||||
+ src/operations/abstractoperation.h
|
||||
+ src/operations/activityfetchoperation.h
|
||||
+ src/operations/logfetchoperation.h
|
||||
+ src/operations/sportssummaryoperation.h
|
||||
+ src/operations/updatefirmwareoperation.h
|
||||
+ src/operations/sportsdetailoperation.h
|
||||
+ src/operations/abstractfetchoperation.h
|
||||
+ src/devices/abstractdevice.h
|
||||
+ src/devices/bipdevice.h
|
||||
+ src/bipactivitydetailparser.h
|
||||
+ src/activitycoordinate.h
|
||||
+
|
||||
+ # Qble
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qbledevice.h
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qbleservice.h
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/qblecharacteristic.h
|
||||
+ ${PROJECT_SOURCE_DIR}/qble/bluezadapter.h)
|
||||
+
|
||||
+include_directories(
|
||||
+ ${PROJECT_SOURCE_DIR}/lib/src
|
||||
+ src
|
||||
+ src/devices
|
||||
+ src/operations
|
||||
+ src/services
|
||||
+ libwatchfish)
|
||||
+
|
||||
+add_executable(harbour-amazfishd ${SRC} ${HEADERS})
|
||||
+
|
||||
+# TODO: Debug, remove
|
||||
+set_target_properties(harbour-amazfishd PROPERTIES COMPILE_OPTIONS "-w")
|
||||
+
|
||||
+target_link_libraries(harbour-amazfishd
|
||||
+ Qt5::Bluetooth
|
||||
+ Qt5::Location
|
||||
+ Qt5::DBus
|
||||
+ Qt5::Xml
|
||||
+ KDb
|
||||
+ amazfish
|
||||
+ z)
|
||||
+
|
||||
+# libwatchfish
|
||||
+if (EXISTS "/usr/lib/qt5/qml/Sailfish/Silica/SilicaGridView.qml")
|
||||
+ add_definitions(-DMER_EDITION_SAILFISH=TRUE)
|
||||
+ set(MER_EDITION_SAILFISH TRUE)
|
||||
+
|
||||
+ pkg_check_modules(MLITE5 mlite5 REQUIRED IMPORTED_TARGET)
|
||||
+ if(MLITE5_FOUND)
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND mlite5)
|
||||
+ else()
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND mlite5)
|
||||
+ endif()
|
||||
+ target_link_libraries(watchfish
|
||||
+ Qt5::Contacts
|
||||
+ PkgConfig::MLITE5)
|
||||
+ set(WATCHFIST_FEATURE_NOTIFICATIONMONITOR TRUE)
|
||||
+ set(WATCHFIST_FEATURE_MUSIC TRUE)
|
||||
+ set(WATCHFIST_FEATURE_CALENDAR TRUE)
|
||||
+ set(WATCHFIST_FEATURE_VOICECALL TRUE)
|
||||
+else()
|
||||
+ set(MER_EDITION_SAILFISH FALSE)
|
||||
+ set(WATCHFIST_FEATURE_NOTIFICATIONMONITOR TRUE)
|
||||
+ set(WATCHFIST_FEATURE_MUSIC TRUE)
|
||||
+ set(WATCHFIST_FEATURE_CALENDAR TRUE)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_NOTIFICATIONMONITOR)
|
||||
+ target_link_libraries(harbour-amazfishd
|
||||
+ dbus-1)
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/notificationmonitor.cpp
|
||||
+ libwatchfish/notification.cpp)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/notificationmonitor.h
|
||||
+ libwatchfish/notificationmonitor_p.h
|
||||
+ libwatchfish/notification.h)
|
||||
+
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_WALLTIME)
|
||||
+ pkg_check_modules(TIMED-QT timed-qt5 REQUIRED IMPORTED_TARGET)
|
||||
+ if(TIMED-QT_FOUND)
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_FOUND timed-qt5)
|
||||
+ else()
|
||||
+ set_property(GLOBAL APPEND PROPERTY PACKAGES_NOT_FOUND timed-qt5)
|
||||
+ endif()
|
||||
+
|
||||
+ target_link_libraries(harbour-amazfishd
|
||||
+ PkgConfig::TIMED-QT)
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/walltimemonitor.cpp)
|
||||
+ list(APPEND HEADERS
|
||||
+ libwatchfish/walltimemonitor.h
|
||||
+ libwatchfish/walltimemonitor_p.h)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/walltimemonitor.h
|
||||
+ libwatchfish/walltimemonitor_p.h)
|
||||
+
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_MUSIC)
|
||||
+ target_link_libraries(harbour-amazfishd
|
||||
+ PkgConfig::MPRIS-QT)
|
||||
+
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/musiccontroller.cpp
|
||||
+ libwatchfish/musiccontroller.h
|
||||
+ libwatchfish/musiccontroller_p.h)
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/musiccontroller.cpp)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_CALENDAR)
|
||||
+ if (EXISTS "/usr/lib/qt5/qml/Sailfish/Silica/SilicaGridView.qml")
|
||||
+ target_link_libraries(harbour-amazfishd
|
||||
+ libmkcal-qt5
|
||||
+ libkcalcoren-qt5)
|
||||
+ else()
|
||||
+ target_link_libraries(harbour-amazfishd
|
||||
+ KF5::Contacts)
|
||||
+ endif()
|
||||
+
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/calendarsource.cpp
|
||||
+ libwatchfish/calendarevent.cpp)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/calendarsource.h
|
||||
+ libwatchfish/calendarevent.h)
|
||||
+
|
||||
+ if (MER_EDITION_SAILFISH)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/calendarsource_p.h)
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_VOICECALL)
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/voicecallcontroller.cpp)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/voicecallcontroller.h
|
||||
+ libwatchfish/voicecallcontroller_p.h)
|
||||
+endif()
|
||||
+
|
||||
+if (WATCHFIST_FEATURE_VOLUME)
|
||||
+ list(APPEND SRC
|
||||
+ libwatchfish/volumecontroller.cpp)
|
||||
+ target_sources(harbour-amazfishd
|
||||
+ PUBLIC
|
||||
+ libwatchfish/volumecontroller.h
|
||||
+ libwatchfish/volumecontroller_p.h)
|
||||
+endif()
|
||||
+
|
||||
+install(TARGETS harbour-amazfishd RUNTIME
|
||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..a70df02
|
||||
--- /dev/null
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -0,0 +1,19 @@
|
||||
+set(SRC
|
||||
+ src/amazfishconfig.cpp
|
||||
+ src/weather/city.cpp
|
||||
+ src/weather/citymanager.cpp
|
||||
+ src/weather/citysearchmodel.cpp
|
||||
+ src/weather/currentweather.cpp)
|
||||
+set(HEADERS
|
||||
+ src/amazfishconfig.h
|
||||
+ src/weather/apikey.h
|
||||
+ src/weather/city.h
|
||||
+ src/weather/citymanager.h
|
||||
+ src/weather/citysearchmodel.h
|
||||
+ src/weather/currentweather.h)
|
||||
+
|
||||
+add_library(amazfish SHARED ${SRC} ${HEADERS})
|
||||
+
|
||||
+target_link_libraries(amazfish
|
||||
+ Qt5::Core
|
||||
+ Qt5::Network)
|
||||
@@ -0,0 +1,51 @@
|
||||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=kdb
|
||||
pkgver=3.2.0_git20201116
|
||||
pkgrel=0
|
||||
_commit="b36d74f13a1421437a725fb74502c993c359392a"
|
||||
pkgdesc="A database connectivity and creation framework for various database vendors"
|
||||
url="http://www.kexi-project.org"
|
||||
arch="all"
|
||||
license="LGPL-2.0-or-later"
|
||||
depends_dev="
|
||||
icu-dev
|
||||
kcoreaddons-dev
|
||||
ki18n-dev
|
||||
postgresql-dev
|
||||
qt5-qtbase-dev
|
||||
"
|
||||
makedepends="$depends_dev
|
||||
doxygen
|
||||
extra-cmake-modules
|
||||
qt5-qttools-dev
|
||||
"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
#source="https://download.kde.org/stable/kdb/src/kdb-$pkgver.tar.xz"
|
||||
source="https://invent.kde.org/libraries/kdb/-/archive/$_commit/kdb-$_commit.tar.gz
|
||||
include-kdeinstalldirs-as-first-thing.patch
|
||||
"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
build() {
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DBUILD_QCH=ON \
|
||||
-DBUILD_TESTING=ON
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd build
|
||||
# HeadersTest requires itself to be installed
|
||||
CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "HeadersTest"
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="ff61fad286083eee2c6b17655e5b9fbb7ecbb0dfc492fbf9f6781ce4808ce0a2fe2f554bd351d2a4c4d7c5821692194bb88043252448bbf43abc631d96fb0ba4 kdb-b36d74f13a1421437a725fb74502c993c359392a.tar.gz
|
||||
c8593da0841a422fa7085144916d90552b4ff47e2776ad9fb442c4f609747b92d4e60b5ef2cda1af4f21809e2bfaf0db0dbea742352184b3652feaf722f41089 include-kdeinstalldirs-as-first-thing.patch"
|
||||
@@ -0,0 +1,33 @@
|
||||
From 4fc65f4fea459f8ab1f99c5ceb575fc8f4ea651a Mon Sep 17 00:00:00 2001
|
||||
From: Bhushan Shah <bhush94@gmail.com>
|
||||
Date: Sun, 13 Dec 2020 19:16:30 +0530
|
||||
Subject: [PATCH] include KDEInstallDirs as first thing
|
||||
|
||||
Otherwise ECMGeneratePriFile won't get correct paths and will install
|
||||
pri file in wrong place and things wanting to use kdb with qmake won't
|
||||
work.
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3219e967..e3f98b43 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -13,12 +13,12 @@ kdb_add_tests(OFF)
|
||||
kdb_add_examples(OFF)
|
||||
|
||||
# ECM
|
||||
+include(KDEInstallDirs)
|
||||
include(ECMGeneratePriFile)
|
||||
include(ECMInstallIcons)
|
||||
include(ECMOptionalAddSubdirectory)
|
||||
include(ECMPoQmTools)
|
||||
include(ECMSetupVersion)
|
||||
-include(KDEInstallDirs)
|
||||
include(KDECMakeSettings NO_POLICY_SCOPE)
|
||||
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
||||
include(ECMSetupQtPluginMacroNames)
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=qtdbusextended
|
||||
pkgver=0.0.3
|
||||
pkgrel=0
|
||||
pkgdesc="Provides additional features to the QDBusAbstractInterface class"
|
||||
url="https://github.com/nemomobile/qtdbusextended"
|
||||
arch="all"
|
||||
license="LGPL-2.1-or-later"
|
||||
makedepends="
|
||||
cmake
|
||||
qt5-qtbase-dev
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://github.com/nemomobile/qtdbusextended/archive/$pkgver/qtdbusextended-$pkgver.tar.gz
|
||||
cmake-support.patch
|
||||
"
|
||||
|
||||
build() {
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --build build --target install
|
||||
}
|
||||
|
||||
sha512sums="76d962a7f8c31fc46875095a51dca39c3fcea1d4f3a26ac3f451a6a3bd15f480231786ad8756d5d19c10a3cae594926d426ee0c7697d28183f328733243af3d6 qtdbusextended-0.0.3.tar.gz
|
||||
34afdf54a890a85227561fa46610d1a2051eef496d8328b62eb846472fe20ceb765a421579fabb8616bfe2f891f6f4f1526b3ade325a29933cf3c7977c18a267 cmake-support.patch"
|
||||
@@ -0,0 +1,195 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..0b8e002
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,44 @@
|
||||
+cmake_minimum_required(VERSION 3.1.0)
|
||||
+
|
||||
+project(dbusextended
|
||||
+ VERSION 0.0.3
|
||||
+ DESCRIPTION "Provides additional features to the QDBusAbstractInterface class")
|
||||
+
|
||||
+set(CMAKE_AUTOMOC ON)
|
||||
+set(CMAKE_AUTORCC ON)
|
||||
+set(CMAKE_AUTOUIC ON)
|
||||
+
|
||||
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
+
|
||||
+include(FeatureSummary)
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
+set(QT_MIN_VERSION "5.6.0")
|
||||
+find_package(Qt5 COMPONENTS Core DBus REQUIRED)
|
||||
+
|
||||
+add_subdirectory(src)
|
||||
+
|
||||
+# CMake Config File
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
||||
+
|
||||
+configure_package_config_file(
|
||||
+ "${PROJECT_NAME}Config.cmake.in"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/)
|
||||
+write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
||||
+ VERSION ${$PROJECT_NAME}_VERSION}
|
||||
+ COMPATIBILITY AnyNewerVersion)
|
||||
+
|
||||
+install(FILES
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
|
||||
+ COMPONENT Devel)
|
||||
+export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Targets.cmake)
|
||||
+install(EXPORT ${PROJECT_NAME}Targets
|
||||
+ FILE ${PROJECT_NAME}Targets.cmake
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/
|
||||
+ COMPONENT Devel)
|
||||
+
|
||||
+feature_summary(WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
diff --git a/dbusextended-qt.pro b/dbusextended-qt.pro
|
||||
deleted file mode 100644
|
||||
index 65d9262..0000000
|
||||
--- a/dbusextended-qt.pro
|
||||
+++ /dev/null
|
||||
@@ -1,2 +0,0 @@
|
||||
-TEMPLATE = subdirs
|
||||
-SUBDIRS = src
|
||||
diff --git a/dbusextendedConfig.cmake.in b/dbusextendedConfig.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..a5f86b4
|
||||
--- /dev/null
|
||||
+++ b/dbusextendedConfig.cmake.in
|
||||
@@ -0,0 +1,7 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(Qt5Core @REQUIRED_QT_VERSION@)
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
+@PACKAGE_INCLUDE_QCHTARGETS@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..62ed74e
|
||||
--- /dev/null
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -0,0 +1,42 @@
|
||||
+set(SRC
|
||||
+ dbusextendedabstractinterface.cpp
|
||||
+ dbusextendedpendingcallwatcher.cpp
|
||||
+ dbusextended.h
|
||||
+ dbusextendedabstractinterface.h)
|
||||
+set(HEADERS
|
||||
+ dbusextended.h
|
||||
+ dbusextendedabstractinterface.h
|
||||
+ DBusExtended
|
||||
+ DBusExtendedAbstractInterface)
|
||||
+
|
||||
+add_library(${PROJECT_NAME} SHARED ${SRC})
|
||||
+
|
||||
+target_link_libraries(${PROJECT_NAME}
|
||||
+ Qt5::Core
|
||||
+ Qt5::DBus)
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}>
|
||||
+ $<INSTALL_INTERFACE:include/${PROJECT_NAME}>)
|
||||
+
|
||||
+set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
+ SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
+ VERSION ${PROJECT_VERSION})
|
||||
+
|
||||
+# Create pkgconfig file
|
||||
+configure_file(${PROJECT_NAME}.pc.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-qt5.pc
|
||||
+ @ONLY)
|
||||
+
|
||||
+configure_file(${PROJECT_NAME}-qt5.prf.in
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-qt5.prf
|
||||
+ @ONLY)
|
||||
+
|
||||
+install(TARGETS ${PROJECT_NAME}
|
||||
+ EXPORT ${PROJECT_NAME}Targets
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(FILES ${HEADERS} DESTINATION
|
||||
+ ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-qt5.pc
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-qt5.prf
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/qt5/mkspecs/features/)
|
||||
diff --git a/src/dbusextended-qt5.prf.in b/src/dbusextended-qt5.prf.in
|
||||
index 63c81dd..5cace20 100644
|
||||
--- a/src/dbusextended-qt5.prf.in
|
||||
+++ b/src/dbusextended-qt5.prf.in
|
||||
@@ -1,2 +1,2 @@
|
||||
CONFIG += link_pkgconfig
|
||||
-PKGCONFIG += $$TARGET
|
||||
+PKGCONFIG += @PROJECT_NAME@
|
||||
diff --git a/src/dbusextended.pc.in b/src/dbusextended.pc.in
|
||||
new file mode 100644
|
||||
index 0000000..07c34d3
|
||||
--- /dev/null
|
||||
+++ b/src/dbusextended.pc.in
|
||||
@@ -0,0 +1,11 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+exec_prefix=${prefix}
|
||||
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@
|
||||
+
|
||||
+Name: @PROJECT_NAME@
|
||||
+Description: @PROJECT_DESCRIPTION@
|
||||
+Version: @PROJECT_VERSION@
|
||||
+Libs: -l@PROJECT_NAME@
|
||||
+Cflags: -I${includedir}
|
||||
+Requires: Qt5Core Qt5DBus
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
deleted file mode 100644
|
||||
index e9c2c28..0000000
|
||||
--- a/src/src.pro
|
||||
+++ /dev/null
|
||||
@@ -1,45 +0,0 @@
|
||||
-include(../common.pri)
|
||||
-
|
||||
-TEMPLATE = lib
|
||||
-CONFIG += qt
|
||||
-
|
||||
-QT = core dbus
|
||||
-
|
||||
-TARGET = $${QTDBUSEXTENDEDLIB}
|
||||
-
|
||||
-QMAKE_SUBSTITUTES = $${TARGET}.prf.in
|
||||
-
|
||||
-DEFINES += QT_DBUS_EXTENDED_LIBRARY
|
||||
-
|
||||
-# Generate pkg-config support by default
|
||||
-# Note that we HAVE TO also create prl config as QMake implementation
|
||||
-# mixes both of them together.
|
||||
-CONFIG += create_pc create_prl no_install_prl
|
||||
-
|
||||
-SOURCES += \
|
||||
- dbusextendedabstractinterface.cpp \
|
||||
- dbusextendedpendingcallwatcher.cpp
|
||||
-
|
||||
-HEADERS += \
|
||||
- dbusextended.h \
|
||||
- dbusextendedabstractinterface.h \
|
||||
- dbusextendedpendingcallwatcher_p.h
|
||||
-
|
||||
-INSTALL_HEADERS = \
|
||||
- DBusExtended \
|
||||
- DBusExtendedAbstractInterface \
|
||||
- dbusextended.h \
|
||||
- dbusextendedabstractinterface.h
|
||||
-
|
||||
-target.path = $$[QT_INSTALL_LIBS]
|
||||
-headers.files = $$INSTALL_HEADERS
|
||||
-headers.path = $$[QT_INSTALL_HEADERS]/DBusExtended
|
||||
-prf.files = $${TARGET}.prf
|
||||
-prf.path = $$[QMAKE_MKSPECS]/features
|
||||
-INSTALLS += target headers prf
|
||||
-
|
||||
-QMAKE_PKGCONFIG_LIBDIR = $$target.path
|
||||
-QMAKE_PKGCONFIG_INCDIR = $$headers.path
|
||||
-QMAKE_PKGCONFIG_DESTDIR = pkgconfig
|
||||
-QMAKE_PKGCONFIG_NAME = DBusExtended
|
||||
-QMAKE_PKGCONFIG_REQUIRES += Qt5Core Qt5DBus
|
||||
@@ -0,0 +1,28 @@
|
||||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=qtmpris
|
||||
pkgver=1.0.4
|
||||
pkgrel=0
|
||||
pkgdesc="Qt and QML MPRIS interface and adaptor"
|
||||
url="https://git.sailfishos.org/mer-core/qtmpris"
|
||||
arch="all"
|
||||
license="LGPL-2.1-or-later"
|
||||
depends_dev="nemo-qml-plugin-dbus-dev"
|
||||
makedepends="$depends_dev
|
||||
qt5-qtbase-dev
|
||||
qtdbusextended-dev
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://git.sailfishos.org/mer-core/qtmpris/-/archive/$pkgver/qtmpris-$pkgver.tar.gz"
|
||||
options="!check" # No suitable tests
|
||||
|
||||
build() {
|
||||
qmake-qt5
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
INSTALL_ROOT="$pkgdir" make install
|
||||
}
|
||||
|
||||
sha512sums="8dfcff60b2fb3906923236ae1457e603b9921e49c83fef531474712bc73ba2acf702482f53c4abb49c9921d2ff836250b92818b610baa8b14a47f50f171f5c5d qtmpris-1.0.4.tar.gz"
|
||||
Reference in new issue
Block a user