]> git.pld-linux.org Git - packages/magento.git/blob - magento.spec
a60f28f184cf733eacf82f8231ac5a99fb4c6949
[packages/magento.git] / magento.spec
1 # TODO
2 # - writable dirs: Ensure that the directories app/etc, var, and media are writable by the web server
3 #
4 # Conditional build:
5 %bcond_with     system_zf       # use system ZF, unfinished
6
7 %include        /usr/lib/rpm/macros.php
8 %define         php_min_version 5.2.0
9 Summary:        An open-source eCommerce platform focused on flexibility and control
10 Name:           magento
11 Version:        1.4.1.1
12 Release:        0.13
13 License:        Open Software License (OSL 3.0)
14 Group:          Applications/WWW
15 URL:            http://www.magentocommerce.com/
16 Source0:        http://www.magentocommerce.com/downloads/assets/%{version}/%{name}-%{version}.tar.bz2
17 # Source0-md5:  319882ad9eaef8b7312071ba48a8045a
18 Source1:        apache.conf
19 Source2:        crontab
20 Source3:        cron_disabled.php
21 Source4:        cron_import.php
22 Source5:        cron_export.php
23 Patch0:         php43.patch
24 Patch1:         categories_id.patch
25 Patch2:         cron_export_fix_lang.patch
26 Patch3:         homelist_random.patch
27 Patch4:         pld-mysql-root.patch
28 Patch5:         amcustomerattr-optional.patch
29 Patch6:         local.xml-empty.patch
30 BuildRequires:  rpm-php-pearprov
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.553
33 Requires:       php-common >= 4:%{php_min_version}
34 Requires:       php-ctype
35 Requires:       php-curl
36 Requires:       php-dom
37 Requires:       php-gd
38 Requires:       php-hash
39 Requires:       php-iconv
40 Requires:       php-mcrypt
41 Requires:       php-mhash
42 Requires:       php-mhash
43 Requires:       php-pdo-mysql
44 Requires:       php-simplexml
45 Requires:       webapps
46 Requires:       webserver(access)
47 Requires:       webserver(alias)
48 Requires:       webserver(indexfile)
49 Requires:       webserver(php)
50 Requires:       webserver(rewrite)
51 Suggests:       php-pecl-APC
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         _webapps        /etc/webapps
56 %define         _webapp         %{name}
57 %define         _sysconfdir     %{_webapps}/%{_webapp}
58 %define         _appdir         %{_datadir}/%{_webapp}
59
60 # lib/3Dsecure
61 %define         libs_3dsecure   pear(XMLParser.php)
62 %define         libs_mage               pear(3Dsecure/CentinelClient.php) pear(CentinelErrors.php) pear(CreateController.php) pear(ProfileController.php) pear(Rijndael.php) pear(Varien.*.php) pear(abstract.php) pear(Mage.*.php) pear(Maged/.*.php) pear(app/Mage.php) pear(google.*.php) pear(lib/Varien/.*.php) pear(phpseclib/Crypt/.*) pear(phpseclib/Math/.*) pear(phpseclib/Net/.*) pear(processor.php) pear(xml-processing/.*.php)
63 %define         libs_pear               pear(Crypt/DES.php) pear(Crypt/Hash.php) pear(Crypt/Random.php) pear(Crypt/TripleDES.php) pear(Math/BigInteger.php) pear(Crypt/RSA.php)
64 %define         _noautopear             %{libs_mage} %{libs_pear} %{libs_3dsecure}
65
66 # exclude optional php dependencies
67 %define         _noautophp      %{nil}
68
69 # put it together for rpmbuild
70 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
71
72 %description
73 An open-source eCommerce platform focused on flexibility and control.
74
75 %package setup
76 Summary:        Magento setup package
77 Summary(pl.UTF-8):      Pakiet do wstępnej konfiguracji Magento
78 Group:          Applications/WWW
79 Requires:       %{name} = %{version}-%{release}
80
81 %description setup
82 Install this package to configure initial Magento installation. You
83 should uninstall this package when you're done, as it considered
84 insecure to keep the setup files in place.
85
86 %description setup -l pl.UTF-8
87 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Magento po
88 pierwszej instalacji. Potem należy go odinstalować, jako że
89 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
90
91 %package downloader
92 Summary:        Magento downloader
93 Group:          Applications/WWW
94 Requires:       %{name} = %{version}-%{release}
95
96 %description downloader
97 Downloader for Magento.
98
99 %prep
100 %setup -qc
101 mv %{name}/{.??*,*} . && rmdir %{name}
102
103 # use system Zend, magento has bundled ZF somewhere between versions 1.9.6 and 1.9.7
104 %if %{with system_zf}
105 rm -r lib/Zend
106 %endif
107
108 # php-pear-PEAR 1.7.2
109 rm lib/PEAR/PEAR.php
110 rm -r lib/PEAR/PEAR
111
112 # php-pear-HTTP 1.4.1
113 rm lib/PEAR/HTTP/HTTP.php
114
115 # php-pear-HTTP_Request 1.4.4
116 rm lib/PEAR/HTTP/Request.php
117 rm -r lib/PEAR/HTTP/Request
118
119 # php-pear-Mail_Mime 1.5.2
120 rm lib/PEAR/Mail/mime.php
121 rm lib/PEAR/Mail/mimePart.php
122 rm lib/PEAR/Mail/xmail.{dtd,xsl}
123
124 # php-pear-Mail_mimeDecode 1.5.0
125 rm lib/PEAR/Mail/mimeDecode.php
126
127 # php-pear-Net_URL 1.0.15
128 rm lib/PEAR/Net/URL.php
129
130 # php-pear-Net_Socket 1.0.9
131 rm lib/PEAR/Net/Socket.php
132
133 # php-pear-SOAP-0.12.0-1.noarch
134 rm -r lib/PEAR/SOAP
135
136 # php-pear-XML_Parser 1.3.2
137 rm lib/PEAR/XML/Parser.php
138 rm lib/PEAR/XML/Parser/Simple.php
139 rmdir lib/PEAR/XML/Parser
140
141 # php-pear-XML_Serializer 0.19.2
142 rm lib/PEAR/XML/Serializer.php
143 rm lib/PEAR/XML/Unserializer.php
144
145 rmdir lib/PEAR/{HTTP,Mail,Net}
146
147 %undos -f php,phtml
148 #%patch0 -p1
149 %patch1 -p1
150 %patch2 -p1
151 %patch3 -p1
152 %patch4 -p1
153 %patch5 -p1
154 %patch6 -p1
155
156 # cleanup backups after patching
157 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
158
159 # include default config in package files (empty so it can be treated as missing)
160 > app/etc/local.xml
161
162 # make docs to pack
163 install -d doc
164 mv RELEASE_NOTES.txt doc
165 mv LICENSE*.txt doc
166 mv *sample doc
167 mv .htaccess.sample doc/htaccess.sample
168
169 # contents included in apache.conf
170 find -name .htaccess | xargs rm
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 install -d $RPM_BUILD_ROOT%{_appdir}
175 cp -a . $RPM_BUILD_ROOT%{_appdir}
176 rm -rf $RPM_BUILD_ROOT%{_appdir}/doc
177 rm -f $RPM_BUILD_ROOT%{_appdir}/debug*.list
178
179 install -d $RPM_BUILD_ROOT%{_sysconfdir}
180 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
181 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
182
183 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/crontab
184 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/cron_disabled.php
185 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/cron_import.php
186 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/cron_export.php
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %triggerin -- apache1 < 1.3.37-3, apache1-base
192 %webapp_register apache %{_webapp}
193
194 %triggerun -- apache1 < 1.3.37-3, apache1-base
195 %webapp_unregister apache %{_webapp}
196
197 %triggerin -- apache < 2.2.0, apache-base
198 %webapp_register httpd %{_webapp}
199
200 %triggerun -- apache < 2.2.0, apache-base
201 %webapp_unregister httpd %{_webapp}
202
203 %files
204 %defattr(644,root,root,755)
205 %doc doc/*
206 %dir %attr(750,root,http) %{_sysconfdir}
207 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
208 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
209 %dir %{_appdir}
210 %{_appdir}/errors
211 %dir %{_appdir}/app
212 %dir %{_appdir}/app/code
213 %{_appdir}/app/code/*
214 %dir %{_appdir}/app/design
215 %{_appdir}/app/design/*
216 %dir %attr(775,root,http) %{_appdir}/app/etc
217 %dir %attr(775,root,http) %{_appdir}/app/etc/modules
218 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/config.xml
219 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/local.xml*
220 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/modules/*.xml
221 %dir %{_appdir}/app/locale
222 %{_appdir}/app/locale/*
223 %{_appdir}/app/Mage.php
224 %dir %{_appdir}/includes
225 %{_appdir}/includes/config.php
226 #%dir %{_appdir}/report
227 #%{_appdir}/report/*
228 %dir %{_appdir}/shell
229 %{_appdir}/shell/*.php
230 %dir %{_appdir}/skin
231 %{_appdir}/skin/*
232 %dir %{_appdir}/js
233 %{_appdir}/js/*
234 %dir %{_appdir}/lib
235 %{_appdir}/lib/3Dsecure
236 %{_appdir}/lib/flex
237 %{_appdir}/lib/googlecheckout
238 %{_appdir}/lib/LinLibertineFont
239 %{_appdir}/lib/PEAR
240 %{_appdir}/lib/phpseclib
241 %{_appdir}/lib/Varien
242 %if %{without system_zf}
243 %{_appdir}/lib/Zend
244 %endif
245 %attr(775,root,http) %dir %{_appdir}/media
246 %attr(775,root,http) %dir %{_appdir}/var
247 %{_appdir}/favicon.ico
248 %{_appdir}/cron.php
249 %{_appdir}/cron.sh
250 %{_appdir}/crontab
251 %{_appdir}/cron_disabled.php
252 %{_appdir}/cron_import.php
253 %{_appdir}/cron_export.php
254 %{_appdir}/index.php
255 #%{_appdir}/STATUS.txt
256
257 %exclude %{_appdir}/lib/Varien/Pear
258 %exclude %{_appdir}/lib/Varien/Pear.php
259 %exclude %{_appdir}/app/code/core/Mage/Install
260 %exclude %{_appdir}/app/design/install/default/default/template/install
261
262 %files setup
263 %defattr(644,root,root,755)
264 %{_appdir}/LICENSE.html
265 %attr(755,root,root) %{_appdir}/pear
266 %dir %{_appdir}/install.php
267 %dir %{_appdir}/pkginfo
268 %{_appdir}/pkginfo/*
269
270 %{_appdir}/lib/Varien/Pear
271 %{_appdir}/lib/Varien/Pear.php
272
273 %{_appdir}/app/code/core/Mage/Install
274 %{_appdir}/app/design/install/default/default/template/install
275
276 %files downloader
277 %defattr(644,root,root,755)
278 %dir %{_appdir}/downloader
279 %{_appdir}/downloader/*
This page took 0.065136 seconds and 2 git commands to generate.