-
Notifications
You must be signed in to change notification settings - Fork 24
/
yast2-theme.spec.in
148 lines (126 loc) · 3.71 KB
/
yast2-theme.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@HEADER-COMMENT@
@HEADER@
Group: System/YaST
License: GPL v2 or later
BuildRequires: yast2-devtools pkg-config update-desktop-files hicolor-icon-theme fdupes
BuildArchitectures: noarch
Summary: YaST2 - Theme
%description
Contains the SuSE Linux theme for YaST2.
%package openSUSE
Summary: YaST2 - Theme (openSUSE)
Version: @VERSION@
Group: System/YaST
Provides: yast2_theme = %{version}
Provides: yast2-theme-UnitedLinux
Provides: yast2-theme-openSUSE-any
PreReq: /bin/ln
Requires: hicolor-icon-theme
Obsoletes: yast2-theme-SuSELinux
Provides: yast2-theme-SuSELinux
Obsoletes: yast2-theme-UnitedLinux
Provides: yast2-theme-UnitedLinux
%package openSUSE-Crystal
Summary: YaST2 - Theme (openSUSE)
Version: @VERSION@
Group: System/YaST
Provides: yast2_theme = %{version}
Provides: yast2-theme-openSUSE-any
PreReq: /bin/ln yast2-theme-openSUSE
%package openSUSE-Oxygen
Summary: YaST2 - Theme (openSUSE)
Version: @VERSION@
Group: System/YaST
Provides: yast2_theme = %{version}
Provides: yast2-theme-openSUSE-any
PreReq: /bin/ln yast2-theme-openSUSE
Conflicts: yast2-theme-openSUSE-Crystal
%package SLE
Summary: YaST2 - SLE Theme
Version: @VERSION@
Group: System/YaST
Provides: yast2_theme = %{version}
Provides: yast2-theme-NLD = 0.4.5
Obsoletes: yast2-theme-NLD <= 0.4.5
PreReq: /bin/ln
%description openSUSE
This package contains the openSUSE theme for YaST2.
%description openSUSE-Crystal
This package contains the openSUSE theme for YaST2.
%description openSUSE-Oxygen
This package contains the openSUSE theme for YaST2.
%description SLE
This package contains the YaST2 theme for the SUSE Linux Enterprise
Family.
@PREP@
@BUILD@
@INSTALL@
cp -R "$RPM_BUILD_ROOT/@docdir@" "$RPM_BUILD_ROOT/@docdir@-openSUSE"
rm -rf "$RPM_BUILD_ROOT/@docdir@"
# ghost file (not packed in RPM but listed)
cd $RPM_BUILD_ROOT/@themedir@/
rm -rf openSUSE-current
ln -sn openSUSE openSUSE-current
#
# make icons available to GNOME control center (hicolor theme)
# (bug #166008)
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/22x22/apps
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/64x64/apps
cd $RPM_BUILD_ROOT/@themedir@/openSUSE-current/icons
for dir in 22x22 32x32 48x48 64x64; do
cd $RPM_BUILD_ROOT/@themedir@/openSUSE-current/icons/$dir/apps
icons=$(ls *.png)
cd $RPM_BUILD_ROOT/usr/share/icons/hicolor/$dir/apps
for icon in $icons; do
ln -s @themedir@/openSUSE-current/icons/$dir/apps/$icon .
done
done
filelist=$(mktemp /tmp/fileListXXXXXX)
cd $RPM_BUILD_ROOT/@themedir@/openSUSE
files=$(find . -type f)
for subtheme in Crystal Oxygen; do
cd $RPM_BUILD_ROOT/@themedir@/openSUSE-$subtheme
for file in $files; do
mkdir -p $(dirname "$file") || true
if ! test -f "$file"; then
ln -s @themedir@/openSUSE/$file $file
fi
done
done
%fdupes $RPM_BUILD_ROOT/@themedir@
@CLEAN@
rm -rf $RPM_BUILD_ROOT/@themedir@
%post openSUSE
cd @themedir@
if ! test -d openSUSE-Crystal && ! test -d openSUSE-Oxygen; then
ln -snf openSUSE openSUSE-current
fi
%post openSUSE-Crystal
cd @themedir@
ln -snf openSUSE-Crystal openSUSE-current
%post openSUSE-Oxygen
cd @themedir@
ln -snf openSUSE-Oxygen openSUSE-current
%files openSUSE
%defattr(-,root,root)
%dir @themedir@
@themedir@/openSUSE
/usr/share/icons/hicolor/*/apps/*
%doc @docdir@-openSUSE
# ghost file (not packed in RPM but listed)
# remove the file when removing the RPM
%ghost @themedir@/openSUSE-current
%files openSUSE-Crystal
%defattr(-,root,root)
%dir @themedir@
@themedir@/openSUSE-Crystal
%files openSUSE-Oxygen
%defattr(-,root,root)
%dir @themedir@
@themedir@/openSUSE-Oxygen
%files SLE
%defattr(-,root,root)
%dir @themedir@
@themedir@/SLE