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