]>
Commit | Line | Data |
---|---|---|
d19573b0 | 1 | # TODO |
538747fe | 2 | # - separate packages for plugins? |
0562beca | 3 | # - uicolor for example bundles yui framework (30% of the whole plugins dir) |
d19573b0 ER |
4 | Summary: The text editor for Internet |
5 | Summary(pl.UTF-8): Edytor tekstowy dla Internetu | |
6 | Name: ckeditor | |
20fe3b1a | 7 | Version: 3.2.1 |
bdd0e445 | 8 | Release: 3 |
0562beca | 9 | License: LGPL v2.1+ / GPL v2+ / MPL |
d19573b0 ER |
10 | Group: Applications/WWW |
11 | Source0: http://download.cksource.com/CKEditor/CKEditor/CKEditor%20%{version}/%{name}_%{version}.tar.gz | |
20fe3b1a | 12 | # Source0-md5: 793ad3d32b15f88b71db72573710a926 |
d19573b0 ER |
13 | URL: http://www.ckeditor.com/ |
14 | Source1: find-lang.sh | |
0562beca ER |
15 | Source2: apache.conf |
16 | Source3: lighttpd.conf | |
bdd0e445 | 17 | Source4: httpd.conf |
0562beca | 18 | BuildRequires: lynx |
12e60af2 | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
d19573b0 | 20 | BuildRequires: sed >= 4.0 |
3913c22e ER |
21 | Requires: webapps |
22 | Requires: webserver | |
d19573b0 ER |
23 | Requires: webserver(access) |
24 | Requires: webserver(alias) | |
bdd0e445 | 25 | Conflicts: apache-base < 2.4.0-1 |
d19573b0 ER |
26 | BuildArch: noarch |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %define _webapps /etc/webapps | |
30 | %define _webapp %{name} | |
31 | %define _sysconfdir %{_webapps}/%{_webapp} | |
32 | %define _appdir %{_datadir}/%{name} | |
33 | ||
34 | %define find_lang sh %{SOURCE1} | |
35 | ||
36 | %description | |
37 | This HTML text editor brings to the web many of the powerful | |
38 | functionalities of desktop editors like MS Word. It's lightweight and | |
39 | doesn't require any kind of installation on the client computer. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji | |
43 | edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej | |
44 | inicjalizacji na komputerze klienckim. | |
45 | ||
0562beca ER |
46 | %package -n php-%{name} |
47 | Summary: PHP class to create editors instances | |
48 | Group: Development/Languages/PHP | |
49 | ||
50 | %description -n php-%{name} | |
51 | CKEditor class that can be used to create editor instances in PHP | |
52 | pages on server side. | |
53 | ||
d19573b0 ER |
54 | %prep |
55 | %setup -qc | |
56 | mkdir config | |
57 | mv ckeditor/* . | |
58 | mv ckeditor/.htaccess config/htaccess | |
59 | rmdir ckeditor | |
d19573b0 ER |
60 | |
61 | # force php5 only | |
62 | rm ckeditor_php4.php | |
63 | mv ckeditor_php5.php ckeditor.php | |
64 | ||
20fe3b1a ER |
65 | # collect source for reference |
66 | mv *_source.js _source | |
d19573b0 ER |
67 | |
68 | rm lang/_translationstatus.txt | |
69 | ||
0562beca ER |
70 | # used only in samples |
71 | mv lang/_languages.js _samples | |
72 | %{__sed} -i -e 's,\.\./lang/_languages\.js,_languages.js,' _samples/ui_languages.html | |
73 | ||
d19573b0 ER |
74 | # undos the files |
75 | %{__sed} -i -e 's,\r$,,' ckeditor* | |
76 | find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,' | |
77 | ||
0562beca ER |
78 | %build |
79 | lynx -dump -nolist -width 1024 CHANGES.html | sed -e '/___/,$d' > CHANGES | |
d19573b0 ER |
80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | install -d $RPM_BUILD_ROOT%{_appdir} | |
84 | ||
0562beca | 85 | cp -a ckeditor.js config.js contents.css $RPM_BUILD_ROOT%{_appdir} |
de1bd76f | 86 | cp -a adapters plugins skins themes lang $RPM_BUILD_ROOT%{_appdir} |
d19573b0 | 87 | |
0562beca ER |
88 | install -d $RPM_BUILD_ROOT%{php_data_dir} |
89 | cp -a ckeditor.php $RPM_BUILD_ROOT%{php_data_dir} | |
90 | ||
d19573b0 | 91 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
0562beca | 92 | cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d19573b0 ER |
93 | |
94 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
0562beca | 95 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
bdd0e445 | 96 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
0562beca | 97 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
d19573b0 ER |
98 | |
99 | %find_lang %{name}.lang | |
100 | ||
538747fe ER |
101 | # always include |
102 | %{__sed} -i -e '/en\.js/d' %{name}.lang | |
103 | ||
0562beca ER |
104 | # already listed by plugin dir |
105 | %{__sed} -i -e '/plugins/d' %{name}.lang | |
538747fe | 106 | |
d19573b0 ER |
107 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
108 | %webapp_register apache %{_webapp} | |
109 | ||
110 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
111 | %webapp_unregister apache %{_webapp} | |
112 | ||
bdd0e445 | 113 | %triggerin -- apache-base |
d19573b0 ER |
114 | %webapp_register httpd %{_webapp} |
115 | ||
bdd0e445 | 116 | %triggerun -- apache-base |
d19573b0 ER |
117 | %webapp_unregister httpd %{_webapp} |
118 | ||
119 | %triggerin -- lighttpd | |
120 | %webapp_register lighttpd %{_webapp} | |
121 | ||
122 | %triggerun -- lighttpd | |
123 | %webapp_unregister lighttpd %{_webapp} | |
124 | ||
125 | %clean | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %files -f %{name}.lang | |
129 | %defattr(644,root,root,755) | |
0562beca | 130 | %doc CHANGES |
d19573b0 ER |
131 | %dir %attr(750,root,http) %{_sysconfdir} |
132 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
133 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
134 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
135 | %dir %{_appdir} | |
136 | %{_appdir}/*.js | |
538747fe | 137 | %{_appdir}/lang/en.js |
0562beca | 138 | %{_appdir}/*.css |
de1bd76f ER |
139 | |
140 | %dir %{_appdir}/adapters | |
141 | %{_appdir}/adapters/jquery.js | |
142 | ||
0562beca ER |
143 | %dir %{_appdir}/themes |
144 | %{_appdir}/themes/default | |
145 | ||
146 | %dir %{_appdir}/skins | |
147 | %{_appdir}/skins/kama | |
148 | %{_appdir}/skins/office2003 | |
149 | %{_appdir}/skins/v2 | |
150 | ||
151 | %dir %{_appdir}/plugins | |
20fe3b1a | 152 | %{_appdir}/plugins/a11yhelp |
0562beca ER |
153 | %{_appdir}/plugins/about |
154 | %{_appdir}/plugins/clipboard | |
155 | %{_appdir}/plugins/colordialog | |
156 | %{_appdir}/plugins/dialog | |
157 | %{_appdir}/plugins/div | |
158 | %{_appdir}/plugins/find | |
159 | %{_appdir}/plugins/flash | |
160 | %{_appdir}/plugins/forms | |
161 | %{_appdir}/plugins/iframedialog | |
162 | %{_appdir}/plugins/image | |
163 | %{_appdir}/plugins/link | |
164 | %{_appdir}/plugins/pagebreak | |
165 | %{_appdir}/plugins/pastefromword | |
166 | %{_appdir}/plugins/pastetext | |
167 | %{_appdir}/plugins/scayt | |
168 | %{_appdir}/plugins/showblocks | |
169 | %{_appdir}/plugins/smiley | |
170 | %{_appdir}/plugins/specialchar | |
20fe3b1a | 171 | %{_appdir}/plugins/styles |
0562beca ER |
172 | %{_appdir}/plugins/table |
173 | %{_appdir}/plugins/tabletools | |
174 | %{_appdir}/plugins/templates | |
175 | %{_appdir}/plugins/uicolor | |
176 | %{_appdir}/plugins/wsc | |
d19573b0 ER |
177 | |
178 | %{_examplesdir}/%{name}-%{version} | |
0562beca ER |
179 | |
180 | %files -n php-%{name} | |
181 | %defattr(644,root,root,755) | |
182 | %{php_data_dir}/ckeditor.php |