]>
Commit | Line | Data |
---|---|---|
11e4bb06 | 1 | # TODO |
879123f0 | 2 | # - fckeditor.* provide language interfaces. package them where? |
11e4bb06 | 3 | Summary: The text editor for Internet |
0d5841a4 | 4 | Summary(pl.UTF-8): Edytor tekstowy dla Internetu |
11e4bb06 | 5 | Name: fckeditor |
62513a26 | 6 | Version: 2.6.3 |
2900a700 | 7 | Release: 0.16 |
11e4bb06 ER |
8 | License: LGPL v2.1 |
9 | Group: Applications/WWW | |
10 | Source0: http://dl.sourceforge.net/fckeditor/FCKeditor_%{version}.tar.gz | |
62513a26 | 11 | # Source0-md5: eb926332283376614ade9610f20b27d4 |
2900a700 ER |
12 | Source1: %{name}-find-lang.sh |
13 | Patch0: %{name}-config-php.patch | |
11e4bb06 | 14 | URL: http://www.fckeditor.net/ |
4409a9c4 | 15 | BuildRequires: rpmbuild(macros) > 1.268 |
11e4bb06 | 16 | BuildRequires: sed >= 4.0 |
4409a9c4 AG |
17 | Requires: webserver(access) |
18 | Requires: webserver(alias) | |
11e4bb06 ER |
19 | BuildArch: noarch |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
879123f0 ER |
22 | %define _webapps /etc/webapps |
23 | %define _webapp %{name} | |
24 | %define _sysconfdir %{_webapps}/%{_webapp} | |
25 | %define _appdir %{_datadir}/%{name} | |
26 | ||
27 | %package connector-php | |
2900a700 | 28 | Summary: File Manager Connector for PHP |
879123f0 ER |
29 | Group: Applications/WWW |
30 | Requires: %{name} = %{version}-%{release} | |
31 | Requires: php-common >= 4:5.0.0 | |
32 | ||
33 | %description connector-php | |
2900a700 | 34 | File Manager Connector for PHP. |
879123f0 ER |
35 | |
36 | %package connector-perl | |
2900a700 | 37 | Summary: File Manager Connector for Perl |
879123f0 ER |
38 | Group: Applications/WWW |
39 | Requires: %{name} = %{version}-%{release} | |
40 | Requires: perl-base | |
41 | ||
42 | %description connector-perl | |
2900a700 | 43 | File Manager Connector for Perl. |
879123f0 ER |
44 | |
45 | %package connector-python | |
2900a700 | 46 | Summary: File Manager Connector for Python |
879123f0 ER |
47 | Group: Applications/WWW |
48 | Requires: %{name} = %{version}-%{release} | |
49 | Requires: python | |
50 | ||
51 | %description connector-python | |
2900a700 | 52 | File Manager Connector for Python. |
11e4bb06 ER |
53 | |
54 | %description | |
55 | This HTML text editor brings to the web many of the powerful | |
56 | functionalities of desktop editors like MS Word. It's lightweight and | |
57 | doesn't require any kind of installation on the client computer. | |
58 | ||
9d354683 JR |
59 | %description -l pl.UTF-8 |
60 | Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji | |
61 | edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej | |
2927bf25 JB |
62 | inicjalizacji na komputerze klienckim. |
63 | ||
879123f0 ER |
64 | # copied from /usr/lib/rpm/macros |
65 | %package debuginfo | |
66 | Summary: Debug information for package %{name} | |
67 | Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name} | |
68 | Group: Development/Debug | |
69 | AutoReqProv: 0 | |
70 | ||
71 | %description debuginfo | |
72 | This package provides debug information for package %{name}. Debug | |
73 | information is useful when developing applications that use this | |
74 | package or when debugging this package. | |
75 | ||
76 | %description debuginfo -l pl.UTF-8 | |
77 | Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}. | |
78 | Informacje te są przydatne przy rozwijaniu aplikacji używających tego | |
79 | pakietu oraz przy odpluskwianiu samego pakietu. | |
80 | ||
11e4bb06 | 81 | %prep |
3d29de61 ER |
82 | %setup -qc |
83 | mv fckeditor/* . | |
84 | rmdir fckeditor | |
9a74b07e | 85 | mv _samples samples |
879123f0 ER |
86 | mkdir samples/plugins |
87 | mv editor/plugins/bbcode/_sample samples/plugins/bbcode | |
88 | rm -f editor/lang/_translationstatus.txt | |
89 | ||
90 | install %{SOURCE1} find-lang.sh | |
91 | ||
92 | # fck php4 | |
93 | mv fckeditor_php5.php fckeditor.php | |
94 | rm fckeditor_php4.php | |
95 | ||
96 | %if %{_enable_debug_packages} | |
97 | %else | |
98 | # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ; | |
99 | rm -r editor/_source | |
100 | %endif | |
11e4bb06 ER |
101 | |
102 | # don't know if there's any interpreter for those on linux, so kill | |
9a74b07e | 103 | rm -f *.{afp,asp,cfc,cfm,lasso} |
879123f0 ER |
104 | rm -rf editor/filemanager/connectors/{asp,aspx,cfm,lasso} |
105 | rm -f editor/filemanager/connectors/{test,uploadtest}.html | |
11e4bb06 ER |
106 | |
107 | # undos the source | |
9a74b07e ER |
108 | sed -i -e 's,\r$,,' fckeditor* |
109 | find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,' | |
11e4bb06 | 110 | |
2900a700 ER |
111 | %patch0 -p1 |
112 | ||
4409a9c4 AG |
113 | # apache1/apache2 conf |
114 | cat > apache.conf <<'EOF' | |
115 | Alias /%{name} %{_appdir} | |
116 | <Directory %{_appdir}> | |
117 | Allow from all | |
118 | </Directory> | |
119 | EOF | |
120 | ||
121 | # lighttpd conf | |
122 | cat > lighttpd.conf <<'EOF' | |
123 | alias.url += ( | |
124 | "/%{name}" => "%{_appdir}", | |
125 | ) | |
126 | EOF | |
127 | ||
11e4bb06 ER |
128 | %install |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | install -d $RPM_BUILD_ROOT%{_appdir} | |
11e4bb06 | 131 | cp -a editor $RPM_BUILD_ROOT%{_appdir} |
879123f0 | 132 | cp -a fckconfig.* $RPM_BUILD_ROOT%{_appdir} |
4409a9c4 AG |
133 | cp -a *.xml $RPM_BUILD_ROOT%{_appdir} |
134 | ||
879123f0 ER |
135 | # these are sample language interfaces. move to examples? |
136 | cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir} | |
137 | ||
9a74b07e ER |
138 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
139 | cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
140 | ||
879123f0 ER |
141 | ./find-lang.sh %{name}.lang |
142 | ||
143 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
144 | cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
145 | cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
146 | cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
2900a700 | 147 | mv $RPM_BUILD_ROOT{%{_appdir}/editor/filemanager/connectors/php/config.php,%{_sysconfdir}/connector.php} |
879123f0 | 148 | |
4409a9c4 AG |
149 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
150 | %webapp_register apache %{_webapp} | |
151 | ||
152 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
153 | %webapp_unregister apache %{_webapp} | |
154 | ||
155 | %triggerin -- apache < 2.2.0, apache-base | |
156 | %webapp_register httpd %{_webapp} | |
157 | ||
158 | %triggerun -- apache < 2.2.0, apache-base | |
159 | %webapp_unregister httpd %{_webapp} | |
160 | ||
161 | %triggerin -- lighttpd | |
162 | %webapp_register lighttpd %{_webapp} | |
163 | ||
164 | %triggerun -- lighttpd | |
165 | %webapp_unregister lighttpd %{_webapp} | |
11e4bb06 ER |
166 | |
167 | %clean | |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
879123f0 | 170 | %files -f %{name}.lang |
11e4bb06 ER |
171 | %defattr(644,root,root,755) |
172 | %doc _* | |
879123f0 ER |
173 | %dir %attr(750,root,http) %{_sysconfdir} |
174 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
175 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
176 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
177 | %dir %{_appdir} | |
178 | %dir %{_appdir}/editor | |
179 | %{_appdir}/editor/css | |
180 | %{_appdir}/editor/dialog | |
181 | %{_appdir}/editor/skins | |
182 | %{_appdir}/editor/js | |
183 | %{_appdir}/editor/dtd | |
184 | %{_appdir}/editor/images | |
185 | ||
186 | %dir %{_appdir}/editor/plugins | |
187 | %{_appdir}/editor/plugins/autogrow | |
188 | %{_appdir}/editor/plugins/bbcode | |
189 | %{_appdir}/editor/plugins/dragresizetable | |
190 | %{_appdir}/editor/plugins/simplecommands | |
191 | %{_appdir}/editor/plugins/tablecommands | |
192 | %dir %{_appdir}/editor/plugins/placeholder | |
193 | %{_appdir}/editor/plugins/placeholder/fck_placeholder.html | |
194 | %{_appdir}/editor/plugins/placeholder/fckplugin.js | |
195 | %{_appdir}/editor/plugins/placeholder/placeholder.gif | |
196 | ||
197 | %dir %{_appdir}/editor/filemanager | |
198 | %{_appdir}/editor/filemanager/browser | |
199 | %dir %{_appdir}/editor/filemanager/connectors | |
200 | ||
201 | %{_appdir}/editor/fckdebug.html | |
202 | %{_appdir}/editor/fckdialog.html | |
203 | %{_appdir}/editor/fckeditor.html | |
204 | %{_appdir}/editor/fckeditor.original.html | |
205 | %{_appdir}/fckconfig.js | |
206 | %{_appdir}/fckeditor.js | |
207 | ||
208 | %{_appdir}/fckpackager.xml | |
209 | %{_appdir}/fckstyles.xml | |
210 | %{_appdir}/fcktemplates.xml | |
9a74b07e ER |
211 | |
212 | %{_examplesdir}/%{name}-%{version} | |
879123f0 ER |
213 | |
214 | %files connector-php | |
215 | %defattr(644,root,root,755) | |
2900a700 | 216 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/connector.php |
879123f0 ER |
217 | %{_appdir}/editor/filemanager/connectors/php |
218 | # language interface actually. | |
219 | %{_appdir}/fckeditor.php | |
220 | ||
221 | %files connector-perl | |
222 | %defattr(644,root,root,755) | |
223 | %{_appdir}/editor/filemanager/connectors/perl | |
224 | # language interface actually. | |
225 | %{_appdir}/fckeditor.pl | |
226 | ||
227 | %files connector-python | |
228 | %defattr(644,root,root,755) | |
229 | %{_appdir}/editor/filemanager/connectors/py | |
230 | # language interface actually. | |
231 | %{_appdir}/fckeditor.py | |
232 | ||
233 | %if %{_enable_debug_packages} | |
234 | %files debuginfo | |
235 | %defattr(644,root,root,755) | |
236 | %{_appdir}/editor/_source | |
237 | %endif |