99 lines
2.6 KiB
Plaintext
99 lines
2.6 KiB
Plaintext
#
|
|
# Do NOT Edit the Auto-generated Part!
|
|
# Generated by: spectacle version 0.32
|
|
#
|
|
|
|
Name: harbour-nextcloud-talk
|
|
|
|
# >> macros
|
|
# << macros
|
|
|
|
%{!?qtc_qmake:%define qtc_qmake %qmake}
|
|
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
|
|
%{!?qtc_make:%define qtc_make make}
|
|
%{?qtc_builddir:%define _builddir %qtc_builddir}
|
|
Summary: Nextcloud Talk for Sailfish OS
|
|
Version: 1.0.4.0
|
|
Release: 0
|
|
Group: Applications/Communications
|
|
License: GPLv3+
|
|
URL: https://codeberg.org/blizzz/harbour-nextcloud-talk
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
Source100: harbour-nextcloud-talk.yaml
|
|
Requires: sailfishsilica-qt5 >= 0.10.9
|
|
Requires: sailfishsecretsdaemon-secretsplugins-default
|
|
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5Qml)
|
|
BuildRequires: pkgconfig(Qt5Quick)
|
|
BuildRequires: pkgconfig(nemonotifications-qt5)
|
|
BuildRequires: pkgconfig(sailfishsecrets)
|
|
BuildRequires: desktop-file-utils
|
|
|
|
%description
|
|
native Sailfish OS client for Nextcloud Talk
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
# >> setup
|
|
# << setup
|
|
|
|
%build
|
|
# >> build pre
|
|
# << build pre
|
|
|
|
%qtc_qmake5
|
|
|
|
%qtc_make %{?_smp_mflags}
|
|
|
|
# >> build post
|
|
# << build post
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
# >> install pre
|
|
# << install pre
|
|
%qmake5_install
|
|
|
|
# >> install post
|
|
# create so we can ghost it later:
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sailjail/applications/
|
|
touch %{buildroot}%{_sysconfdir}/sailjail/applications/%{name}.desktop
|
|
# << install post
|
|
|
|
desktop-file-install --delete-original \
|
|
--dir %{buildroot}%{_datadir}/applications \
|
|
%{buildroot}%{_datadir}/applications/*.desktop
|
|
|
|
%post
|
|
# >> post
|
|
# Secrets permission is only in SFOS >= 4.4
|
|
if [ $(awk -F= '/^VERSION_ID/ {gsub(/\./,"") ; print $2}' /etc/os-release) -lt 44000 ]; then
|
|
printf '[X-Sailjail]\nSandboxing=disabled\n' > %{_sysconfdir}/sailjail/applications/%{name}.desktop
|
|
fi
|
|
systemctl-user restart ngfd.service
|
|
systemctl-user restart sailfish-secretsd.service
|
|
# config folder migration (since alpha11, for sailjail)
|
|
for _OLD_CFG_DIR in $(find /home/*/ -path '*/.config/Nextcloud' -type d); do
|
|
_USER=$(stat -c '%U' "$_OLD_CFG_DIR")
|
|
_GROUP=$(stat -c '%U' "$_OLD_CFG_DIR")
|
|
mkdir -p "$_OLD_CFG_DIR/../org.nextcloud/"
|
|
chown $_USER:$_GROUP "$_OLD_CFG_DIR/../org.nextcloud/"
|
|
mv "$_OLD_CFG_DIR" "$_OLD_CFG_DIR/../org.nextcloud/talk"
|
|
done
|
|
# << post
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/*
|
|
%{_datadir}/%{name}
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
|
%{_datadir}/lipstick/notificationcategories/*.conf
|
|
%{_datadir}/ngfd/events.d/*.ini
|
|
%ghost %{_sysconfdir}/sailjail/applications/%{name}.desktop
|
|
# >> files
|
|
# << files
|