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: fckeditor-find-lang.sh
13 URL: http://www.fckeditor.net/
14 BuildRequires: rpmbuild(macros) > 1.268
15 BuildRequires: sed >= 4.0
16 Requires: webserver(access)
17 Requires: webserver(alias)
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _webapps /etc/webapps
22 %define _webapp %{name}
23 %define _sysconfdir %{_webapps}/%{_webapp}
24 %define _appdir %{_datadir}/%{name}
26 %package connector-php
27 Summary: File upload connector for PHP backend
28 Group: Applications/WWW
29 Requires: %{name} = %{version}-%{release}
30 Requires: php-common >= 4:5.0.0
32 %description connector-php
33 File upload connector for PHP backend.
35 %package connector-perl
36 Summary: File upload connector for Perl backend
37 Group: Applications/WWW
38 Requires: %{name} = %{version}-%{release}
41 %description connector-perl
42 File upload connector for Perl backend.
44 %package connector-python
45 Summary: File upload connector for Python backend
46 Group: Applications/WWW
47 Requires: %{name} = %{version}-%{release}
50 %description connector-python
51 File upload connector for Python backend.
54 This HTML text editor brings to the web many of the powerful
55 functionalities of desktop editors like MS Word. It's lightweight and
56 doesn't require any kind of installation on the client computer.
58 %description -l pl.UTF-8
59 Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
60 edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
61 inicjalizacji na komputerze klienckim.
63 # copied from /usr/lib/rpm/macros
65 Summary: Debug information for package %{name}
66 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}
67 Group: Development/Debug
70 %description debuginfo
71 This package provides debug information for package %{name}. Debug
72 information is useful when developing applications that use this
73 package or when debugging this package.
75 %description debuginfo -l pl.UTF-8
76 Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.
77 Informacje te są przydatne przy rozwijaniu aplikacji używających tego
78 pakietu oraz przy odpluskwianiu samego pakietu.
86 mv editor/plugins/bbcode/_sample samples/plugins/bbcode
87 rm -f editor/lang/_translationstatus.txt
89 install %{SOURCE1} find-lang.sh
92 mv fckeditor_php5.php fckeditor.php
95 %if %{_enable_debug_packages}
97 # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ;
101 # don't know if there's any interpreter for those on linux, so kill
102 rm -f *.{afp,asp,cfc,cfm,lasso}
103 rm -rf editor/filemanager/connectors/{asp,aspx,cfm,lasso}
104 rm -f editor/filemanager/connectors/{test,uploadtest}.html
107 sed -i -e 's,\r$,,' fckeditor*
108 find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
110 # apache1/apache2 conf
111 cat > apache.conf <<'EOF'
112 Alias /%{name} %{_appdir}
113 <Directory %{_appdir}>
119 cat > lighttpd.conf <<'EOF'
121 "/%{name}" => "%{_appdir}",
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT%{_appdir}
128 cp -a editor $RPM_BUILD_ROOT%{_appdir}
129 cp -a fckconfig.* $RPM_BUILD_ROOT%{_appdir}
130 cp -a *.xml $RPM_BUILD_ROOT%{_appdir}
132 # these are sample language interfaces. move to examples?
133 cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir}
135 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
136 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
138 ./find-lang.sh %{name}.lang
140 install -d $RPM_BUILD_ROOT%{_sysconfdir}
141 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
142 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
143 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
145 %triggerin -- apache1 < 1.3.37-3, apache1-base
146 %webapp_register apache %{_webapp}
148 %triggerun -- apache1 < 1.3.37-3, apache1-base
149 %webapp_unregister apache %{_webapp}
151 %triggerin -- apache < 2.2.0, apache-base
152 %webapp_register httpd %{_webapp}
154 %triggerun -- apache < 2.2.0, apache-base
155 %webapp_unregister httpd %{_webapp}
157 %triggerin -- lighttpd
158 %webapp_register lighttpd %{_webapp}
160 %triggerun -- lighttpd
161 %webapp_unregister lighttpd %{_webapp}
164 rm -rf $RPM_BUILD_ROOT
166 %files -f %{name}.lang
167 %defattr(644,root,root,755)
169 %dir %attr(750,root,http) %{_sysconfdir}
170 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
171 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
172 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
174 %dir %{_appdir}/editor
175 %{_appdir}/editor/css
176 %{_appdir}/editor/dialog
177 %{_appdir}/editor/skins
179 %{_appdir}/editor/dtd
180 %{_appdir}/editor/images
182 %dir %{_appdir}/editor/plugins
183 %{_appdir}/editor/plugins/autogrow
184 %{_appdir}/editor/plugins/bbcode
185 %{_appdir}/editor/plugins/dragresizetable
186 %{_appdir}/editor/plugins/simplecommands
187 %{_appdir}/editor/plugins/tablecommands
188 %dir %{_appdir}/editor/plugins/placeholder
189 %{_appdir}/editor/plugins/placeholder/fck_placeholder.html
190 %{_appdir}/editor/plugins/placeholder/fckplugin.js
191 %{_appdir}/editor/plugins/placeholder/placeholder.gif
193 %dir %{_appdir}/editor/filemanager
194 %{_appdir}/editor/filemanager/browser
195 %dir %{_appdir}/editor/filemanager/connectors
197 %{_appdir}/editor/fckdebug.html
198 %{_appdir}/editor/fckdialog.html
199 %{_appdir}/editor/fckeditor.html
200 %{_appdir}/editor/fckeditor.original.html
201 %{_appdir}/fckconfig.js
202 %{_appdir}/fckeditor.js
204 %{_appdir}/fckpackager.xml
205 %{_appdir}/fckstyles.xml
206 %{_appdir}/fcktemplates.xml
208 %{_examplesdir}/%{name}-%{version}
211 %defattr(644,root,root,755)
212 %{_appdir}/editor/filemanager/connectors/php
213 # language interface actually.
214 %{_appdir}/fckeditor.php
216 %files connector-perl
217 %defattr(644,root,root,755)
218 %{_appdir}/editor/filemanager/connectors/perl
219 # language interface actually.
220 %{_appdir}/fckeditor.pl
222 %files connector-python
223 %defattr(644,root,root,755)
224 %{_appdir}/editor/filemanager/connectors/py
225 # language interface actually.
226 %{_appdir}/fckeditor.py
228 %if %{_enable_debug_packages}
230 %defattr(644,root,root,755)
231 %{_appdir}/editor/_source