]> git.pld-linux.org Git - SPECS.git/blob - tinymce-spellchecker.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / tinymce-spellchecker.spec
1 %define         ver %(echo %{version} | tr . _)
2 Summary:        TinyMCE spellchecker plugin
3 Name:           tinymce-spellchecker
4 Version:        2.0.2
5 Release:        0.5
6 License:        LGPL v2
7 Group:          Applications/WWW
8 Source0:        http://dl.sourceforge.net/tinymce/tinymce_spellchecker_php_%{ver}.zip
9 # Source0-md5:  71ea3f554466fed09530a89fb98e6eee
10 Patch0:         %{name}.patch
11 URL:            http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 BuildRequires:  sed >= 4.0
14 BuildRequires:  unzip
15 Requires:       tinymce >= 3.1.1-0.4
16 Requires:       webapps
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}/%{_webapp}
26 %define         _plugindir      %{_datadir}/tinymce/plugins/spellchecker
27
28 %description
29 This plugin adds spellchecker functionality to TinyMCE by providing a
30 new button that performs a AJAX call to a backend PHP page that uses
31 PSpell/ASpell or Google spellchecker.
32
33 %prep
34 %setup -qc
35 mv spellchecker/* .
36 find '(' -name '*.js' -o -name '*.html' -o -name '*.htm' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
37 %patch0 -p1
38
39 cat <<'EOF' > apache.conf
40 Alias /tiny_mce/plugins/spellchecker/rpc.php %{_appdir}/rpc.php
41 <Directory %{_appdir}>
42         Allow from all
43 </Directory>
44 EOF
45
46 cat > lighttpd.conf <<'EOF'
47 alias.url += (
48     "/tiny_mce/plugins/spellchecker/rpc.php" => "%{_appdir}/rpc.php",
49 )
50 EOF
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_plugindir}}
55
56 cp -a editor_plugin.js css img $RPM_BUILD_ROOT%{_plugindir}
57 cp -a rpc.php $RPM_BUILD_ROOT%{_appdir}
58 cp -a classes includes $RPM_BUILD_ROOT%{_appdir}
59 cp -a config.php $RPM_BUILD_ROOT%{_sysconfdir}
60 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
61 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
62 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %triggerin -- apache1 < 1.3.37-3, apache1-base
68 %webapp_register apache %{_webapp}
69
70 %triggerun -- apache1 < 1.3.37-3, apache1-base
71 %webapp_unregister apache %{_webapp}
72
73 %triggerin -- apache < 2.2.0, apache-base
74 %webapp_register httpd %{_webapp}
75
76 %triggerun -- apache < 2.2.0, apache-base
77 %webapp_unregister httpd %{_webapp}
78
79 %triggerin -- lighttpd
80 %webapp_register lighttpd %{_webapp}
81
82 %triggerun -- lighttpd
83 %webapp_unregister lighttpd %{_webapp}
84
85 %files
86 %defattr(644,root,root,755)
87 %doc changelog
88 %dir %attr(750,root,http) %{_sysconfdir}
89 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
91 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
92 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php
93 %{_appdir}
94 %{_plugindir}
This page took 0.681633 seconds and 3 git commands to generate.