diff --git a/.gitignore b/.gitignore index b8ad604..17f758f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Spec files are generated from the yaml files, so they are unneeded -rpm/*.spec - # Build folders build/ build-*/ diff --git a/.gitmodules b/.gitmodules index b68bdf7..5b3d099 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "3rdparty/doxygen-awesome-css"] path = 3rdparty/doxygen-awesome-css url = https://github.com/jothepro/doxygen-awesome-css.git +[submodule "sailfish/lib/blurhash-qt"] + path = sailfish/lib/blurhash-qt + url = https://github.com/HenkKalkwater/BlurhashQt.git diff --git a/rpm/harbour-sailfin.spec b/rpm/harbour-sailfin.spec new file mode 100644 index 0000000..063952f --- /dev/null +++ b/rpm/harbour-sailfin.spec @@ -0,0 +1,89 @@ +Name: harbour-sailfin + +# >> macros +# << macros +%define __provides_exclude_from ^%{_datadir}/.*$ +%define __requires_exclude ^libJellyfinQt.*$ +%define _unpackaged_files_terminate_build 0 + +Summary: Sailfin +Version: 0.5.0 +Release: 1 +Group: Qt/Qt +License: LGPL-2.1-or-later +URL: https://chris.netsoj.nl/projects/harbour-sailfin +Source0: %{name}-%{version}.tar.bz2 +Requires: sailfishsilica-qt5 >= 0.10.9 +Requires: qt5-qtdeclarative-import-xmllistmodel +BuildRequires: pkgconfig(sailfishapp) >= 1.0.2 +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Qml) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5WebSockets) +BuildRequires: pkgconfig(Qt5Multimedia) +BuildRequires: pkgconfig(Qt5Concurrent) +BuildRequires: pkgconfig(mlite5) +BuildRequires: git +BuildRequires: desktop-file-utils +BuildRequires: cmake + +%description +Play video's and music from your Jellyfin media server on your Sailfish device + +%if 0%{?_chum} +Title: Sailfin +Type: desktop-application +DeveloperName: Chris Josten (heartfin) +Categories: + - AudioVideo +Custom: + Repo: https://github.com/heartfin/harbour-sailfin +PackageIcon: https://raw.githubusercontent.com/heartfin/harbour-sailfin/master/sailfish/icons/172x172/harbour-sailfin.png +Links: + Homepage: https://github.com/heartfin/harbour-sailfin + Bugtracker: https://github.com/heartfin/harbour-sailfin/issues + Help: https://github.com/heartfin/harbour-sailfin/discussions + Donation: https://liberapay.com/heartfin +%endif + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + +%cmake . \ + -DPLATFORM_SAILFISHOS=1 \ + -DSAILFIN_VERSION='%{version}-%{release}' + +make %{?_smp_mflags} + +# >> build post +# << build post + +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%make_install + +# >> install post +# << install post + +desktop-file-install --delete-original \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/*.desktop + +%files +%defattr(-,root,root,-) +%{_bindir} +%{_datadir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/*/apps/%{name}.png +# >> files +# << files diff --git a/rpm/harbour-sailfin.yaml b/rpm/harbour-sailfin.yaml deleted file mode 100644 index 7faa3e2..0000000 --- a/rpm/harbour-sailfin.yaml +++ /dev/null @@ -1,59 +0,0 @@ -Name: harbour-sailfin -Summary: Sailfin -Version: 0.5.0 -Release: 1 -# The contents of the Group field should be one of the groups listed here: -# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS -Group: Qt/Qt -URL: https://chris.netsoj.nl/projects/harbour-sailfin -License: LGPL-2.1-or-later -# This must be generated before uploading a package to a remote build service. Usually this line does not need to be modified. -Sources: -- '%{name}-%{version}.tar.bz2' -Description: | - Play video's and music from your Jellyfin media server on your Sailfish device -Builder: cmake - -# This section specifies build dependencies that are resolved using pkgconfig. -# This is the preferred way of specifying build dependencies for your package. -PkgBR: - - git -PkgConfigBR: - - sailfishapp >= 1.0.2 - - Qt5Core - - Qt5Qml - - Qt5Quick - - Qt5WebSockets - - mlite5 - -# Build dependencies without a pkgconfig setup can be listed here -# PkgBR: -# - package-needed-to-build - -# Runtime dependencies which are not automatically detected -Requires: - - sailfishsilica-qt5 >= 0.10.9 - - qt5-qtdeclarative-import-xmllistmodel - -# All installed files -Files: - - '%{_bindir}' - - '%{_datadir}/%{name}' - - '%{_datadir}/applications/%{name}.desktop' - - '%{_datadir}/icons/hicolor/*/apps/%{name}.png' - -Macros: - - '__provides_exclude_from; ^%{_datadir}/.*$' - - '__requires_exclude; ^libJellyfinQt.*$' - # Turn off facist build policy - - '_unpackaged_files_terminate_build; 0 ' - -ConfigOptions: - - -DPLATFORM_SAILFISHOS=1 - - -DSAILFIN_VERSION='%{version}-%{release}' - -# ExtraInstall: | - # mv /home/deploy/installroot/home/deploy/installroot/usr/share/harbour-sailfin/plugins /home/deploy/installroot/usr/share/harbour-sailfin/plugins - -# For more information about yaml and what's supported in Sailfish OS -# build system, please see https://wiki.merproject.org/wiki/Spectacle diff --git a/sailfish/CMakeLists.txt b/sailfish/CMakeLists.txt index cb24550..406ffa0 100644 --- a/sailfish/CMakeLists.txt +++ b/sailfish/CMakeLists.txt @@ -1,15 +1,15 @@ project(harbour-sailfin-sailfish) # find_library(SAILFISH sailfishapp 1.0 REQUIRED) -include(ExternalProject) # FIXME: don't hardcode /home/deploy/installroot/ set(DEPLOY_ROOT /home/deploy/installroot/) -ExternalProject_Add(BlurhashQt - # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/lib/blurhash-qt - GIT_REPOSITORY https://github.com/HenkKalkwater/BlurhashQt.git - GIT_TAG 61ae7f0feca6ab67da1bfdbcb222bbd12e8f7e07 - CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_EXPORT=OFF -DQML_PLUGIN_PATH=${PROJECT_BINARY_DIR}/plugins/) +set(QML_PLUGIN_PATH ${PROJECT_BINARY_DIR}/plugins CACHE PATH "QML plugin path for blurhash-qt") +add_subdirectory(lib/blurhash-qt) + +set_target_properties(blurhash-qt PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/plugins/nl/netsoj/chris/blurhash + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/plugins/nl/netsoj/chris/blurhash) find_package(Qt5 COMPONENTS Gui Qml Quick LinguistTools) find_package(SailfishApp 1.0 REQUIRED) @@ -97,6 +97,8 @@ target_link_libraries(harbour-sailfin PRIVATE Qt5::Gui Qt5::Qml Qt5::Quick Sailf target_compile_definitions(harbour-sailfin PRIVATE $<$,$>:QT_QML_DEBUG>) +add_dependencies(harbour-sailfin blurhash-qt) + install(TARGETS harbour-sailfin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/sailfish/lib/blurhash-qt b/sailfish/lib/blurhash-qt new file mode 160000 index 0000000..61ae7f0 --- /dev/null +++ b/sailfish/lib/blurhash-qt @@ -0,0 +1 @@ +Subproject commit 61ae7f0feca6ab67da1bfdbcb222bbd12e8f7e07