2 # - writable dirs: Ensure that the directories app/etc, var, and media are writable by the web server
5 %bcond_with system_zf # use system ZF, unfinished
7 %define php_min_version 5.2.0
8 Summary: An open-source eCommerce platform focused on flexibility and control
12 License: Open Software License (OSL 3.0)
13 Group: Applications/WWW
14 Source0: http://www.magentocommerce.com/downloads/assets/%{version}/%{name}-%{version}.tar.bz2
15 # Source0-md5: 319882ad9eaef8b7312071ba48a8045a
18 Source3: cron_disabled.php
19 Source4: cron_import.php
20 Source5: cron_export.php
22 Patch1: categories_id.patch
23 Patch2: cron_export_fix_lang.patch
24 Patch3: homelist_random.patch
25 Patch4: pld-mysql-root.patch
26 Patch5: amcustomerattr-optional.patch
27 Patch6: local.xml-empty.patch
28 URL: http://www.magentocommerce.com/
29 BuildRequires: rpm-php-pearprov
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.654
32 Requires: php(core) >= %{php_min_version}
40 Requires: php(pdo-mysql)
41 Requires: php(simplexml)
44 Requires: webserver(access)
45 Requires: webserver(alias)
46 Requires: webserver(indexfile)
47 Requires: webserver(php)
48 Requires: webserver(rewrite)
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _webapps /etc/webapps
54 %define _webapp %{name}
55 %define _sysconfdir %{_webapps}/%{_webapp}
56 %define _appdir %{_datadir}/%{_webapp}
59 %define libs_3dsecure XMLParser.php
60 %define libs_mage 3Dsecure/CentinelClient.php CentinelErrors.php CreateController.php ProfileController.php Rijndael.php Varien.*.php abstract.php Mage.*.php Maged/.*.php app/Mage.php google.*.php lib/Varien/.*.php phpseclib/Crypt/.* phpseclib/Math/.* phpseclib/Net/.* processor.php xml-processing/.*.php
61 %define libs_pear DES.php Crypt/DES.php Crypt/Hash.php Crypt/Random.php Crypt/TripleDES.php Math/BigInteger.php Crypt/RSA.php PEAR.* System.php HTML/Template/IT.php OS/Guess.php pearcmd.php
63 %if %{without system_zf}
64 %define libs_zf Zend/.*
66 %define _noautoreq_pear %{libs_mage} %{libs_pear} %{libs_3dsecure} %{?libs_zf}
68 # exclude optional php dependencies
69 %define _noautophp php-sqlite
71 # put it together for rpmbuild
72 %define _noautoreq %{?_noautophp} %{?_noautopear}
75 An open-source eCommerce platform focused on flexibility and control.
78 Summary: Magento setup package
79 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Magento
80 Group: Applications/WWW
81 Requires: %{name} = %{version}-%{release}
84 Install this package to configure initial Magento installation. You
85 should uninstall this package when you're done, as it considered
86 insecure to keep the setup files in place.
88 %description setup -l pl.UTF-8
89 Ten pakiet należy zainstalować w celu wstępnej konfiguracji Magento po
90 pierwszej instalacji. Potem należy go odinstalować, jako że
91 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
94 Summary: Magento downloader
95 Group: Applications/WWW
96 Requires: %{name} = %{version}-%{release}
98 %description downloader
99 Downloader for Magento.
103 mv %{name}/{.??*,*} . && rmdir %{name}
105 # use system Zend, magento has bundled ZF somewhere between versions 1.9.6 and 1.9.7
106 %if %{with system_zf}
110 # php-pear-PEAR 1.7.2
114 # php-pear-HTTP 1.4.1
115 rm lib/PEAR/HTTP/HTTP.php
117 # php-pear-HTTP_Request 1.4.4
118 rm lib/PEAR/HTTP/Request.php
119 rm -r lib/PEAR/HTTP/Request
121 # php-pear-Mail_Mime 1.5.2
122 rm lib/PEAR/Mail/mime.php
123 rm lib/PEAR/Mail/mimePart.php
124 rm lib/PEAR/Mail/xmail.{dtd,xsl}
126 # php-pear-Mail_mimeDecode 1.5.0
127 rm lib/PEAR/Mail/mimeDecode.php
129 # php-pear-Net_URL 1.0.15
130 rm lib/PEAR/Net/URL.php
132 # php-pear-Net_Socket 1.0.9
133 rm lib/PEAR/Net/Socket.php
135 # php-pear-SOAP-0.12.0-1.noarch
138 # php-pear-XML_Parser 1.3.2
139 rm lib/PEAR/XML/Parser.php
140 rm lib/PEAR/XML/Parser/Simple.php
141 rmdir lib/PEAR/XML/Parser
143 # php-pear-XML_Serializer 0.19.2
144 rm lib/PEAR/XML/Serializer.php
145 rm lib/PEAR/XML/Unserializer.php
147 rmdir lib/PEAR/{HTTP,Mail,Net}
158 # cleanup backups after patching
159 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
161 # include default config in package files (empty so it can be treated as missing)
166 mv RELEASE_NOTES.txt doc
169 mv .htaccess.sample doc/htaccess.sample
171 # contents included in apache.conf
172 find -name .htaccess | xargs rm
175 rm -rf $RPM_BUILD_ROOT
176 install -d $RPM_BUILD_ROOT%{_appdir}
177 cp -a . $RPM_BUILD_ROOT%{_appdir}
178 rm -rf $RPM_BUILD_ROOT%{_appdir}/doc
179 rm -f $RPM_BUILD_ROOT%{_appdir}/debug*.list
181 install -d $RPM_BUILD_ROOT%{_sysconfdir}
182 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
183 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
185 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/crontab
186 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/cron_disabled.php
187 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/cron_import.php
188 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/cron_export.php
191 rm -rf $RPM_BUILD_ROOT
193 %triggerin -- apache1 < 1.3.37-3, apache1-base
194 %webapp_register apache %{_webapp}
196 %triggerun -- apache1 < 1.3.37-3, apache1-base
197 %webapp_unregister apache %{_webapp}
199 %triggerin -- apache < 2.2.0, apache-base
200 %webapp_register httpd %{_webapp}
202 %triggerun -- apache < 2.2.0, apache-base
203 %webapp_unregister httpd %{_webapp}
206 %defattr(644,root,root,755)
208 %dir %attr(750,root,http) %{_sysconfdir}
209 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
210 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
214 %dir %{_appdir}/app/code
215 %{_appdir}/app/code/*
216 %dir %{_appdir}/app/design
217 %{_appdir}/app/design/*
218 %dir %attr(775,root,http) %{_appdir}/app/etc
219 %dir %attr(775,root,http) %{_appdir}/app/etc/modules
220 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/config.xml
221 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/local.xml*
222 %attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/modules/*.xml
223 %dir %{_appdir}/app/locale
224 %{_appdir}/app/locale/*
225 %{_appdir}/app/Mage.php
226 %dir %{_appdir}/includes
227 %{_appdir}/includes/config.php
228 #%dir %{_appdir}/report
230 %dir %{_appdir}/shell
231 %{_appdir}/shell/*.php
237 %{_appdir}/lib/3Dsecure
239 %{_appdir}/lib/googlecheckout
240 %{_appdir}/lib/LinLibertineFont
242 %{_appdir}/lib/phpseclib
243 %{_appdir}/lib/Varien
244 %if %{without system_zf}
247 %attr(775,root,http) %dir %{_appdir}/media
248 %attr(775,root,http) %dir %{_appdir}/var
249 %{_appdir}/favicon.ico
253 %{_appdir}/cron_disabled.php
254 %{_appdir}/cron_import.php
255 %{_appdir}/cron_export.php
257 #%{_appdir}/STATUS.txt
259 %exclude %{_appdir}/lib/Varien/Pear
260 %exclude %{_appdir}/lib/Varien/Pear.php
261 %exclude %{_appdir}/app/code/core/Mage/Install
262 %exclude %{_appdir}/app/design/install/default/default/template/install
265 %defattr(644,root,root,755)
266 %{_appdir}/LICENSE.html
267 %attr(755,root,root) %{_appdir}/pear
268 %dir %{_appdir}/install.php
269 %dir %{_appdir}/pkginfo
272 %{_appdir}/lib/Varien/Pear
273 %{_appdir}/lib/Varien/Pear.php
275 %{_appdir}/app/code/core/Mage/Install
276 %{_appdir}/app/design/install/default/default/template/install
279 %defattr(644,root,root,755)
280 %dir %{_appdir}/downloader
281 %{_appdir}/downloader/*