forked from QubesOS/qubes-desktop-linux-xfce4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxfce4-settings-qubes.spec.in
116 lines (84 loc) · 3.32 KB
/
xfce4-settings-qubes.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Name: xfce4-settings-qubes
Version: @VERSION@
Release: @REL@%{?dist}
Summary: Default Xfce4 panel settings for Qubes
Group: User Interface/Desktops
License: GPLv2+
URL: http://www.qubes-os.org/
Source0: %{name}-%{version}.tar.gz
BuildRequires: make
Requires: qubes-artwork
Requires: xfce4-panel
Requires: xss-lock
Requires: util-linux
Requires(post): xfce4-panel
# We ship garcon menu file into this package
# the fork is not needed anymore
Conflicts: garcon = 1000:0.6.2
Conflicts: garcon = 1000:0.6.4
Requires: garcon >= 0.6.2
%description
%{summary}
%prep
%setup -q
%install
%make_install
%define settings_replace() \
qubesfile="%{1}" \
origfile=${qubesfile%.qubes} \
backupfile=${origfile}.xfce4 \
if [ -r "$origfile" ] && [ ! -r "$backupfile" ]; then \
mv -f "$origfile" "$backupfile" \
fi \
cp -f "$qubesfile" "$origfile" \
%{nil}
%triggerin -- xfce4-panel
%settings_replace %{_sysconfdir}/xdg/xfce4/panel/default.xml.qubes
%triggerin -- xfce4-settings
%settings_replace %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.qubes
%triggerin -- xfce4-session
%settings_replace %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml.qubes
%triggerin -- xfce4-power-manager
%settings_replace %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml.qubes
%triggerin -- libxfce4ui
%settings_replace %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.qubes
%triggerin -- xscreensaver-base
conffile=/etc/xscreensaver/XScreenSaver.ad.tail
if ! grep -q "! Qubes options begin" $conffile; then
( echo -e "! Qubes options begin - do not edit\n! Qubes options end"; cat $conffile) > $conffile.tmp
mv $conffile.tmp $conffile
fi
sed -e '/! Qubes options begin/,/! Qubes options end/c \
! Qubes options begin - do not edit\
*newLoginCommand:\
*fade: False\
! Qubes options end' -i $conffile
update-xscreensaver-hacks
%postun
REPLACEFILE="${REPLACEFILE} %{_sysconfdir}/xdg/xfce4/panel/default.xml.qubes"
REPLACEFILE="${REPLACEFILE} %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.qubes"
REPLACEFILE="${REPLACEFILE} %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml.qubes"
REPLACEFILE="${REPLACEFILE} %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml.qubes"
REPLACEFILE="${REPLACEFILE} %{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.qubes"
if [ $1 -lt 1 ]; then
for file in ${REPLACEFILE}; do
origfile=${file%.qubes}
backupfile=${origfile}.xfce4
mv -f "$backupfile" "$origfile"
done
fi
%files
%{_sysconfdir}/xdg/xfce4/panel/default.xml.qubes
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.qubes
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml.qubes
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml.qubes
%{_sysconfdir}/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.qubes
%{_sysconfdir}/xdg/autostart/xfce4-xss-lock.desktop
%{_sysconfdir}/xdg/autostart/qubes-update-xfce-config.desktop
%{_sysconfdir}/X11/xinit/xinitrc.d/55xfce-qubes.sh
/usr/lib/qubes/update-xfce-config
%changelog
@CHANGELOG@