1 Summary: CKFinder - Web File Manager
2 Summary(pl.UTF-8): Edytor tekstowy dla Internetu
7 Group: Applications/WWW
8 Source0: http://download.cksource.com/CKFinder/CKFinder%20for%20PHP/%{version}/%{name}_php_%{version}.tar.gz
9 # Source0-md5: 7be5c7b6f1f4f958dffedd3283d5cdb2
10 URL: http://www.cksource.com/ckfinder
15 Source3: lighttpd.conf
16 BuildRequires: rpmbuild(macros) >= 1.565
17 BuildRequires: sed >= 4.0
21 Requires: webserver(access)
22 Requires: webserver(alias)
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _webapps /etc/webapps
27 %define _webapp %{name}
28 %define _sysconfdir %{_webapps}/%{_webapp}
29 %define _appdir %{_datadir}/%{name}
31 %define find_lang sh %{SOURCE1}
34 CKFinder is a powerful and easy to use AJAX file manager for web
35 browsers. Its simple interface makes it intuitive and quick to learn
36 for all kinds of users, from advanced professionals to Internet
39 %package -n php-%{name}
40 Summary: PHP class to create editors instances
41 Group: Development/Languages/PHP
43 %description -n php-%{name}
44 CKEditor class that can be used to create editor instances in PHP
47 %package connector-php
48 Summary: File Manager Connector for PHP
49 Summary(pl.UTF-8): Interfejs zarządcy plików do PHP
50 Group: Applications/WWW
51 Requires: %{name} = %{version}-%{release}
52 Requires: php(core) >= 5.0.0
55 %description connector-php
56 File Manager Connector for PHP.
58 %description connector-php -l pl.UTF-8
59 Interfejs zarządcy plików do PHP.
63 # use versioned build dir
66 %undos -f js,css,txt,html,php
68 mv lang/_translationstatus.txt .
74 mv core/ckfinder_php5.php ckfinder.php
75 mv core/connector/php/php5/* core/connector/php
76 rmdir core/connector/php/php5
79 #%{__grep} -r core/ . -l | xargs %{__sed} -i -e 's,core/,,g'
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{php_data_dir},/var/lib/%{name}}
88 cp -p ckfinder.js $RPM_BUILD_ROOT%{_appdir}
89 cp -p ckfinder_v1.js $RPM_BUILD_ROOT%{_appdir}
90 cp -p ckfinder.html $RPM_BUILD_ROOT%{_appdir}
91 cp -p ckfinder.php $RPM_BUILD_ROOT%{php_data_dir}
92 cp -p config.php $RPM_BUILD_ROOT%{_sysconfdir}
93 cp -p config.js $RPM_BUILD_ROOT%{_sysconfdir}
95 cp -a core help lang plugins skins $RPM_BUILD_ROOT%{_appdir}
97 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
98 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
99 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
101 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
102 cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
104 %find_lang %{name}.lang
106 %triggerin -- apache1 < 1.3.37-3, apache1-base
107 %webapp_register apache %{_webapp}
109 %triggerun -- apache1 < 1.3.37-3, apache1-base
110 %webapp_unregister apache %{_webapp}
112 %triggerin -- apache < 2.2.0, apache-base
113 %webapp_register httpd %{_webapp}
115 %triggerun -- apache < 2.2.0, apache-base
116 %webapp_unregister httpd %{_webapp}
118 %triggerin -- lighttpd
119 %webapp_register lighttpd %{_webapp}
121 %triggerun -- lighttpd
122 %webapp_unregister lighttpd %{_webapp}
125 rm -rf $RPM_BUILD_ROOT
127 %files -f %{name}.lang
128 %defattr(644,root,root,755)
129 %doc changelog.txt install.txt license.txt translations.txt
130 %dir %attr(750,root,http) %{_sysconfdir}
131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
133 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
134 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
135 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.js
138 %{_appdir}/ckfinder.js
139 %{_appdir}/ckfinder_v1.js
140 %{_appdir}/ckfinder.html
142 %dir %{_appdir}/plugins
143 %{_appdir}/plugins/fileeditor
144 %{_appdir}/plugins/flashupload
145 %{_appdir}/plugins/gallery
146 %{_appdir}/plugins/imageresize
147 %{_appdir}/plugins/watermark
148 %{_appdir}/plugins/zip
150 %dir %{_appdir}/skins
151 %{_appdir}/skins/kama
156 %{_appdir}/help/files
157 %lang(cs) %{_appdir}/help/cs
158 %lang(es) %{_appdir}/help/es
159 %lang(es_MX) %{_appdir}/help/es-mx
160 %lang(fi) %{_appdir}/help/fi
161 %lang(lt) %{_appdir}/help/lt
162 %lang(pl) %{_appdir}/help/pl
164 %dir %attr(770,root,http) /var/lib/%{name}
166 %{_examplesdir}/%{name}-%{version}
169 %defattr(644,root,root,755)
171 %dir %{_appdir}/core/connector
172 %dir %{_appdir}/core/connector/php
173 %{_appdir}/core/connector/php/connector.php
174 %{_appdir}/core/connector/php/constants.php
175 %{_appdir}/core/connector/php/CommandHandler
176 %{_appdir}/core/connector/php/Core
177 %{_appdir}/core/connector/php/ErrorHandler
178 %{_appdir}/core/connector/php/Utils
180 %files -n php-%{name}
181 %defattr(644,root,root,755)
182 %{php_data_dir}/ckfinder.php