Changes of Revision 32

roundcubemail.spec Changed
x
 
1
@@ -1382,6 +1382,37 @@
2
     ) >> plugins.files
3
 
4
     (
5
+        echo "%post plugin-$(basename $plugin)"
6
+        echo "if [ -f \"%%{php_inidir}/apc.ini\" ]; then"
7
+        echo "    if [ ! -z \"\$(grep ^apc.enabled=1 %%{php_inidir}/apc.ini)\" ]; then"
8
+        echo "%if 0%%{?with_systemd}"
9
+        echo "        /bin/systemctl condrestart %%{httpd_name}.service"
10
+        echo "%else"
11
+        echo "        /sbin/service %%{httpd_name} condrestart"
12
+        echo "%endif"
13
+        echo "    fi"
14
+        echo "fi"
15
+        echo ""
16
+        if [ ! -z "$(find ${plugin} -type d -name \"SQL\")" ]; then
17
+            echo "for dir in \$(find /usr/share/roundcubemail/plugins/$(basename $plugin)/ -type d -name \"SQL\"); do"
18
+            echo "    # Skip plugins with multiple drivers and no kolab driver"
19
+            echo "    if [ ! -z \"\$(echo \$dir | grep driver)\" ]; then"
20
+            echo "        if [ -z \"\$(echo \$dir | grep kolab)\" ]; then"
21
+            echo "            continue"
22
+            echo "        fi"
23
+            echo "    fi"
24
+            echo ""
25
+            echo "    /usr/share/roundcubemail/bin/updatedb.sh \\"
26
+            echo "        --dir \$dir \\"
27
+            echo "        --package $(basename $plugin) \\"
28
+            echo "        >/dev/null 2>&1 || :"
29
+            echo ""
30
+            echo "done"
31
+            echo ""
32
+        fi
33
+    ) >> plugins.post
34
+
35
+    (
36
         echo "%package plugin-$(basename $plugin)-assets"
37
         echo "Summary:        Plugin $(basename $plugin) Assets"
38
         echo "Group:          Applications/Internet"
39
@@ -1933,7 +1964,7 @@
40
 %clean
41
 %{__rm} -rf %{buildroot}
42
 
43
-%post
44
+%post core
45
 # replace default des string in config file for better security
46
 function makedesstr () {
47
     chars=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A
48
@@ -1970,6 +2001,358 @@
49
 
50
 exit 0
51
 
52
+%post plugin-acl
53
+if [ -f "%{php_inidir}/apc.ini" ]; then
54
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
55
+%if 0%{?with_systemd}
56
+        /bin/systemctl condrestart %{httpd_name}.service
57
+%else
58
+        /sbin/service %{httpd_name} condrestart
59
+%endif
60
+    fi
61
+fi
62
+
63
+%post plugin-additional_message_headers
64
+if [ -f "%{php_inidir}/apc.ini" ]; then
65
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
66
+%if 0%{?with_systemd}
67
+        /bin/systemctl condrestart %{httpd_name}.service
68
+%else
69
+        /sbin/service %{httpd_name} condrestart
70
+%endif
71
+    fi
72
+fi
73
+
74
+%post plugin-archive
75
+if [ -f "%{php_inidir}/apc.ini" ]; then
76
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
77
+%if 0%{?with_systemd}
78
+        /bin/systemctl condrestart %{httpd_name}.service
79
+%else
80
+        /sbin/service %{httpd_name} condrestart
81
+%endif
82
+    fi
83
+fi
84
+
85
+%post plugin-attachment_reminder
86
+if [ -f "%{php_inidir}/apc.ini" ]; then
87
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
88
+%if 0%{?with_systemd}
89
+        /bin/systemctl condrestart %{httpd_name}.service
90
+%else
91
+        /sbin/service %{httpd_name} condrestart
92
+%endif
93
+    fi
94
+fi
95
+
96
+%post plugin-autologon
97
+if [ -f "%{php_inidir}/apc.ini" ]; then
98
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
99
+%if 0%{?with_systemd}
100
+        /bin/systemctl condrestart %{httpd_name}.service
101
+%else
102
+        /sbin/service %{httpd_name} condrestart
103
+%endif
104
+    fi
105
+fi
106
+
107
+%post plugin-database_attachments
108
+if [ -f "%{php_inidir}/apc.ini" ]; then
109
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
110
+%if 0%{?with_systemd}
111
+        /bin/systemctl condrestart %{httpd_name}.service
112
+%else
113
+        /sbin/service %{httpd_name} condrestart
114
+%endif
115
+    fi
116
+fi
117
+
118
+%post plugin-debug_logger
119
+if [ -f "%{php_inidir}/apc.ini" ]; then
120
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
121
+%if 0%{?with_systemd}
122
+        /bin/systemctl condrestart %{httpd_name}.service
123
+%else
124
+        /sbin/service %{httpd_name} condrestart
125
+%endif
126
+    fi
127
+fi
128
+
129
+%post plugin-emoticons
130
+if [ -f "%{php_inidir}/apc.ini" ]; then
131
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
132
+%if 0%{?with_systemd}
133
+        /bin/systemctl condrestart %{httpd_name}.service
134
+%else
135
+        /sbin/service %{httpd_name} condrestart
136
+%endif
137
+    fi
138
+fi
139
+
140
+%post plugin-enigma
141
+if [ -f "%{php_inidir}/apc.ini" ]; then
142
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
143
+%if 0%{?with_systemd}
144
+        /bin/systemctl condrestart %{httpd_name}.service
145
+%else
146
+        /sbin/service %{httpd_name} condrestart
147
+%endif
148
+    fi
149
+fi
150
+
151
+%post plugin-example_addressbook
152
+if [ -f "%{php_inidir}/apc.ini" ]; then
153
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
154
+%if 0%{?with_systemd}
155
+        /bin/systemctl condrestart %{httpd_name}.service
156
+%else
157
+        /sbin/service %{httpd_name} condrestart
158
+%endif
159
+    fi
160
+fi
161
+
162
+%post plugin-filesystem_attachments
163
+if [ -f "%{php_inidir}/apc.ini" ]; then
164
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
165
+%if 0%{?with_systemd}
166
+        /bin/systemctl condrestart %{httpd_name}.service
167
+%else
168
+        /sbin/service %{httpd_name} condrestart
169
+%endif
170
+    fi
171
+fi
172
+
173
+%post plugin-help
174
+if [ -f "%{php_inidir}/apc.ini" ]; then
175
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
176
+%if 0%{?with_systemd}
177
+        /bin/systemctl condrestart %{httpd_name}.service
178
+%else
179
+        /sbin/service %{httpd_name} condrestart
180
+%endif
181
+    fi
182
+fi
183
+
184
+%post plugin-hide_blockquote
185
+if [ -f "%{php_inidir}/apc.ini" ]; then
186
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
187
+%if 0%{?with_systemd}
188
+        /bin/systemctl condrestart %{httpd_name}.service
189
+%else
190
+        /sbin/service %{httpd_name} condrestart
191
+%endif
192
+    fi
193
+fi
194
+
195
+%post plugin-http_authentication
196
+if [ -f "%{php_inidir}/apc.ini" ]; then
197
+    if [ ! -z "$(grep ^apc.enabled=1 %{php_inidir}/apc.ini)" ]; then
198
+%if 0%{?with_systemd}
199
+        /bin/systemctl condrestart %{httpd_name}.service
200
+%else
201