2 # - webapps: register this pkg only if this webserver instance has drupal webapp configured
3 %define modname tinymce
4 Summary: Drupal TinyMCE WYSIWYG Editor Module
5 Summary(pl.UTF-8): Moduł edytora WYSIWYG TinyMCE dla Drupala
6 Name: drupal-mod-%{modname}
10 Group: Applications/WWW
11 Source0: http://drupal.org/files/projects/%{modname}-%{version}.tar.gz
12 # Source0-md5: 050b885a5437c492f2e9d49181db9326
14 URL: http://drupal.org/project/tinymce
15 BuildRequires: rpmbuild(macros) >= 1.264
16 BuildRequires: sed >= 4.0
17 Requires: drupal >= 4.6.0
18 Requires: tinymce < 2.0
19 Requires: tinymce >= 1.44
20 Requires: webapps >= 0.2
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _webapps /etc/webapps
25 %define _webapp drupal/%{modname}
26 %define _sysconfdir %{_webapps}/%{_webapp}
27 %define _drupaldir %{_datadir}/drupal
28 %define _moddir %{_drupaldir}/modules
29 %define _htdocs %{_drupaldir}/htdocs
30 %define _htmlmoddir %{_htdocs}/modules/%{modname}
31 %define _tinymceplugindir %{_datadir}/tinymce/plugins
34 Use the TinyMCE WYSIWYG editor for editing site content. A
35 collaborative project by richardb, mathias and jjeff.
38 - Drupal image upload integration
39 - Dynamically turn off/on TinyMCE per textarea field
40 - Assign different tinymce profiles per role
42 %description -l pl.UTF-8
43 Ten moduł pozwala używać edytora WYSIWYG TinyMCE do modyfikowania
44 treści stron. Jest to wspólny projekt, który stworzyli richardb,
48 - integrację umieszczania obrazków w Drupalu
49 - dynamiczne wyłączanie/włączanie TinyMCE dla pól textarea
50 - przypisywanie różnych profili tinymce dla ról
53 %setup -q -n %{modname}
54 rm -f LICENSE.txt # pure GPL
57 find '(' -name '*.txt' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_moddir}}
62 install -d $RPM_BUILD_ROOT%{_tinymceplugindir}
64 install *.module $RPM_BUILD_ROOT%{_moddir}
65 cp -a plugins/* $RPM_BUILD_ROOT%{_tinymceplugindir}
66 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
67 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
69 install -d $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts
70 ln -s %{_datadir}/tinymce $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts/tiny_mce
72 # need symlink for drupal to think the file is there, we also do
73 # apache alias as the symlinks aren't usually allowed in htdocs
74 install -d $RPM_BUILD_ROOT%{_htmlmoddir}/jscripts
75 ln -s %{_datadir}/tinymce $RPM_BUILD_ROOT%{_htmlmoddir}/jscripts/tiny_mce
78 rm -rf $RPM_BUILD_ROOT
82 %banner -e %{name} <<EOF
83 If this your first install of %{modname} module, load the database definition file:
84 zcat %{_docdir}/%{name}-%{version}/tinymce.mysql.gz | mysql drupal
89 # TODO install it only if this apache instance has drupal configured
90 %triggerin -- apache1 < 1.3.37-3, apache1-base
91 %webapp_register apache %{_webapp}
93 %triggerun -- apache1 < 1.3.37-3, apache1-base
94 %webapp_unregister apache %{_webapp}
96 %triggerin -- apache < 2.2.0, apache-base
97 %webapp_register httpd %{_webapp}
99 %triggerun -- apache < 2.2.0, apache-base
100 %webapp_unregister httpd %{_webapp}
103 %defattr(644,root,root,755)
104 %doc *.txt tinymce.{mysql,pgsql}
105 %dir %attr(750,root,http) %{_sysconfdir}
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
110 %{_tinymceplugindir}/*