]> git.pld-linux.org Git - packages/fckeditor.git/blob - fckeditor.spec
- alternative config via FCKEDITOR_CONFIG in php connector
[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 %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
32
33 %description connector-php
34 File Manager Connector for PHP.
35
36 %package connector-perl
37 Summary:        File Manager Connector for Perl
38 Group:          Applications/WWW
39 Requires:       %{name} = %{version}-%{release}
40 Requires:       perl-base
41
42 %description connector-perl
43 File Manager Connector for Perl.
44
45 %package connector-python
46 Summary:        File Manager Connector for Python
47 Group:          Applications/WWW
48 Requires:       %{name} = %{version}-%{release}
49 Requires:       python
50
51 %description connector-python
52 File Manager Connector for Python.
53
54 %description
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.
58
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.
63
64 # copied from /usr/lib/rpm/macros
65 %package debuginfo
66 Summary:        Debug information for package %{name}
67 Summary(pl.UTF-8):      Informacje dla debuggera dla pakietu %{name}
68 Group:          Development/Debug
69 AutoReqProv:    0
70
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.
75
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.
80
81 %prep
82 %setup -qc
83 mv fckeditor/* .
84 rmdir fckeditor
85 mv _samples samples
86 mkdir samples/plugins
87 mv editor/plugins/bbcode/_sample samples/plugins/bbcode
88 rm -f editor/lang/_translationstatus.txt
89
90 install %{SOURCE1} find-lang.sh
91
92 # fck php4
93 mv fckeditor_php5.php fckeditor.php
94 rm fckeditor_php4.php
95
96 %if %{_enable_debug_packages}
97 %else
98 # source used only when FCKConfig.Debug is set: LoadScript( '_source/internals/fckdebug.js' ) ;
99 rm -r editor/_source
100 %endif
101
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
106
107 # undos the source
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$,,'
110
111 %patch0 -p1
112
113 # apache1/apache2 conf
114 cat > apache.conf <<'EOF'
115 Alias /%{name} %{_appdir}
116 <Directory %{_appdir}>
117         Allow from all
118 </Directory>
119 EOF
120
121 # lighttpd conf
122 cat > lighttpd.conf <<'EOF'
123 alias.url += (
124     "/%{name}" => "%{_appdir}",
125 )
126 EOF
127
128 %install
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}
134
135 # these are sample language interfaces. move to examples?
136 cp -a fckeditor.{js,php,pl,py} $RPM_BUILD_ROOT%{_appdir}
137
138 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139 cp -a samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
140
141 ./find-lang.sh %{name}.lang
142
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}
148
149 %triggerin -- apache1 < 1.3.37-3, apache1-base
150 %webapp_register apache %{_webapp}
151
152 %triggerun -- apache1 < 1.3.37-3, apache1-base
153 %webapp_unregister apache %{_webapp}
154
155 %triggerin -- apache < 2.2.0, apache-base
156 %webapp_register httpd %{_webapp}
157
158 %triggerun -- apache < 2.2.0, apache-base
159 %webapp_unregister httpd %{_webapp}
160
161 %triggerin -- lighttpd
162 %webapp_register lighttpd %{_webapp}
163
164 %triggerun -- lighttpd
165 %webapp_unregister lighttpd %{_webapp}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %files -f %{name}.lang
171 %defattr(644,root,root,755)
172 %doc _*
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
177 %dir %{_appdir}
178 %dir %{_appdir}/editor
179 %{_appdir}/editor/css
180 %{_appdir}/editor/dialog
181 %{_appdir}/editor/skins
182 %{_appdir}/editor/js
183 %{_appdir}/editor/dtd
184 %{_appdir}/editor/images
185
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
196
197 %dir %{_appdir}/editor/filemanager
198 %{_appdir}/editor/filemanager/browser
199 %dir %{_appdir}/editor/filemanager/connectors
200
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
207
208 %{_appdir}/fckpackager.xml
209 %{_appdir}/fckstyles.xml
210 %{_appdir}/fcktemplates.xml
211
212 %{_examplesdir}/%{name}-%{version}
213
214 %files connector-php
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
220
221 %files connector-perl
222 %defattr(644,root,root,755)
223 %{_appdir}/editor/filemanager/connectors/perl
224 # language interface actually.
225 %{_appdir}/fckeditor.pl
226
227 %files connector-python
228 %defattr(644,root,root,755)
229 %{_appdir}/editor/filemanager/connectors/py
230 # language interface actually.
231 %{_appdir}/fckeditor.py
232
233 %if %{_enable_debug_packages}
234 %files debuginfo
235 %defattr(644,root,root,755)
236 %{_appdir}/editor/_source
237 %endif
This page took 0.063795 seconds and 4 git commands to generate.