]> git.pld-linux.org Git - packages/ckfinder.git/blob - ckfinder.spec
- migrate to apache 2.4
[packages/ckfinder.git] / ckfinder.spec
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
5 Release:        3
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/
11 Patch0:         error_reporting.patch
12 Patch1:         paths.patch
13 Patch2:         config.patch
14 Source1:        find-lang.sh
15 Source2:        apache.conf
16 Source3:        lighttpd.conf
17 Source4:        httpd.conf
18 BuildRequires:  rpmbuild(macros) >= 1.565
19 BuildRequires:  sed >= 4.0
20 #Requires:      php-gd
21 Requires:       webapps
22 Requires:       webserver
23 Requires:       webserver(access)
24 Requires:       webserver(alias)
25 Conflicts:      apache-base < 2.4.0-1
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _webapps        /etc/webapps
30 %define         _webapp         %{name}
31 %define         _sysconfdir     %{_webapps}/%{_webapp}
32 %define         _appdir         %{_datadir}/%{name}
33
34 %define         find_lang       sh %{SOURCE1}
35
36 %description
37 CKFinder is a powerful and easy to use AJAX file manager for web
38 browsers. Its simple interface makes it intuitive and quick to learn
39 for all kinds of users, from advanced professionals to Internet
40 beginners.
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 %package connector-php
51 Summary:        File Manager Connector for PHP
52 Summary(pl.UTF-8):      Interfejs zarządcy plików do PHP
53 Group:          Applications/WWW
54 Requires:       %{name} = %{version}-%{release}
55 Requires:       php(core) >= 5.0.0
56 Requires:       php-gd
57
58 %description connector-php
59 File Manager Connector for PHP.
60
61 %description connector-php -l pl.UTF-8
62 Interfejs zarządcy plików do PHP.
63
64 %prep
65 %setup -qc
66 # use versioned build dir
67 mv ckfinder/* .
68 rmdir ckfinder
69
70 # force php5 only
71 rm core/ckfinder_php4.php
72 mv core/ckfinder_php5.php ckfinder.php
73 rm -r core/connector/php/php4
74 mv core/connector/php/php5/* core/connector/php
75 rmdir core/connector/php/php5
76
77 # kill core/ in path
78 %{__grep} -r core/ . -l | xargs %{__sed} -i -e 's,core/,,g'
79
80 %undos -f js,css,txt,html,php
81
82 %patch0 -p1
83 %patch1 -p1
84 %patch2 -p1
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{php_data_dir},/var/lib/%{name}}
89
90 cp -a ckfinder.js $RPM_BUILD_ROOT%{_appdir}
91 cp -a core/* $RPM_BUILD_ROOT%{_appdir}
92 cp -a ckfinder.html $RPM_BUILD_ROOT%{_appdir}
93 cp -a config.php $RPM_BUILD_ROOT%{_sysconfdir}
94 cp -a ckfinder.php $RPM_BUILD_ROOT%{php_data_dir}
95
96 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
97 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
98 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
99
100 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
101 cp -a _samples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
102
103 %find_lang %{name}.lang
104
105 %triggerin -- apache1 < 1.3.37-3, apache1-base
106 %webapp_register apache %{_webapp}
107
108 %triggerun -- apache1 < 1.3.37-3, apache1-base
109 %webapp_unregister apache %{_webapp}
110
111 %triggerin -- apache-base
112 %webapp_register httpd %{_webapp}
113
114 %triggerun -- apache-base
115 %webapp_unregister httpd %{_webapp}
116
117 %triggerin -- lighttpd
118 %webapp_register lighttpd %{_webapp}
119
120 %triggerun -- lighttpd
121 %webapp_unregister lighttpd %{_webapp}
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %files -f %{name}.lang
127 %defattr(644,root,root,755)
128 %doc changelog.txt install.txt license.txt
129 %dir %attr(750,root,http) %{_sysconfdir}
130 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
132 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
133 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
134
135 %dir %{_appdir}
136 %dir %{_appdir}/connector
137 %dir %{_appdir}/help
138 %dir %{_appdir}/skins
139 %{_appdir}/ckfinder.js
140 %{_appdir}/ckfinder.html
141 %{_appdir}/css
142 %{_appdir}/images
143 %{_appdir}/js
144 %{_appdir}/pages
145
146 %{_appdir}/skins/default
147 %{_appdir}/skins/office2003
148 %{_appdir}/skins/silver
149
150 %{_appdir}/help/en
151 %lang(es_MX) %{_appdir}/help/es-mx
152 %lang(es) %{_appdir}/help/es
153 %lang(pl) %{_appdir}/help/pl
154
155 %dir %attr(770,root,http) /var/lib/%{name}
156
157 %{_examplesdir}/%{name}-%{version}
158
159 %files connector-php
160 %defattr(644,root,root,755)
161 %dir %{_appdir}/connector/php
162 %{_appdir}/connector/php/connector.php
163 %{_appdir}/connector/php/constants.php
164 %{_appdir}/connector/php/CommandHandler
165 %{_appdir}/connector/php/Core
166 %{_appdir}/connector/php/ErrorHandler
167 %{_appdir}/connector/php/Utils
168
169 %files -n php-%{name}
170 %defattr(644,root,root,755)
171 %{php_data_dir}/ckfinder.php
This page took 0.17931 seconds and 3 git commands to generate.