]> git.pld-linux.org Git - packages/drupal-mod-tinymce.git/blob - drupal-mod-tinymce.spec
- install apache config for /modules/tinymce alias
[packages/drupal-mod-tinymce.git] / drupal-mod-tinymce.spec
1 %define         modname tinymce
2 Summary:        Drupal TinyMCE WYSIWYG Editor Module
3 Summary(pl):    Modu³ edytora WYSIWYG TinyMCE dla Drupala
4 Name:           drupal-mod-%{modname}
5 Version:        4.6.0
6 Release:        0.20
7 Epoch:          0
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://drupal.org/files/projects/%{modname}-%{version}.tar.gz
11 # Source0-md5:  dd7630860baf1f7f470d71c272d275eb
12 Source1:        %{name}.conf
13 URL:            http://drupal.org/project/tinymce
14 BuildRequires:  rpmbuild(macros) >= 1.194
15 BuildRequires:  sed >= 4.0
16 Requires:       drupal >= 4.6.0
17 Requires:       tinymce >= 1.44
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _sysconfdir     /etc/drupal
22 %define         _moddir         %{_datadir}/drupal/modules
23 %define         _tinymceplugindir       %{_datadir}/tinymce/plugins
24
25 %description
26 Use the TinyMCE WYSIWYG editor for editing site content. A
27 collaborative project by richardb, mathias and jjeff.
28
29 Features include:
30 - Drupal image upload integration
31 - Dynamically turn off/on TinyMCE per textarea field
32 - Assign different tinymce profiles per role
33
34 %description -l pl
35 Ten modu³ pozwala u¿ywaæ edytora WYSIWYG TinyMCE do modyfikowania
36 tre¶ci stron. Jest to wspólny projekt, który stworzyli richardb,
37 mathias i jjeff.
38
39 Mo¿liwo¶ci obejmuj±:
40 - integracjê umieszczania obrazków w Drupalu
41 - dynamiczne wy³±czanie/w³±czanie TinyMCE dla pól textarea
42 - przypisywanie ró¿nych profili tinymce dla ról
43
44 %prep
45 %setup -q -n %{modname}
46 rm -f LICENSE.txt # pure GPL
47
48 # undos the source
49 find '(' -name '*.txt' ')' -print0 | xargs -0 sed -i -e 's,
50 $,,'
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_moddir}}
55 install -d $RPM_BUILD_ROOT%{_tinymceplugindir}
56
57 install *.module $RPM_BUILD_ROOT%{_moddir}
58 cp -a plugins/* $RPM_BUILD_ROOT%{_tinymceplugindir}
59 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{modname}.conf
60
61 install -d $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts
62 ln -s %{_datadir}/tinymce $RPM_BUILD_ROOT%{_moddir}/tinymce/jscripts/tiny_mce
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 if [ "$1" = 1 ]; then
69 %banner -e %{name} <<EOF
70 If this your first install of %{modname} module, load the database definition file:
71 zcat %{_docdir}/%{name}-%{version}/tinymce.mysql.gz | mysql drupal
72
73 EOF
74 fi
75
76 %triggerin -- apache1 >= 1.3.33-2
77 # install it only if this apache instance has drupal configured
78 if [ -L /etc/apache/conf.d/??_drupal.conf ]; then
79         %apache_config_install -v 1 -c %{_sysconfdir}/apache-%{modname}.conf
80 fi
81
82 %triggerun -- apache1 >= 1.3.33-2
83 %apache_config_uninstall -v 1
84
85 %triggerin -- apache >= 2.0.0
86 # install it only if this apache instance has drupal configured
87 if [ -L /etc/httpd/httpd.conf/??_drupal.conf ]; then
88         %apache_config_install -v 2 -c %{_sysconfdir}/apache-%{modname}.conf
89 fi
90
91 %triggerun -- apache >= 2.0.0
92 %apache_config_uninstall -v 2
93
94 %files
95 %defattr(644,root,root,755)
96 %doc *.txt tinymce.{mysql,pgsql}
97 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
98 %{_moddir}/*.module
99 %{_moddir}/tinymce
100 %{_tinymceplugindir}/*
This page took 0.061733 seconds and 3 git commands to generate.