]> git.pld-linux.org Git - packages/fckeditor.git/blob - fckeditor.spec
c37bdd2591ed795102ffcc7ad4e85defc5c1e46b
[packages/fckeditor.git] / fckeditor.spec
1 # TODO
2 # - fckeditor.* provide language interfaces. package them where?
3 Summary:        The text editor for Internet
4 Summary(pl.UTF-8):      Edytor tekstowy dla Internetu
5 Name:           fckeditor
6 Version:        2.6.3
7 Release:        0.16
8 License:        LGPL v2.1
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)
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _webapps        /etc/webapps
23 %define         _webapp         %{name}
24 %define         _sysconfdir     %{_webapps}/%{_webapp}
25 %define         _appdir         %{_datadir}/%{name}
26
27 %description
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.
31
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.
36
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
43
44 %description connector-php
45 File Manager Connector for PHP.
46
47 %description connector-php -l pl.UTF-8
48 Interfejs zarządcy plików do PHP.
49
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}
55 Requires:       perl-base
56
57 %description connector-perl
58 File Manager Connector for Perl.
59
60 %description connector-perl -l pl.UTF-8
61 Interfejs zarządcy plików do Perla.
62
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}
68 Requires:       python
69
70 %description connector-python
71 File Manager Connector for Python.
72
73 %description connector-python -l pl.UTF-8
74 Interfejs zarządcy plików do Pythona.
75
76 # copied from /usr/lib/rpm/macros
77 %package debuginfo
78 Summary:        Debug information for package %{name}
79 Summary(pl.UTF-8):      Informacje dla debuggera dla pakietu %{name}
80 Group:          Development/Debug
81 AutoReqProv:    0
82
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.
87
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.
92
93 %prep
94 %setup -qc
95 mv fckeditor/* .
96 rmdir fckeditor
97 mv _samples samples
98 mkdir samples/plugins
99 mv editor/plugins/bbcode/_sample samples/plugins/bbcode
100 rm -f editor/lang/_translationstatus.txt
101
102 install %{SOURCE1} find-lang.sh
103
104 # fck php4
105 mv fckeditor_php5.php fckeditor.php
106 rm fckeditor_php4.php
107
108 %if %{_enable_debug_packages}
109 %else
110 # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ;
111 rm -r editor/_source
112 %endif
113
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
118
119 # undos the source
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$,,'
122
123 %patch0 -p1
124
125 # apache1/apache2 conf
126 cat > apache.conf <<'EOF'
127 Alias /%{name} %{_appdir}
128 <Directory %{_appdir}>
129         Allow from all
130 </Directory>
131 EOF
132
133 # lighttpd conf
134 cat > lighttpd.conf <<'EOF'
135 alias.url += (
136     "/%{name}" => "%{_appdir}",
137 )
138 EOF
139
140 %install
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}
146
147 # these are sample language interfaces. move to examples?
148 cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir}
149
150 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
151 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
152
153 ./find-lang.sh %{name}.lang
154
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}
160
161 %triggerin -- apache1 < 1.3.37-3, apache1-base
162 %webapp_register apache %{_webapp}
163
164 %triggerun -- apache1 < 1.3.37-3, apache1-base
165 %webapp_unregister apache %{_webapp}
166
167 %triggerin -- apache < 2.2.0, apache-base
168 %webapp_register httpd %{_webapp}
169
170 %triggerun -- apache < 2.2.0, apache-base
171 %webapp_unregister httpd %{_webapp}
172
173 %triggerin -- lighttpd
174 %webapp_register lighttpd %{_webapp}
175
176 %triggerun -- lighttpd
177 %webapp_unregister lighttpd %{_webapp}
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %files -f %{name}.lang
183 %defattr(644,root,root,755)
184 %doc _*
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
189 %dir %{_appdir}
190 %dir %{_appdir}/editor
191 %{_appdir}/editor/css
192 %{_appdir}/editor/dialog
193 %{_appdir}/editor/skins
194 %{_appdir}/editor/js
195 %{_appdir}/editor/dtd
196 %{_appdir}/editor/images
197
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
208
209 %dir %{_appdir}/editor/filemanager
210 %{_appdir}/editor/filemanager/browser
211 %dir %{_appdir}/editor/filemanager/connectors
212
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
219
220 %{_appdir}/fckpackager.xml
221 %{_appdir}/fckstyles.xml
222 %{_appdir}/fcktemplates.xml
223
224 %{_examplesdir}/%{name}-%{version}
225
226 %files connector-php
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
232
233 %files connector-perl
234 %defattr(644,root,root,755)
235 %{_appdir}/editor/filemanager/connectors/perl
236 # language interface actually.
237 %{_appdir}/fckeditor.pl
238
239 %files connector-python
240 %defattr(644,root,root,755)
241 %{_appdir}/editor/filemanager/connectors/py
242 # language interface actually.
243 %{_appdir}/fckeditor.py
244
245 %if %{_enable_debug_packages}
246 %files debuginfo
247 %defattr(644,root,root,755)
248 %{_appdir}/editor/_source
249 %endif
This page took 0.068126 seconds and 2 git commands to generate.