2 # - separate packages for plugins?
3 # - uicolor for example bundles yui framework (30% of the whole plugins dir)
4 Summary: The text editor for Internet
5 Summary(pl.UTF-8): Edytor tekstowy dla Internetu
9 License: LGPL v2.1+ / GPL v2+ / MPL
10 Group: Applications/WWW
11 Source0: http://download.cksource.com/CKEditor/CKEditor/CKEditor%20%{version}/%{name}_%{version}.tar.gz
12 # Source0-md5: 793ad3d32b15f88b71db72573710a926
13 URL: http://www.ckeditor.com/
16 Source3: lighttpd.conf
18 BuildRequires: rpmbuild(macros) >= 1.268
19 BuildRequires: sed >= 4.0
22 Requires: webserver(access)
23 Requires: webserver(alias)
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _webapps /etc/webapps
28 %define _webapp %{name}
29 %define _sysconfdir %{_webapps}/%{_webapp}
30 %define _appdir %{_datadir}/%{name}
32 %define find_lang sh %{SOURCE1}
35 This HTML text editor brings to the web many of the powerful
36 functionalities of desktop editors like MS Word. It's lightweight and
37 doesn't require any kind of installation on the client computer.
39 %description -l pl.UTF-8
40 Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
41 edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
42 inicjalizacji na komputerze klienckim.
44 %package -n php-%{name}
45 Summary: PHP class to create editors instances
46 Group: Development/Languages/PHP
48 %description -n php-%{name}
49 CKEditor class that can be used to create editor instances in PHP
56 mv ckeditor/.htaccess config/htaccess
61 mv ckeditor_php5.php ckeditor.php
63 # collect source for reference
64 mv *_source.js _source
66 rm lang/_translationstatus.txt
68 # used only in samples
69 mv lang/_languages.js _samples
70 %{__sed} -i -e 's,\.\./lang/_languages\.js,_languages.js,' _samples/ui_languages.html
73 %{__sed} -i -e 's,\r$,,' ckeditor*
74 find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
77 lynx -dump -nolist -width 1024 CHANGES.html | sed -e '/___/,$d' > CHANGES
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_appdir}
83 cp -a ckeditor.js config.js contents.css $RPM_BUILD_ROOT%{_appdir}
84 cp -a adapters plugins skins themes lang $RPM_BUILD_ROOT%{_appdir}
86 install -d $RPM_BUILD_ROOT%{php_data_dir}
87 cp -a ckeditor.php $RPM_BUILD_ROOT%{php_data_dir}
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90 cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
92 install -d $RPM_BUILD_ROOT%{_sysconfdir}
93 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
95 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
97 %find_lang %{name}.lang
100 %{__sed} -i -e '/en\.js/d' %{name}.lang
102 # already listed by plugin dir
103 %{__sed} -i -e '/plugins/d' %{name}.lang
105 %triggerin -- apache1 < 1.3.37-3, apache1-base
106 %webapp_register apache %{_webapp}
108 %triggerun -- apache1 < 1.3.37-3, apache1-base
109 %webapp_unregister apache %{_webapp}
111 %triggerin -- apache < 2.2.0, apache-base
112 %webapp_register httpd %{_webapp}
114 %triggerun -- apache < 2.2.0, apache-base
115 %webapp_unregister httpd %{_webapp}
117 %triggerin -- lighttpd
118 %webapp_register lighttpd %{_webapp}
120 %triggerun -- lighttpd
121 %webapp_unregister lighttpd %{_webapp}
124 rm -rf $RPM_BUILD_ROOT
126 %files -f %{name}.lang
127 %defattr(644,root,root,755)
129 %dir %attr(750,root,http) %{_sysconfdir}
130 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
135 %{_appdir}/lang/en.js
138 %dir %{_appdir}/adapters
139 %{_appdir}/adapters/jquery.js
141 %dir %{_appdir}/themes
142 %{_appdir}/themes/default
144 %dir %{_appdir}/skins
145 %{_appdir}/skins/kama
146 %{_appdir}/skins/office2003
149 %dir %{_appdir}/plugins
150 %{_appdir}/plugins/a11yhelp
151 %{_appdir}/plugins/about
152 %{_appdir}/plugins/clipboard
153 %{_appdir}/plugins/colordialog
154 %{_appdir}/plugins/dialog
155 %{_appdir}/plugins/div
156 %{_appdir}/plugins/find
157 %{_appdir}/plugins/flash
158 %{_appdir}/plugins/forms
159 %{_appdir}/plugins/iframedialog
160 %{_appdir}/plugins/image
161 %{_appdir}/plugins/link
162 %{_appdir}/plugins/pagebreak
163 %{_appdir}/plugins/pastefromword
164 %{_appdir}/plugins/pastetext
165 %{_appdir}/plugins/scayt
166 %{_appdir}/plugins/showblocks
167 %{_appdir}/plugins/smiley
168 %{_appdir}/plugins/specialchar
169 %{_appdir}/plugins/styles
170 %{_appdir}/plugins/table
171 %{_appdir}/plugins/tabletools
172 %{_appdir}/plugins/templates
173 %{_appdir}/plugins/uicolor
174 %{_appdir}/plugins/wsc
176 %{_examplesdir}/%{name}-%{version}
178 %files -n php-%{name}
179 %defattr(644,root,root,755)
180 %{php_data_dir}/ckeditor.php