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}
27 %package connector-php
28 Summary: File Manager Connector for PHP
29 Group: Applications/WWW
30 Requires: %{name} = %{version}-%{release}
31 Requires: php-common >= 4:5.0.0
33 %description connector-php
34 File Manager Connector for PHP.
36 %package connector-perl
37 Summary: File Manager Connector for Perl
38 Group: Applications/WWW
39 Requires: %{name} = %{version}-%{release}
42 %description connector-perl
43 File Manager Connector for Perl.
45 %package connector-python
46 Summary: File Manager Connector for Python
47 Group: Applications/WWW
48 Requires: %{name} = %{version}-%{release}
51 %description connector-python
52 File Manager Connector for Python.
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.
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
62 inicjalizacji na komputerze klienckim.
64 # copied from /usr/lib/rpm/macros
66 Summary: Debug information for package %{name}
67 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}
68 Group: Development/Debug
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.
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.
87 mv editor/plugins/bbcode/_sample samples/plugins/bbcode
88 rm -f editor/lang/_translationstatus.txt
90 install %{SOURCE1} find-lang.sh
93 mv fckeditor_php5.php fckeditor.php
96 %if %{_enable_debug_packages}
98 # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ;
102 # don't know if there's any interpreter for those on linux, so kill
103 rm -f *.{afp,asp,cfc,cfm,lasso}
104 rm -rf editor/filemanager/connectors/{asp,aspx,cfm,lasso}
105 rm -f editor/filemanager/connectors/{test,uploadtest}.html
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$,,'
113 # apache1/apache2 conf
114 cat > apache.conf <<'EOF'
115 Alias /%{name} %{_appdir}
116 <Directory %{_appdir}>
122 cat > lighttpd.conf <<'EOF'
124 "/%{name}" => "%{_appdir}",
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT%{_appdir}
131 cp -a editor $RPM_BUILD_ROOT%{_appdir}
132 cp -a fckconfig.* $RPM_BUILD_ROOT%{_appdir}
133 cp -a *.xml $RPM_BUILD_ROOT%{_appdir}
135 # these are sample language interfaces. move to examples?
136 cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir}
138 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
141 ./find-lang.sh %{name}.lang
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
147 mv $RPM_BUILD_ROOT{%{_appdir}/editor/filemanager/connectors/php/config.php,%{_sysconfdir}/connector.php}
149 %triggerin -- apache1 < 1.3.37-3, apache1-base
150 %webapp_register apache %{_webapp}
152 %triggerun -- apache1 < 1.3.37-3, apache1-base
153 %webapp_unregister apache %{_webapp}
155 %triggerin -- apache < 2.2.0, apache-base
156 %webapp_register httpd %{_webapp}
158 %triggerun -- apache < 2.2.0, apache-base
159 %webapp_unregister httpd %{_webapp}
161 %triggerin -- lighttpd
162 %webapp_register lighttpd %{_webapp}
164 %triggerun -- lighttpd
165 %webapp_unregister lighttpd %{_webapp}
168 rm -rf $RPM_BUILD_ROOT
170 %files -f %{name}.lang
171 %defattr(644,root,root,755)
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
178 %dir %{_appdir}/editor
179 %{_appdir}/editor/css
180 %{_appdir}/editor/dialog
181 %{_appdir}/editor/skins
183 %{_appdir}/editor/dtd
184 %{_appdir}/editor/images
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
197 %dir %{_appdir}/editor/filemanager
198 %{_appdir}/editor/filemanager/browser
199 %dir %{_appdir}/editor/filemanager/connectors
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
208 %{_appdir}/fckpackager.xml
209 %{_appdir}/fckstyles.xml
210 %{_appdir}/fcktemplates.xml
212 %{_examplesdir}/%{name}-%{version}
215 %defattr(644,root,root,755)
216 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/connector.php
217 %{_appdir}/editor/filemanager/connectors/php
218 # language interface actually.
219 %{_appdir}/fckeditor.php
221 %files connector-perl
222 %defattr(644,root,root,755)
223 %{_appdir}/editor/filemanager/connectors/perl
224 # language interface actually.
225 %{_appdir}/fckeditor.pl
227 %files connector-python
228 %defattr(644,root,root,755)
229 %{_appdir}/editor/filemanager/connectors/py
230 # language interface actually.
231 %{_appdir}/fckeditor.py
233 %if %{_enable_debug_packages}
235 %defattr(644,root,root,755)
236 %{_appdir}/editor/_source