2 # - fckeditor.* provide language interfaces. package them where?
3 Summary: The text editor for Internet
4 Summary(pl.UTF-8): Edytor tekstowy dla Internetu
9 Group: Applications/WWW
10 Source0: http://dl.sourceforge.net/fckeditor/FCKeditor_%{version}.tar.gz
11 # Source0-md5: eb926332283376614ade9610f20b27d4
12 Source1: %{name}-find-lang.sh
13 Patch0: %{name}-config-php.patch
14 URL: http://www.fckeditor.net/
15 BuildRequires: rpmbuild(macros) >= 1.268
16 BuildRequires: sed >= 4.0
17 Requires: webserver(access)
18 Requires: webserver(alias)
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _webapps /etc/webapps
23 %define _webapp %{name}
24 %define _sysconfdir %{_webapps}/%{_webapp}
25 %define _appdir %{_datadir}/%{name}
28 This HTML text editor brings to the web many of the powerful
29 functionalities of desktop editors like MS Word. It's lightweight and
30 doesn't require any kind of installation on the client computer.
32 %description -l pl.UTF-8
33 Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
34 edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
35 inicjalizacji na komputerze klienckim.
37 %package connector-php
38 Summary: File Manager Connector for PHP
39 Summary(pl.UTF-8): Interfejs zarządcy plików do PHP
40 Group: Applications/WWW
41 Requires: %{name} = %{version}-%{release}
42 Requires: php-common >= 4:5.0.0
44 %description connector-php
45 File Manager Connector for PHP.
47 %description connector-php -l pl.UTF-8
48 Interfejs zarządcy plików do PHP.
50 %package connector-perl
51 Summary: File Manager Connector for Perl
52 Summary(pl.UTF-8): Interfejs zarządcy plików do Perla
53 Group: Applications/WWW
54 Requires: %{name} = %{version}-%{release}
57 %description connector-perl
58 File Manager Connector for Perl.
60 %description connector-perl -l pl.UTF-8
61 Interfejs zarządcy plików do Perla.
63 %package connector-python
64 Summary: File Manager Connector for Python
65 Summary(pl.UTF-8): Interfejs zarządcy plików do Pythona
66 Group: Applications/WWW
67 Requires: %{name} = %{version}-%{release}
70 %description connector-python
71 File Manager Connector for Python.
73 %description connector-python -l pl.UTF-8
74 Interfejs zarządcy plików do Pythona.
76 # copied from /usr/lib/rpm/macros
78 Summary: Debug information for package %{name}
79 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}
80 Group: Development/Debug
83 %description debuginfo
84 This package provides debug information for package %{name}. Debug
85 information is useful when developing applications that use this
86 package or when debugging this package.
88 %description debuginfo -l pl.UTF-8
89 Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.
90 Informacje te są przydatne przy rozwijaniu aplikacji używających tego
91 pakietu oraz przy odpluskwianiu samego pakietu.
99 mv editor/plugins/bbcode/_sample samples/plugins/bbcode
100 rm -f editor/lang/_translationstatus.txt
102 install %{SOURCE1} find-lang.sh
105 mv fckeditor_php5.php fckeditor.php
106 rm fckeditor_php4.php
108 %if %{_enable_debug_packages}
110 # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ;
114 # don't know if there's any interpreter for those on linux, so kill
115 rm -f *.{afp,asp,cfc,cfm,lasso}
116 rm -rf editor/filemanager/connectors/{asp,aspx,cfm,lasso}
117 rm -f editor/filemanager/connectors/{test,uploadtest}.html
120 sed -i -e 's,\r$,,' fckeditor*
121 find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
125 # apache1/apache2 conf
126 cat > apache.conf <<'EOF'
127 Alias /%{name} %{_appdir}
128 <Directory %{_appdir}>
134 cat > lighttpd.conf <<'EOF'
136 "/%{name}" => "%{_appdir}",
141 rm -rf $RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT%{_appdir}
143 cp -a editor $RPM_BUILD_ROOT%{_appdir}
144 cp -a fckconfig.* $RPM_BUILD_ROOT%{_appdir}
145 cp -a *.xml $RPM_BUILD_ROOT%{_appdir}
147 # these are sample language interfaces. move to examples?
148 cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir}
150 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
151 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
153 ./find-lang.sh %{name}.lang
155 install -d $RPM_BUILD_ROOT%{_sysconfdir}
156 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
157 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
158 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
159 mv $RPM_BUILD_ROOT{%{_appdir}/editor/filemanager/connectors/php/config.php,%{_sysconfdir}/connector.php}
161 %triggerin -- apache1 < 1.3.37-3, apache1-base
162 %webapp_register apache %{_webapp}
164 %triggerun -- apache1 < 1.3.37-3, apache1-base
165 %webapp_unregister apache %{_webapp}
167 %triggerin -- apache < 2.2.0, apache-base
168 %webapp_register httpd %{_webapp}
170 %triggerun -- apache < 2.2.0, apache-base
171 %webapp_unregister httpd %{_webapp}
173 %triggerin -- lighttpd
174 %webapp_register lighttpd %{_webapp}
176 %triggerun -- lighttpd
177 %webapp_unregister lighttpd %{_webapp}
180 rm -rf $RPM_BUILD_ROOT
182 %files -f %{name}.lang
183 %defattr(644,root,root,755)
185 %dir %attr(750,root,http) %{_sysconfdir}
186 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
187 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
188 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
190 %dir %{_appdir}/editor
191 %{_appdir}/editor/css
192 %{_appdir}/editor/dialog
193 %{_appdir}/editor/skins
195 %{_appdir}/editor/dtd
196 %{_appdir}/editor/images
198 %dir %{_appdir}/editor/plugins
199 %{_appdir}/editor/plugins/autogrow
200 %{_appdir}/editor/plugins/bbcode
201 %{_appdir}/editor/plugins/dragresizetable
202 %{_appdir}/editor/plugins/simplecommands
203 %{_appdir}/editor/plugins/tablecommands
204 %dir %{_appdir}/editor/plugins/placeholder
205 %{_appdir}/editor/plugins/placeholder/fck_placeholder.html
206 %{_appdir}/editor/plugins/placeholder/fckplugin.js
207 %{_appdir}/editor/plugins/placeholder/placeholder.gif
209 %dir %{_appdir}/editor/filemanager
210 %{_appdir}/editor/filemanager/browser
211 %dir %{_appdir}/editor/filemanager/connectors
213 %{_appdir}/editor/fckdebug.html
214 %{_appdir}/editor/fckdialog.html
215 %{_appdir}/editor/fckeditor.html
216 %{_appdir}/editor/fckeditor.original.html
217 %{_appdir}/fckconfig.js
218 %{_appdir}/fckeditor.js
220 %{_appdir}/fckpackager.xml
221 %{_appdir}/fckstyles.xml
222 %{_appdir}/fcktemplates.xml
224 %{_examplesdir}/%{name}-%{version}
227 %defattr(644,root,root,755)
228 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/connector.php
229 %{_appdir}/editor/filemanager/connectors/php
230 # language interface actually.
231 %{_appdir}/fckeditor.php
233 %files connector-perl
234 %defattr(644,root,root,755)
235 %{_appdir}/editor/filemanager/connectors/perl
236 # language interface actually.
237 %{_appdir}/fckeditor.pl
239 %files connector-python
240 %defattr(644,root,root,755)
241 %{_appdir}/editor/filemanager/connectors/py
242 # language interface actually.
243 %{_appdir}/fckeditor.py
245 %if %{_enable_debug_packages}
247 %defattr(644,root,root,755)
248 %{_appdir}/editor/_source