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 %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
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
20 Source3: cron_disabled.php
21 Source4: cron_import.php
22 Source5: cron_export.php
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}
43 Requires: php-pdo-mysql
44 Requires: php-simplexml
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
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define _webapps /etc/webapps
56 %define _webapp %{name}
57 %define _sysconfdir %{_webapps}/%{_webapp}
58 %define _appdir %{_datadir}/%{_webapp}
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}
66 # exclude optional php dependencies
67 %define _noautophp %{nil}
69 # put it together for rpmbuild
70 %define _noautoreq %{?_noautophp} %{?_noautopear}
73 An open-source eCommerce platform focused on flexibility and control.
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}
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.
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.
92 Summary: Magento downloader
93 Group: Applications/WWW
94 Requires: %{name} = %{version}-%{release}
96 %description downloader
97 Downloader for Magento.
101 mv %{name}/{.??*,*} . && rmdir %{name}
103 # use system Zend, magento has bundled ZF somewhere between versions 1.9.6 and 1.9.7
104 %if %{with system_zf}
108 # php-pear-PEAR 1.7.2
112 # php-pear-HTTP 1.4.1
113 rm lib/PEAR/HTTP/HTTP.php
115 # php-pear-HTTP_Request 1.4.4
116 rm lib/PEAR/HTTP/Request.php
117 rm -r lib/PEAR/HTTP/Request
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}
124 # php-pear-Mail_mimeDecode 1.5.0
125 rm lib/PEAR/Mail/mimeDecode.php
127 # php-pear-Net_URL 1.0.15
128 rm lib/PEAR/Net/URL.php
130 # php-pear-Net_Socket 1.0.9
131 rm lib/PEAR/Net/Socket.php
133 # php-pear-SOAP-0.12.0-1.noarch
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
141 # php-pear-XML_Serializer 0.19.2
142 rm lib/PEAR/XML/Serializer.php
143 rm lib/PEAR/XML/Unserializer.php
145 rmdir lib/PEAR/{HTTP,Mail,Net}
156 # cleanup backups after patching
157 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
159 # include default config in package files (empty so it can be treated as missing)
164 mv RELEASE_NOTES.txt doc
167 mv .htaccess.sample doc/htaccess.sample
169 # contents included in apache.conf
170 find -name .htaccess | xargs rm
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
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
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
189 rm -rf $RPM_BUILD_ROOT
191 %triggerin -- apache1 < 1.3.37-3, apache1-base
192 %webapp_register apache %{_webapp}
194 %triggerun -- apache1 < 1.3.37-3, apache1-base
195 %webapp_unregister apache %{_webapp}
197 %triggerin -- apache < 2.2.0, apache-base
198 %webapp_register httpd %{_webapp}
200 %triggerun -- apache < 2.2.0, apache-base
201 %webapp_unregister httpd %{_webapp}
204 %defattr(644,root,root,755)
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
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
228 %dir %{_appdir}/shell
229 %{_appdir}/shell/*.php
235 %{_appdir}/lib/3Dsecure
237 %{_appdir}/lib/googlecheckout
238 %{_appdir}/lib/LinLibertineFont
240 %{_appdir}/lib/phpseclib
241 %{_appdir}/lib/Varien
242 %if %{without system_zf}
245 %attr(775,root,http) %dir %{_appdir}/media
246 %attr(775,root,http) %dir %{_appdir}/var
247 %{_appdir}/favicon.ico
251 %{_appdir}/cron_disabled.php
252 %{_appdir}/cron_import.php
253 %{_appdir}/cron_export.php
255 #%{_appdir}/STATUS.txt
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
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
270 %{_appdir}/lib/Varien/Pear
271 %{_appdir}/lib/Varien/Pear.php
273 %{_appdir}/app/code/core/Mage/Install
274 %{_appdir}/app/design/install/default/default/template/install
277 %defattr(644,root,root,755)
278 %dir %{_appdir}/downloader
279 %{_appdir}/downloader/*