]> git.pld-linux.org Git - packages/drupal-mod-tinymce.git/blob - drupal-mod-tinymce.spec
- tabs in preamble
[packages/drupal-mod-tinymce.git] / drupal-mod-tinymce.spec
1 # TODO
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}
7 Version:        4.6.0
8 Release:        1
9 License:        GPL
10 Group:          Applications/WWW
11 Source0:        http://drupal.org/files/projects/%{modname}-%{version}.tar.gz
12 # Source0-md5:  050b885a5437c492f2e9d49181db9326
13 Source1:        %{name}.conf
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
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
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
32
33 %description
34 Use the TinyMCE WYSIWYG editor for editing site content. A
35 collaborative project by richardb, mathias and jjeff.
36
37 Features include:
38 - Drupal image upload integration
39 - Dynamically turn off/on TinyMCE per textarea field
40 - Assign different tinymce profiles per role
41
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,
45 mathias i jjeff.
46
47 Możliwości obejmują:
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
51
52 %prep
53 %setup -q -n %{modname}
54 rm -f LICENSE.txt # pure GPL
55
56 # undos the source
57 find '(' -name '*.txt' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_moddir}}
62 install -d $RPM_BUILD_ROOT%{_tinymceplugindir}
63
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
68
69 install -d $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts
70 ln -s %{_datadir}/tinymce $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts/tiny_mce
71
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
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 if [ "$1" = 1 ]; then
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
85
86 EOF
87 fi
88
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}
92
93 %triggerun -- apache1 < 1.3.37-3, apache1-base
94 %webapp_unregister apache %{_webapp}
95
96 %triggerin -- apache < 2.2.0, apache-base
97 %webapp_register httpd %{_webapp}
98
99 %triggerun -- apache < 2.2.0, apache-base
100 %webapp_unregister httpd %{_webapp}
101
102 %files
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
108 %{_moddir}/*.module
109 %{_moddir}/tinymce
110 %{_tinymceplugindir}/*
111 %{_htmlmoddir}
This page took 0.089866 seconds and 3 git commands to generate.