]>
Commit | Line | Data |
---|---|---|
66d1805b | 1 | Summary: CKFinder - Web File Manager |
17a06e44 ER |
2 | Summary(pl.UTF-8): Edytor tekstowy dla Internetu |
3 | Name: ckfinder | |
fd3dcf07 ER |
4 | Version: 2.4.2 |
5 | Release: 1 | |
17a06e44 ER |
6 | License: Custom |
7 | Group: Applications/WWW | |
8 | Source0: http://download.cksource.com/CKFinder/CKFinder%20for%20PHP/%{version}/%{name}_php_%{version}.tar.gz | |
fd3dcf07 | 9 | # Source0-md5: 7be5c7b6f1f4f958dffedd3283d5cdb2 |
66d1805b | 10 | URL: http://www.cksource.com/ckfinder |
85923ddf | 11 | Patch1: paths.patch |
8707f7dc | 12 | Patch2: config.patch |
17a06e44 ER |
13 | Source1: find-lang.sh |
14 | Source2: apache.conf | |
15 | Source3: lighttpd.conf | |
8707f7dc | 16 | BuildRequires: rpmbuild(macros) >= 1.565 |
17a06e44 | 17 | BuildRequires: sed >= 4.0 |
066a9f5e | 18 | #Requires: php(gd) |
17a06e44 ER |
19 | Requires: webapps |
20 | Requires: webserver | |
21 | Requires: webserver(access) | |
22 | Requires: webserver(alias) | |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define _webapps /etc/webapps | |
27 | %define _webapp %{name} | |
28 | %define _sysconfdir %{_webapps}/%{_webapp} | |
29 | %define _appdir %{_datadir}/%{name} | |
30 | ||
31 | %define find_lang sh %{SOURCE1} | |
32 | ||
33 | %description | |
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 | |
37 | beginners. | |
38 | ||
39 | %package -n php-%{name} | |
40 | Summary: PHP class to create editors instances | |
41 | Group: Development/Languages/PHP | |
42 | ||
43 | %description -n php-%{name} | |
44 | CKEditor class that can be used to create editor instances in PHP | |
45 | pages on server side. | |
46 | ||
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} | |
f9654a7b | 52 | Requires: php(core) >= 5.0.0 |
066a9f5e | 53 | Requires: php(gd) |
17a06e44 ER |
54 | |
55 | %description connector-php | |
56 | File Manager Connector for PHP. | |
57 | ||
58 | %description connector-php -l pl.UTF-8 | |
59 | Interfejs zarządcy plików do PHP. | |
60 | ||
61 | %prep | |
62 | %setup -qc | |
63 | # use versioned build dir | |
64 | mv ckfinder/* . | |
65 | rmdir ckfinder | |
66d1805b ER |
66 | %undos -f js,css,txt,html,php |
67 | ||
68 | mv lang/_translationstatus.txt . | |
69 | ||
70 | # don't package | |
71 | mv plugins/dummy . | |
17a06e44 ER |
72 | |
73 | # force php5 only | |
17a06e44 | 74 | mv core/ckfinder_php5.php ckfinder.php |
17a06e44 ER |
75 | mv core/connector/php/php5/* core/connector/php |
76 | rmdir core/connector/php/php5 | |
77 | ||
13202184 | 78 | # kill core/ in path |
66d1805b | 79 | #%{__grep} -r core/ . -l | xargs %{__sed} -i -e 's,core/,,g' |
13202184 | 80 | |
85923ddf | 81 | %patch1 -p1 |
8707f7dc | 82 | %patch2 -p1 |
ffa5c134 | 83 | |
17a06e44 ER |
84 | %install |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{php_data_dir},/var/lib/%{name}} | |
87 | ||
66d1805b ER |
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} | |
94 | ||
95 | cp -a core help lang plugins skins $RPM_BUILD_ROOT%{_appdir} | |
17a06e44 ER |
96 | |
97 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
cd219317 | 98 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
17a06e44 ER |
99 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
100 | ||
101 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
102 | cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
17a06e44 ER |
103 | |
104 | %find_lang %{name}.lang | |
105 | ||
106 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
107 | %webapp_register apache %{_webapp} | |
108 | ||
109 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
110 | %webapp_unregister apache %{_webapp} | |
111 | ||
cd219317 | 112 | %triggerin -- apache < 2.2.0, apache-base |
17a06e44 ER |
113 | %webapp_register httpd %{_webapp} |
114 | ||
cd219317 | 115 | %triggerun -- apache < 2.2.0, apache-base |
17a06e44 ER |
116 | %webapp_unregister httpd %{_webapp} |
117 | ||
118 | %triggerin -- lighttpd | |
119 | %webapp_register lighttpd %{_webapp} | |
120 | ||
121 | %triggerun -- lighttpd | |
122 | %webapp_unregister lighttpd %{_webapp} | |
123 | ||
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %files -f %{name}.lang | |
128 | %defattr(644,root,root,755) | |
66d1805b | 129 | %doc changelog.txt install.txt license.txt translations.txt |
17a06e44 ER |
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 | |
66d1805b | 135 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.js |
17a06e44 ER |
136 | |
137 | %dir %{_appdir} | |
17a06e44 | 138 | %{_appdir}/ckfinder.js |
66d1805b | 139 | %{_appdir}/ckfinder_v1.js |
13202184 | 140 | %{_appdir}/ckfinder.html |
17a06e44 | 141 | |
66d1805b ER |
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 | |
149 | ||
150 | %dir %{_appdir}/skins | |
151 | %{_appdir}/skins/kama | |
152 | %{_appdir}/skins/v1 | |
17a06e44 | 153 | |
66d1805b | 154 | %dir %{_appdir}/help |
17a06e44 | 155 | %{_appdir}/help/en |
66d1805b ER |
156 | %{_appdir}/help/files |
157 | %lang(cs) %{_appdir}/help/cs | |
17a06e44 | 158 | %lang(es) %{_appdir}/help/es |
66d1805b ER |
159 | %lang(es_MX) %{_appdir}/help/es-mx |
160 | %lang(fi) %{_appdir}/help/fi | |
161 | %lang(lt) %{_appdir}/help/lt | |
17a06e44 ER |
162 | %lang(pl) %{_appdir}/help/pl |
163 | ||
164 | %dir %attr(770,root,http) /var/lib/%{name} | |
165 | ||
166 | %{_examplesdir}/%{name}-%{version} | |
167 | ||
168 | %files connector-php | |
169 | %defattr(644,root,root,755) | |
66d1805b | 170 | %dir %{_appdir}/core |
d30cea2e | 171 | %dir %{_appdir}/core/connector |
66d1805b ER |
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 | |
17a06e44 ER |
179 | |
180 | %files -n php-%{name} | |
181 | %defattr(644,root,root,755) | |
182 | %{php_data_dir}/ckfinder.php |