]> git.pld-linux.org Git - packages/ckeditor.git/blob - ckeditor.spec
4c96d095081e5481f184189ed29346aae714b72d
[packages/ckeditor.git] / ckeditor.spec
1 # TODO
2 # - separate packages for plugins
3 # - uicolor for example bundles yui framework (30% of the whole plugins dir)
4 Summary:        The text editor for Internet
5 Summary(pl.UTF-8):      Edytor tekstowy dla Internetu
6 Name:           ckeditor
7 Version:        3.1
8 Release:        0.17
9 License:        LGPL v2.1+ / GPL v2+ / MPL
10 Group:          Applications/WWW
11 Source0:        http://download.cksource.com/CKEditor/CKEditor/CKEditor%20%{version}/%{name}_%{version}.tar.gz
12 # Source0-md5:  9c4a9e54f756e24c6aac24888c4599d0
13 URL:            http://www.ckeditor.com/
14 Source1:        find-lang.sh
15 Source2:        apache.conf
16 Source3:        lighttpd.conf
17 BuildRequires:  lynx
18 BuildRequires:  rpmbuild(macros) > 1.268
19 BuildRequires:  sed >= 4.0
20 Requires:       webapps
21 Requires:       webserver
22 Requires:       webserver(access)
23 Requires:       webserver(alias)
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _webapps        /etc/webapps
28 %define         _webapp         %{name}
29 %define         _sysconfdir     %{_webapps}/%{_webapp}
30 %define         _appdir         %{_datadir}/%{name}
31
32 %define         find_lang       sh %{SOURCE1}
33
34 %description
35 This HTML text editor brings to the web many of the powerful
36 functionalities of desktop editors like MS Word. It's lightweight and
37 doesn't require any kind of installation on the client computer.
38
39 %description -l pl.UTF-8
40 Ten edytor tekstu HTML udostępnia stronom WWW wiele potężnych funkcji
41 edytorów biurowych, takich jak MS Word. Jest lekki i nie wymaga żadnej
42 inicjalizacji na komputerze klienckim.
43
44 %package -n php-%{name}
45 Summary:        PHP class to create editors instances
46 Group:          Development/Languages/PHP
47
48 %description -n php-%{name}
49 CKEditor class that can be used to create editor instances in PHP
50 pages on server side.
51
52 %prep
53 %setup -qc
54 mkdir config
55 mv ckeditor/* .
56 mv ckeditor/.htaccess config/htaccess
57 rmdir ckeditor
58
59 # force php5 only
60 rm ckeditor_php4.php
61 mv ckeditor_php5.php ckeditor.php
62
63 rm -rf _source
64 rm -f *_source.js
65
66 rm lang/_translationstatus.txt
67
68 # used only in samples
69 mv lang/_languages.js _samples
70 %{__sed} -i -e 's,\.\./lang/_languages\.js,_languages.js,' _samples/ui_languages.html
71
72 # undos the files
73 %{__sed} -i -e 's,\r$,,' ckeditor*
74 find '(' -name '*.js' -o -name '*.css' -o -name '*.txt' -o -name '*.html' -o -name '*.php' ')' -print0 | xargs -0 sed -i -e 's,\r$,,'
75
76 %build
77 lynx -dump -nolist -width 1024 CHANGES.html | sed -e '/___/,$d' > CHANGES
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_appdir}
82
83 cp -a ckeditor.js config.js contents.css $RPM_BUILD_ROOT%{_appdir}
84 cp -a plugins skins themes lang $RPM_BUILD_ROOT%{_appdir}
85
86 install -d $RPM_BUILD_ROOT%{php_data_dir}
87 cp -a ckeditor.php $RPM_BUILD_ROOT%{php_data_dir}
88
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90 cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
91
92 install -d $RPM_BUILD_ROOT%{_sysconfdir}
93 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
95 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
96
97 %find_lang %{name}.lang
98
99 # already listed by plugin dir
100 %{__sed} -i -e '/plugins/d' %{name}.lang
101 %triggerin -- apache1 < 1.3.37-3, apache1-base
102 %webapp_register apache %{_webapp}
103
104 %triggerun -- apache1 < 1.3.37-3, apache1-base
105 %webapp_unregister apache %{_webapp}
106
107 %triggerin -- apache < 2.2.0, apache-base
108 %webapp_register httpd %{_webapp}
109
110 %triggerun -- apache < 2.2.0, apache-base
111 %webapp_unregister httpd %{_webapp}
112
113 %triggerin -- lighttpd
114 %webapp_register lighttpd %{_webapp}
115
116 %triggerun -- lighttpd
117 %webapp_unregister lighttpd %{_webapp}
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %files -f %{name}.lang
123 %defattr(644,root,root,755)
124 %doc CHANGES
125 %dir %attr(750,root,http) %{_sysconfdir}
126 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
127 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
128 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
129 %dir %{_appdir}
130 %{_appdir}/*.js
131 %{_appdir}/*.css
132 %dir %{_appdir}/themes
133 %{_appdir}/themes/default
134
135 %dir %{_appdir}/skins
136 %{_appdir}/skins/kama
137 %{_appdir}/skins/office2003
138 %{_appdir}/skins/v2
139
140 %dir %{_appdir}/plugins
141 %{_appdir}/plugins/about
142 %{_appdir}/plugins/clipboard
143 %{_appdir}/plugins/colordialog
144 %{_appdir}/plugins/dialog
145 %{_appdir}/plugins/div
146 %{_appdir}/plugins/find
147 %{_appdir}/plugins/flash
148 %{_appdir}/plugins/forms
149 %{_appdir}/plugins/iframedialog
150 %{_appdir}/plugins/image
151 %{_appdir}/plugins/link
152 %{_appdir}/plugins/pagebreak
153 %{_appdir}/plugins/pastefromword
154 %{_appdir}/plugins/pastetext
155 %{_appdir}/plugins/scayt
156 %{_appdir}/plugins/showblocks
157 %{_appdir}/plugins/smiley
158 %{_appdir}/plugins/specialchar
159 %{_appdir}/plugins/stylescombo
160 %{_appdir}/plugins/table
161 %{_appdir}/plugins/tabletools
162 %{_appdir}/plugins/templates
163 %{_appdir}/plugins/uicolor
164 %{_appdir}/plugins/wsc
165
166 %{_examplesdir}/%{name}-%{version}
167
168 %files -n php-%{name}
169 %defattr(644,root,root,755)
170 %{php_data_dir}/ckeditor.php
This page took 0.151387 seconds and 3 git commands to generate.