169 lines
5.2 KiB
RPMSpec
169 lines
5.2 KiB
RPMSpec
|
#
|
||
|
# spec file for package deepin-daemon
|
||
|
#
|
||
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||
|
#
|
||
|
# All modifications and additions to the file contributed by third parties
|
||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
# upon. The license for this file, and modifications and additions to the
|
||
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
# license for the pristine package is not an Open Source License, in which
|
||
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
# published by the Open Source Initiative.
|
||
|
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
%define _name dde-daemon
|
||
|
|
||
|
Name: deepin-daemon
|
||
|
Version: 3.2.0
|
||
|
Release: 0
|
||
|
Summary: Daemon handling the DDE session settings
|
||
|
License: GPL-3.0+
|
||
|
URL: https://github.com/linuxdeepin/dde-daemon
|
||
|
Source0: https://github.com/linuxdeepin/dde-daemon/archive/%{version}/%{_name}-%{version}.tar.gz
|
||
|
Source1: %{name}.sysusers
|
||
|
# PATCH-FIX-UPSTREAM deepin-daemon-fix-wrong-policy-settings.patch hillwood@opensuse.org - Fix wrong policyconfig settings.
|
||
|
Source99: %{name}-rpmlintrc
|
||
|
Patch0: %{name}-fix-wrong-policy-settings.patch
|
||
|
Group: System/GUI/Other
|
||
|
BuildRequires: golang-packaging
|
||
|
BuildRequires: gettext
|
||
|
BuildRequires: golang-gir-generator
|
||
|
BuildRequires: fontpackages-devel
|
||
|
BuildRequires: pam-devel
|
||
|
BuildRequires: pkgconfig(fontconfig)
|
||
|
BuildRequires: pkgconfig(gnome-keyring-1)
|
||
|
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
|
||
|
BuildRequires: pkgconfig(gtk+-3.0)
|
||
|
BuildRequires: pkgconfig(gio-2.0)
|
||
|
BuildRequires: pkgconfig(libbamf3)
|
||
|
BuildRequires: pkgconfig(libcanberra)
|
||
|
BuildRequires: pkgconfig(libpulse)
|
||
|
BuildRequires: pkgconfig(libsystemd)
|
||
|
BuildRequires: pkgconfig(libudev)
|
||
|
BuildRequires: pkgconfig(gudev-1.0)
|
||
|
BuildRequires: pkgconfig(librsvg-2.0)
|
||
|
BuildRequires: pkgconfig(libinput)
|
||
|
BuildRequires: pkgconfig(poppler-glib)
|
||
|
BuildRequires: pkgconfig(x11)
|
||
|
BuildRequires: pkgconfig(xi)
|
||
|
BuildRequires: pkgconfig(xtst)
|
||
|
BuildRequires: pkgconfig(xcursor)
|
||
|
BuildRequires: pkgconfig(xfixes)
|
||
|
BuildRequires: pkgconfig(xkbfile)
|
||
|
BuildRequires: golang-dbus-factory
|
||
|
BuildRequires: golang-go-lib
|
||
|
BuildRequires: golang-deepin-api-source
|
||
|
BuildRequires: golang-github-linuxdeepin-go-x11-client
|
||
|
BuildRequires: golang-github-burntsushi-xgb
|
||
|
BuildRequires: golang-github-burntsushi-xgbutil
|
||
|
BuildRequires: golang-github-axgle-mahonia
|
||
|
BuildRequires: golang-github-msteinert-pam
|
||
|
BuildRequires: golang-github-nfnt-resize
|
||
|
BuildRequires: golang-github-alecthomas-kingpin
|
||
|
BuildRequires: golang-gopkgin-yaml
|
||
|
BuildRequires: golang-org-x-tools
|
||
|
BuildRequires: golang-org-x-text
|
||
|
BuildRequires: golang-org-x-net
|
||
|
Requires: deepin-desktop-base
|
||
|
Requires: deepin-desktop-schemas
|
||
|
Requires: deepin-notifications
|
||
|
Requires: deepin-polkit-agent
|
||
|
Requires: acpid
|
||
|
Requires: gvfs
|
||
|
Requires: iw
|
||
|
Requires: rfkill
|
||
|
Requires: upower
|
||
|
Requires: xdotool
|
||
|
Requires: systemd
|
||
|
Recommends: NetworkManager-vpnc-gnome
|
||
|
Recommends: NetworkManager-pptp-gnome
|
||
|
Recommends: NetworkManager-l2tp-gnome
|
||
|
Recommends: NetworkManager-strongswan-gnome
|
||
|
Recommends: NetworkManager-openvpn-gnome
|
||
|
Recommends: NetworkManager-openconnect-gnome
|
||
|
Recommends: iso-codes
|
||
|
Recommends: mobile-broadband-provider-info
|
||
|
Recommends: google-noto-mono-fonts
|
||
|
Recommends: google-noto-sans-fonts
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
|
||
|
%description
|
||
|
Deepin Daemon is a daemon for handling the deepin session settings
|
||
|
|
||
|
%lang_package
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n %{_name}-%{version}
|
||
|
%patch0 -p1
|
||
|
|
||
|
# Fix library exec path
|
||
|
sed -i '/ldflags/d' Makefile
|
||
|
|
||
|
# Fix grub.cfg path
|
||
|
sed -i 's|boot/grub|boot/grub2|' grub2/{theme,log,entry,config}.go
|
||
|
sed -i 's|default_background.jpg|default.png|' accounts/user.go
|
||
|
|
||
|
%build
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%install
|
||
|
%make_install
|
||
|
|
||
|
install -Dm644 %{S:1} %{buildroot}/usr/lib/sysusers.d/deepin-daemon.conf
|
||
|
|
||
|
# fix systemd/logind config
|
||
|
install -d %{buildroot}/usr/lib/systemd/logind.conf.d/
|
||
|
cat > %{buildroot}/usr/lib/systemd/logind.conf.d/10-%{name}.conf <<EOF
|
||
|
[Login]
|
||
|
HandlePowerKey=ignore
|
||
|
HandleSuspendKey=ignore
|
||
|
EOF
|
||
|
|
||
|
%find_lang %{_name}
|
||
|
|
||
|
%post
|
||
|
if [ $1 -ge 1 ]; then
|
||
|
%sysusers_create deepin-daemon.conf
|
||
|
%{_sbindir}/alternatives --install %{_bindir}/x-terminal-emulator \
|
||
|
x-terminal-emulator %{_libexecdir}/%{name}/default-terminal 30
|
||
|
fi
|
||
|
|
||
|
%preun
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
%{_sbindir}/alternatives --remove x-terminal-emulator \
|
||
|
%{_libexecdir}/%{name}/default-terminal
|
||
|
fi
|
||
|
|
||
|
%postun
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
rm -f /var/cache/deepin/mark-setup-network-services
|
||
|
rm -f /var/log/deepin.log
|
||
|
fi
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc README.md LICENSE
|
||
|
%{_libexecdir}/%{name}/
|
||
|
%dir %{_sysusersdir}
|
||
|
%{_sysusersdir}/%{name}.conf
|
||
|
%dir %{_libexecdir}/systemd/logind.conf.d
|
||
|
%{_libexecdir}/systemd/logind.conf.d/10-%{name}.conf
|
||
|
%{_datadir}/dbus-1/services/*.service
|
||
|
%{_datadir}/dbus-1/system-services/*.service
|
||
|
%dir %{_datadir}/dbus-1/system.d
|
||
|
%{_datadir}/dbus-1/system.d/*.conf
|
||
|
%{_datadir}/%{_name}/
|
||
|
%{_datadir}/dde/
|
||
|
%dir %{_datadir}/polkit-1
|
||
|
%dir %{_datadir}/polkit-1/actions
|
||
|
%{_datadir}/polkit-1/actions/*.policy
|
||
|
%{_var}/cache/appearance/
|
||
|
|
||
|
%files lang -f %{_name}.lang
|
||
|
|
||
|
%changelog
|