]>
Commit | Line | Data |
---|---|---|
17a06e44 ER |
1 | Summary: AJAX file manager for web browsers |
2 | Summary(pl.UTF-8): Edytor tekstowy dla Internetu | |
3 | Name: ckfinder | |
4 | Version: 1.4.2 | |
cd219317 | 5 | Release: 2 |
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 | |
9 | # Source0-md5: 0f37b528272f915b9fcd3a12e2f53439 | |
10 | URL: http://www.ckfinder.com/ | |
ffa5c134 | 11 | Patch0: error_reporting.patch |
85923ddf | 12 | Patch1: paths.patch |
8707f7dc | 13 | Patch2: config.patch |
17a06e44 ER |
14 | Source1: find-lang.sh |
15 | Source2: apache.conf | |
16 | Source3: lighttpd.conf | |
8707f7dc | 17 | BuildRequires: rpmbuild(macros) >= 1.565 |
17a06e44 ER |
18 | BuildRequires: sed >= 4.0 |
19 | #Requires: php-gd | |
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 | CKFinder is a powerful and easy to use AJAX file manager for web | |
36 | browsers. Its simple interface makes it intuitive and quick to learn | |
37 | for all kinds of users, from advanced professionals to Internet | |
38 | beginners. | |
39 | ||
40 | %package -n php-%{name} | |
41 | Summary: PHP class to create editors instances | |
42 | Group: Development/Languages/PHP | |
43 | ||
44 | %description -n php-%{name} | |
45 | CKEditor class that can be used to create editor instances in PHP | |
46 | pages on server side. | |
47 | ||
48 | %package connector-php | |
49 | Summary: File Manager Connector for PHP | |
50 | Summary(pl.UTF-8): Interfejs zarządcy plików do PHP | |
51 | Group: Applications/WWW | |
52 | Requires: %{name} = %{version}-%{release} | |
f9654a7b | 53 | Requires: php(core) >= 5.0.0 |
17a06e44 ER |
54 | Requires: php-gd |
55 | ||
56 | %description connector-php | |
57 | File Manager Connector for PHP. | |
58 | ||
59 | %description connector-php -l pl.UTF-8 | |
60 | Interfejs zarządcy plików do PHP. | |
61 | ||
62 | %prep | |
63 | %setup -qc | |
64 | # use versioned build dir | |
65 | mv ckfinder/* . | |
66 | rmdir ckfinder | |
67 | ||
68 | # force php5 only | |
69 | rm core/ckfinder_php4.php | |
70 | mv core/ckfinder_php5.php ckfinder.php | |
71 | rm -r core/connector/php/php4 | |
72 | mv core/connector/php/php5/* core/connector/php | |
73 | rmdir core/connector/php/php5 | |
74 | ||
13202184 | 75 | # kill core/ in path |
5dceaf5e | 76 | %{__grep} -r core/ . -l | xargs %{__sed} -i -e 's,core/,,g' |
13202184 | 77 | |
8707f7dc | 78 | %undos -f js,css,txt,html,php |
17a06e44 | 79 | |
ffa5c134 | 80 | %patch0 -p1 |
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 | ||
88 | cp -a ckfinder.js $RPM_BUILD_ROOT%{_appdir} | |
89 | cp -a core/* $RPM_BUILD_ROOT%{_appdir} | |
13202184 | 90 | cp -a ckfinder.html $RPM_BUILD_ROOT%{_appdir} |
17a06e44 ER |
91 | cp -a config.php $RPM_BUILD_ROOT%{_sysconfdir} |
92 | cp -a ckfinder.php $RPM_BUILD_ROOT%{php_data_dir} | |
93 | ||
94 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
cd219317 | 95 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf |
17a06e44 ER |
96 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf |
97 | ||
98 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
99 | cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
17a06e44 ER |
100 | |
101 | %find_lang %{name}.lang | |
102 | ||
103 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
104 | %webapp_register apache %{_webapp} | |
105 | ||
106 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
107 | %webapp_unregister apache %{_webapp} | |
108 | ||
cd219317 | 109 | %triggerin -- apache < 2.2.0, apache-base |
17a06e44 ER |
110 | %webapp_register httpd %{_webapp} |
111 | ||
cd219317 | 112 | %triggerun -- apache < 2.2.0, apache-base |
17a06e44 ER |
113 | %webapp_unregister httpd %{_webapp} |
114 | ||
115 | %triggerin -- lighttpd | |
116 | %webapp_register lighttpd %{_webapp} | |
117 | ||
118 | %triggerun -- lighttpd | |
119 | %webapp_unregister lighttpd %{_webapp} | |
120 | ||
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %files -f %{name}.lang | |
125 | %defattr(644,root,root,755) | |
126 | %doc changelog.txt install.txt license.txt | |
127 | %dir %attr(750,root,http) %{_sysconfdir} | |
128 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
129 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
130 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
131 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php | |
132 | ||
133 | %dir %{_appdir} | |
134 | %dir %{_appdir}/connector | |
135 | %dir %{_appdir}/help | |
136 | %dir %{_appdir}/skins | |
137 | %{_appdir}/ckfinder.js | |
13202184 | 138 | %{_appdir}/ckfinder.html |
17a06e44 ER |
139 | %{_appdir}/css |
140 | %{_appdir}/images | |
141 | %{_appdir}/js | |
142 | %{_appdir}/pages | |
143 | ||
144 | %{_appdir}/skins/default | |
145 | %{_appdir}/skins/office2003 | |
146 | %{_appdir}/skins/silver | |
147 | ||
148 | %{_appdir}/help/en | |
149 | %lang(es_MX) %{_appdir}/help/es-mx | |
150 | %lang(es) %{_appdir}/help/es | |
151 | %lang(pl) %{_appdir}/help/pl | |
152 | ||
153 | %dir %attr(770,root,http) /var/lib/%{name} | |
154 | ||
155 | %{_examplesdir}/%{name}-%{version} | |
156 | ||
157 | %files connector-php | |
158 | %defattr(644,root,root,755) | |
159 | %dir %{_appdir}/connector/php | |
160 | %{_appdir}/connector/php/connector.php | |
161 | %{_appdir}/connector/php/constants.php | |
162 | %{_appdir}/connector/php/CommandHandler | |
163 | %{_appdir}/connector/php/Core | |
164 | %{_appdir}/connector/php/ErrorHandler | |
165 | %{_appdir}/connector/php/Utils | |
166 | ||
167 | %files -n php-%{name} | |
168 | %defattr(644,root,root,755) | |
169 | %{php_data_dir}/ckfinder.php |