b17e36f
# https://github.com/linuxdeepin/dde-daemon/issues/63
b17e36f
%global _smp_mflags -j1
00831f1
%global repo dde-daemon
00831f1
00831f1
Name:           deepin-daemon
2254edb
Version:        5.0.0
2254edb
Release:        1%{?dist}
00831f1
Summary:        Daemon handling the DDE session settings
00831f1
License:        GPLv3
00831f1
URL:            https://github.com/linuxdeepin/dde-daemon
00831f1
Source0:        %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
2254edb
# upstream default mono font set to 'Noto Mono', which is not yet available in
2254edb
# Fedora. We change to 'Noto Sans Mono'
2254edb
Source1:        fontconfig.json
98d9092
Source2:        %{name}.sysusers
2254edb
Source3:        deepin-auth
e8df799
Patch0:         https://raw.github.com/jouyouyun/tap-gesture-patches/master/patches/dde-daemon_3.8.0.patch
00831f1
00831f1
ExclusiveArch:  %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
00831f1
BuildRequires:  %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
07b789b
BuildRequires:  deepin-gettext-tools
00831f1
BuildRequires:  deepin-gir-generator
00831f1
BuildRequires:  fontpackages-devel
07b789b
BuildRequires:  librsvg2-tools
00831f1
BuildRequires:  pam-devel
ce61a9a
BuildRequires:  pkgconfig(alsa)
00831f1
BuildRequires:  pkgconfig(fontconfig)
00831f1
BuildRequires:  pkgconfig(gnome-keyring-1)
00831f1
BuildRequires:  pkgconfig(gdk-pixbuf-xlib-2.0)
00831f1
BuildRequires:  pkgconfig(gtk+-3.0)
00831f1
BuildRequires:  pkgconfig(gio-2.0)
00831f1
BuildRequires:  pkgconfig(libbamf3)
00831f1
BuildRequires:  pkgconfig(libcanberra)
07b789b
BuildRequires:  pkgconfig(libnl-3.0)
07b789b
BuildRequires:  pkgconfig(libnl-genl-3.0)
00831f1
BuildRequires:  pkgconfig(libpulse)
00831f1
BuildRequires:  pkgconfig(libsystemd)
00831f1
BuildRequires:  pkgconfig(libudev)
00831f1
BuildRequires:  pkgconfig(gudev-1.0)
00831f1
BuildRequires:  pkgconfig(librsvg-2.0)
00831f1
BuildRequires:  pkgconfig(libinput)
00831f1
BuildRequires:  pkgconfig(poppler-glib)
00831f1
BuildRequires:  pkgconfig(x11)
00831f1
BuildRequires:  pkgconfig(xi)
00831f1
BuildRequires:  pkgconfig(xtst)
00831f1
BuildRequires:  pkgconfig(xcursor)
00831f1
BuildRequires:  pkgconfig(xfixes)
00831f1
BuildRequires:  pkgconfig(xkbfile)
3141915
BuildRequires:  golang(pkg.deepin.io/lib) >= 1.2.11
00831f1
BuildRequires:  golang(pkg.deepin.io/lib/fsnotify)
3141915
BuildRequires:  golang(pkg.deepin.io/dde/api/dxinput) >= 3.1.26
5d13bac
BuildRequires:  golang(github.com/linuxdeepin/go-dbus-factory/org.bluez)
00831f1
BuildRequires:  golang(github.com/linuxdeepin/go-x11-client)
00831f1
BuildRequires:  golang(github.com/BurntSushi/xgb)
00831f1
BuildRequires:  golang(github.com/BurntSushi/xgbutil)
00831f1
BuildRequires:  golang(github.com/axgle/mahonia)
00831f1
BuildRequires:  golang(github.com/msteinert/pam)
00831f1
BuildRequires:  golang(github.com/nfnt/resize)
ce61a9a
BuildRequires:  golang(github.com/cryptix/wav)
00831f1
BuildRequires:  golang(gopkg.in/alecthomas/kingpin.v2)
00831f1
BuildRequires:  golang(gopkg.in/yaml.v2)
2254edb
BuildRequires:  golang(github.com/gosexy/gettext)
00831f1
5d13bac
Requires:       bamf-daemon
5d13bac
Requires:       bluez-libs
00831f1
Requires:       deepin-desktop-base
00831f1
Requires:       deepin-desktop-schemas
00831f1
Requires:       deepin-notifications
5d13bac
Requires:       deepin-polkit-agent
9f6b21d
%ifnarch s390 s390x %{arm} %{power64}
2254edb
Obsoletes:      deepin-grub2-themes <= 1.0.0
00831f1
Requires:       acpid
9f6b21d
Requires:       rfkill
55c9c05
%endif
00831f1
Requires:       gvfs
00831f1
Requires:       iw
00831f1
Requires:       libudisks2
00831f1
Requires:       qt5-qtaccountsservice
00831f1
Requires:       upower
00831f1
Requires:       xdotool
00831f1
Recommends:     NetworkManager-vpnc-gnome
00831f1
Recommends:     NetworkManager-pptp-gnome
00831f1
Recommends:     NetworkManager-l2tp-gnome
00831f1
Recommends:     NetworkManager-strongswan-gnome
00831f1
Recommends:     NetworkManager-openvpn-gnome
00831f1
Recommends:     NetworkManager-openconnect-gnome
00831f1
Recommends:     iso-codes
5d13bac
Recommends:     imwheel
00831f1
Recommends:     mobile-broadband-provider-info
2254edb
Recommends:     google-noto-sans-mono-fonts
00831f1
Recommends:     google-noto-sans-fonts
00831f1
00831f1
%description
00831f1
Daemon handling the DDE session settings
00831f1
00831f1
%prep
2254edb
%setup -q -n %{repo}-%{version}
e8df799
%patch0 -p1 -b dde-daemon-3.8.0
2254edb
install -m 644 %{SOURCE3} misc/etc/pam.d/deepin-auth
00831f1
00831f1
# Fix library exec path
ce61a9a
sed -i '/deepin/s|lib|libexec|' Makefile
2d72bf1
sed -i '/systemd/s|lib|usr/lib|' Makefile
00831f1
sed -i 's|lib/NetworkManager|libexec|' network/utils_test.go
00831f1
sed -i 's|/usr/lib|%{_libexecdir}|' \
00831f1
    misc/*services/*.service \
3141915
    misc/systemd/services/*.service \
2254edb
    misc/pam-configs/deepin-auth \
00831f1
    misc/applications/deepin-toggle-desktop.desktop \
2d72bf1
    misc/dde-daemon/gesture.json \
00831f1
    misc/dde-daemon/keybinding/system_actions.json \
00831f1
    keybinding/shortcuts/system_shortcut.go \
00831f1
    session/power/constant.go \
00831f1
    session/power/lid_switch.go \
2d72bf1
    service_trigger/manager.go \
00831f1
    bin/dde-system-daemon/main.go \
3141915
    bin/search/main.go \
5d13bac
    accounts/image_blur.go \
5d13bac
    network/secret_agent.go \
5d13bac
    grub2/modify_manger.go
00831f1
00831f1
# Fix grub.cfg path
98d9092
sed -i 's|boot/grub|boot/grub2|' grub2/{grub2,grub_params,theme}.go
00831f1
5d13bac
# Fix activate services failed (Permission denied)
5d13bac
# dbus service
5d13bac
pushd misc/system-services/
5d13bac
sed -i '$aSystemdService=deepin-accounts-daemon.service' com.deepin.system.Power.service \
5d13bac
    com.deepin.daemon.{Accounts,Apps,Daemon}.service \
5d13bac
    com.deepin.daemon.{Gesture,SwapSchedHelper,Timedated}.service
5d13bac
sed -i '$aSystemdService=dbus-com.deepin.dde.lockservice.service' com.deepin.dde.LockService.service
5d13bac
popd
5d13bac
# systemd service
5d13bac
cat > misc/systemd/services/dbus-com.deepin.dde.lockservice.service <
5d13bac
[Unit]
5d13bac
Description=Deepin Lock Service
5d13bac
Wants=user.slice dbus.socket
5d13bac
After=user.slice dbus.socket
5d13bac
5d13bac
[Service]
5d13bac
Type=dbus
5d13bac
BusName=com.deepin.dde.LockService
5d13bac
ExecStart=%{_libexecdir}/%{name}/dde-lockservice
5d13bac
5d13bac
[Install]
5d13bac
WantedBy=graphical.target
5d13bac
EOF
5d13bac
89fe4ac
# Replace reference of google-chrome to chromium-browser
89fe4ac
sed -i 's/google-chrome/chromium-browser/g' misc/dde-daemon/mime/data.json
89fe4ac
00831f1
%build
00831f1
export GOPATH="$(pwd)/build:%{gopath}"
2d72bf1
BUILDID="0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
2d72bf1
%make_build GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\""
00831f1
00831f1
%install
2254edb
export GOPATH="$(pwd)/build:%{gopath}"
2254edb
BUILDID="0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
2254edb
%make_install PAM_MODULE_DIR=%{_libdir}/security GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\""
00831f1
98d9092
install -Dm644 %{S:2} %{buildroot}/usr/lib/sysusers.d/%{name}.conf
00831f1
00831f1
# fix systemd/logind config
00831f1
install -d %{buildroot}/usr/lib/systemd/logind.conf.d/
00831f1
cat > %{buildroot}/usr/lib/systemd/logind.conf.d/10-%{name}.conf <
00831f1
[Login]
00831f1
HandlePowerKey=ignore
00831f1
HandleSuspendKey=ignore
00831f1
EOF
00831f1
00831f1
# install default settings
2254edb
install -Dm644 %{SOURCE1} \
00831f1
    %{buildroot}%{_datadir}/deepin-default-settings/fontconfig.json
00831f1
00831f1
%find_lang %{repo}
00831f1
00831f1
%post
00831f1
if [ $1 -ge 1 ]; then
98d9092
  systemd-sysusers %{name}.conf
00831f1
  %{_sbindir}/alternatives --install %{_bindir}/x-terminal-emulator \
00831f1
    x-terminal-emulator %{_libexecdir}/%{name}/default-terminal 30
00831f1
fi
00831f1
00831f1
%preun
00831f1
if [ $1 -eq 0 ]; then
00831f1
  %{_sbindir}/alternatives --remove x-terminal-emulator \
00831f1
    %{_libexecdir}/%{name}/default-terminal
00831f1
fi
00831f1
00831f1
%postun
00831f1
if [ $1 -eq 0 ]; then
00831f1
  rm -f /var/cache/deepin/mark-setup-network-services
00831f1
  rm -f /var/log/deepin.log 
00831f1
fi
00831f1
00831f1
%files -f %{repo}.lang
00831f1
%doc README.md
00831f1
%license LICENSE
2254edb
%{_sysconfdir}/acpi/actions/deepin_lid.sh
2254edb
%{_sysconfdir}/acpi/events/deepin_lid
2254edb
%exclude %{_sysconfdir}/default/grub.d/10_deepin.cfg
2254edb
%exclude %{_sysconfdir}/grub.d/35_deepin_gfxmode
2d72bf1
%{_sysconfdir}/pam.d/deepin-auth
2d72bf1
%{_sysconfdir}/pam.d/deepin-auth-keyboard
2254edb
%{_libdir}/security/pam_deepin_auth.so
2254edb
# Debian specific, useless on Fedora
2254edb
%exclude %{_datadir}/pam-configs
00831f1
%{_libexecdir}/%{name}/
2254edb
%exclude %{_libexecdir}/%{name}/grub2
00831f1
%{_sysusersdir}/%{name}.conf
00831f1
%{_prefix}/lib/systemd/logind.conf.d/10-%{name}.conf
2d72bf1
%{_unitdir}/deepin-accounts-daemon.service
5d13bac
%{_unitdir}/dbus-com.deepin.dde.lockservice.service
00831f1
%{_datadir}/dbus-1/services/*.service
00831f1
%{_datadir}/dbus-1/system-services/*.service
2254edb
%exclude %{_datadir}/dbus-1/system-services/com.deepin.daemon.Grub2.service
00831f1
%{_datadir}/dbus-1/system.d/*.conf
2254edb
%exclude %{_datadir}/dbus-1/system.d/com.deepin.daemon.Grub2.conf
07b789b
%{_datadir}/icons/hicolor/*/status/*
00831f1
%{_datadir}/%{repo}/
00831f1
%{_datadir}/dde/
00831f1
%{_datadir}/polkit-1/actions/*.policy
2254edb
%exclude %{_datadir}/polkit-1/actions/com.deepin.daemon.Grub2.policy
00831f1
%{_datadir}/deepin-default-settings/
00831f1
%{_var}/cache/appearance/
2d72bf1
%{_var}/lib/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Accounts.pkla
2254edb
%exclude %{_var}/lib/polkit-1/localauthority/10-vendor.d/com.deepin.daemon.Grub2.pkla
00831f1
00831f1
%changelog
2254edb
* Sat Aug 10 2019 Robin Lee <cheeselee@fedoraproject.org> - 5.0.0-1
2254edb
- Release 5.0.0
2254edb
- Disable grub-related functions
2254edb
2062e23
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.23.0-3
2062e23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2062e23
89fe4ac
* Thu Mar 21 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.23.0-2
89fe4ac
- Replace reference of google-chrome to chromium-browser
89fe4ac
af46b15
* Tue Feb 26 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.23.0-1
af46b15
- Update to 3.23.0
af46b15
- default-settings update to 2019.1.30
b17e36f
- Disable parallel building by now
af46b15
dcab168
* Thu Jan 31 2019 mosquito <sensor.wen@gmail.com> - 3.22.0-1
dcab168
- Update to 3.22.0
dcab168
8dddc2f
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.0-3
8dddc2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8dddc2f
2508f98
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 3.14.0-2
2508f98
- Rebuilt for libcrypt.so.2 (#1666033)
2508f98
98d9092
* Wed Dec 12 2018 mosquito <sensor.wen@gmail.com> - 3.14.0-1
98d9092
- Update to 3.14.0
98d9092
e8df799
* Thu Nov 29 2018 mosquito <sensor.wen@gmail.com> - 3.9.0-1
e8df799
- Update to 3.9.0
e8df799
9f6b21d
* Wed Nov 21 2018 mosquito <sensor.wen@gmail.com> - 3.7.0-3
9f6b21d
- acpid is unavailable in ppc64le
9f6b21d
9f6b21d
* Wed Nov 21 2018 mosquito <sensor.wen@gmail.com> - 3.7.0-2
9f6b21d
- Build test for ppc64le and aarch64
9f6b21d
5d13bac
* Fri Nov  9 2018 mosquito <sensor.wen@gmail.com> - 3.7.0-1
5d13bac
- Update to 3.7.0
5d13bac
3141915
* Sat Aug 25 2018 mosquito <sensor.wen@gmail.com> - 3.2.20-1
3141915
- Update to 3.2.20
2d72bf1
aa16ac2
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.9-3
aa16ac2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
aa16ac2
55c9c05
* Mon Mar 19 2018 mosquito <sensor.wen@gmail.com> - 3.2.9-2
55c9c05
- Nothing providers grub2 in s390x and armv7hl.
55c9c05
940c020
* Fri Feb 16 2018 mosquito <sensor.wen@gmail.com> - 3.2.9-1
940c020
- Update to 3.2.9
940c020
16e977c
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.8-3
16e977c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
16e977c
d6c41e5
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 3.2.8-2
d6c41e5
- Rebuilt for switch to libxcrypt
d6c41e5
ce61a9a
* Fri Dec 22 2017 mosquito <sensor.wen@gmail.com> - 3.2.8-1
ce61a9a
- Update to 3.2.8
ce61a9a
07b789b
* Mon Nov 27 2017 mosquito <sensor.wen@gmail.com> - 3.2.7-1
07b789b
- Update to 3.2.7
07b789b
07b789b
* Fri Oct 27 2017 mosquito <sensor.wen@gmail.com> - 3.2.2-1
07b789b
- Update to 3.2.2
07b789b
a965425
* Sat Oct 14 2017 mosquito <sensor.wen@gmail.com> - 3.2.0-1
a965425
- Update to 3.2.0
a965425
00831f1
* Wed Aug 30 2017 mosquito <sensor.wen@gmail.com> - 3.1.19-2
00831f1
- Add fontconfig settings
00831f1
00831f1
* Sat Aug 26 2017 mosquito <sensor.wen@gmail.com> - 3.1.19-1
00831f1
- Update to 3.1.19
00831f1
00831f1
* Mon Aug 21 2017 mosquito <sensor.wen@gmail.com> - 3.1.18-1
00831f1
- Update to 3.1.18
00831f1
00831f1
* Wed Aug  2 2017 mosquito <sensor.wen@gmail.com> - 3.1.17-1
00831f1
- Update to 3.1.17
00831f1
00831f1
* Tue Aug  1 2017 mosquito <sensor.wen@gmail.com> - 3.1.16.1-1
00831f1
- Update to 3.1.16.1
00831f1
00831f1
* Thu Jul 20 2017 mosquito <sensor.wen@gmail.com> - 3.1.14-1.git0f8418a
00831f1
- Update to 3.1.14
00831f1
00831f1
* Fri Jul 14 2017 mosquito <sensor.wen@gmail.com> - 3.1.13-1.git03541ad
00831f1
- Update to 3.1.13
00831f1
00831f1
* Fri May 19 2017 mosquito <sensor.wen@gmail.com> - 3.1.9-1.git82313d2
00831f1
- Update to 3.1.9
00831f1
00831f1
* Sun Feb 26 2017 mosquito <sensor.wen@gmail.com> - 3.1.3-1.git87df955
00831f1
- Update to 3.1.3
00831f1
00831f1
* Fri Jan 20 2017 mosquito <sensor.wen@gmail.com> - 3.0.25.2-1.gitcfbe9c8
00831f1
- Update to 3.0.25.2
00831f1
00831f1
* Tue Jan 17 2017 mosquito <sensor.wen@gmail.com> - 3.0.25.1-1.gitde04735
00831f1
- Update to 3.0.25.1
00831f1
00831f1
* Sun Dec 18 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 3.0.24-2
00831f1
- Changed GOLANG dependencies
00831f1
00831f1
* Sun Dec 18 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 3.0.24-1
00831f1
- Upgrade to version 3.0.24
00831f1
00831f1
* Mon Oct 31 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 3.0.23-1
00831f1
- Upgrade to version 3.0.23
00831f1
00831f1
* Sun Sep 25 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 3.0.22-1
00831f1
- Initial package build