]> git.pld-linux.org Git - packages/magento.git/blame - magento.spec
use virtual php deps
[packages/magento.git] / magento.spec
CommitLineData
5c34000d
ER
1# TODO
2# - writable dirs: Ensure that the directories app/etc, var, and media are writable by the web server
65e6045a
ER
3#
4# Conditional build:
5%bcond_with system_zf # use system ZF, unfinished
6
0827f4e2 7%include /usr/lib/rpm/macros.php
5c34000d 8%define php_min_version 5.2.0
be38579b
ER
9Summary: An open-source eCommerce platform focused on flexibility and control
10Name: magento
abcfbc5a 11Version: 1.4.1.1
65e6045a 12Release: 0.13
5c34000d 13License: Open Software License (OSL 3.0)
be38579b 14Group: Applications/WWW
be38579b 15Source0: http://www.magentocommerce.com/downloads/assets/%{version}/%{name}-%{version}.tar.bz2
abcfbc5a 16# Source0-md5: 319882ad9eaef8b7312071ba48a8045a
c37abe4f 17Source1: apache.conf
65e6045a
ER
18Source2: crontab
19Source3: cron_disabled.php
20Source4: cron_import.php
21Source5: cron_export.php
22Patch0: php43.patch
23Patch1: categories_id.patch
24Patch2: cron_export_fix_lang.patch
25Patch3: homelist_random.patch
cb64d730
ER
26Patch4: pld-mysql-root.patch
27Patch5: amcustomerattr-optional.patch
873d951b 28Patch6: local.xml-empty.patch
dfa08ade 29URL: http://www.magentocommerce.com/
b90a3ba0 30BuildRequires: rpm-php-pearprov
31BuildRequires: rpm-pythonprov
5c34000d 32BuildRequires: rpmbuild(macros) >= 1.553
dfa08ade
ER
33Requires: php(core) >= %{php_min_version}
34Requires: php(ctype)
35Requires: php(curl)
36Requires: php(dom)
37Requires: php(gd)
38Requires: php(hash)
39Requires: php(iconv)
40Requires: php(mcrypt)
41Requires: php(pdo-mysql)
42Requires: php(simplexml)
5c34000d 43Requires: php-mhash
cb64d730 44Requires: php-mhash
cb64d730
ER
45Requires: webapps
46Requires: webserver(access)
47Requires: webserver(alias)
48Requires: webserver(indexfile)
49Requires: webserver(php)
50Requires: webserver(rewrite)
5c34000d 51Suggests: php-pecl-APC
be38579b
ER
52BuildArch: noarch
53BuildRoot: %{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
0827f4e2
ER
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
be38579b
ER
72%description
73An open-source eCommerce platform focused on flexibility and control.
74
cb64d730
ER
75%package setup
76Summary: Magento setup package
77Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Magento
78Group: Applications/WWW
79Requires: %{name} = %{version}-%{release}
80
81%description setup
82Install this package to configure initial Magento installation. You
83should uninstall this package when you're done, as it considered
84insecure to keep the setup files in place.
85
86%description setup -l pl.UTF-8
87Ten pakiet należy zainstalować w celu wstępnej konfiguracji Magento po
88pierwszej instalacji. Potem należy go odinstalować, jako że
89pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
90
b2103559
ER
91%package downloader
92Summary: Magento downloader
93Group: Applications/WWW
94Requires: %{name} = %{version}-%{release}
95
96%description downloader
97Downloader for Magento.
98
be38579b 99%prep
a2a459fc
ER
100%setup -qc
101mv %{name}/{.??*,*} . && rmdir %{name}
abcfbc5a
ER
102
103# use system Zend, magento has bundled ZF somewhere between versions 1.9.6 and 1.9.7
65e6045a 104%if %{with system_zf}
0827f4e2 105rm -r lib/Zend
65e6045a 106%endif
0827f4e2
ER
107
108# php-pear-PEAR 1.7.2
109rm lib/PEAR/PEAR.php
110rm -r lib/PEAR/PEAR
111
112# php-pear-HTTP 1.4.1
113rm lib/PEAR/HTTP/HTTP.php
114
115# php-pear-HTTP_Request 1.4.4
116rm lib/PEAR/HTTP/Request.php
117rm -r lib/PEAR/HTTP/Request
118
119# php-pear-Mail_Mime 1.5.2
120rm lib/PEAR/Mail/mime.php
121rm lib/PEAR/Mail/mimePart.php
122rm lib/PEAR/Mail/xmail.{dtd,xsl}
123
124# php-pear-Mail_mimeDecode 1.5.0
125rm lib/PEAR/Mail/mimeDecode.php
126
127# php-pear-Net_URL 1.0.15
128rm lib/PEAR/Net/URL.php
129
130# php-pear-Net_Socket 1.0.9
131rm lib/PEAR/Net/Socket.php
132
133# php-pear-SOAP-0.12.0-1.noarch
134rm -r lib/PEAR/SOAP
135
136# php-pear-XML_Parser 1.3.2
137rm lib/PEAR/XML/Parser.php
138rm lib/PEAR/XML/Parser/Simple.php
139rmdir lib/PEAR/XML/Parser
140
141# php-pear-XML_Serializer 0.19.2
142rm lib/PEAR/XML/Serializer.php
143rm lib/PEAR/XML/Unserializer.php
144
145rmdir lib/PEAR/{HTTP,Mail,Net}
abcfbc5a 146
cb64d730 147%undos -f php,phtml
be38579b
ER
148#%patch0 -p1
149%patch1 -p1
150%patch2 -p1
151%patch3 -p1
cb64d730
ER
152%patch4 -p1
153%patch5 -p1
873d951b 154%patch6 -p1
a2a459fc
ER
155
156# cleanup backups after patching
157find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
158
873d951b
ER
159# include default config in package files (empty so it can be treated as missing)
160> app/etc/local.xml
e4a640ec 161
a2a459fc 162# make docs to pack
cb64d730 163install -d doc
a2a459fc 164mv RELEASE_NOTES.txt doc
cb64d730
ER
165mv LICENSE*.txt doc
166mv *sample doc
a2a459fc 167mv .htaccess.sample doc/htaccess.sample
be38579b 168
5c34000d
ER
169# contents included in apache.conf
170find -name .htaccess | xargs rm
171
be38579b
ER
172%install
173rm -rf $RPM_BUILD_ROOT
174install -d $RPM_BUILD_ROOT%{_appdir}
175cp -a . $RPM_BUILD_ROOT%{_appdir}
a2a459fc 176rm -rf $RPM_BUILD_ROOT%{_appdir}/doc
0827f4e2 177rm -f $RPM_BUILD_ROOT%{_appdir}/debug*.list
be38579b
ER
178
179install -d $RPM_BUILD_ROOT%{_sysconfdir}
c37abe4f
ER
180cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
181cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
be38579b
ER
182
183cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/crontab
184cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/cron_disabled.php
185cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/cron_import.php
186cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/cron_export.php
187
188%clean
189rm -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)
a2a459fc 205%doc doc/*
be38579b
ER
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
5c34000d 212%dir %{_appdir}/app/code
be38579b 213%{_appdir}/app/code/*
5c34000d 214%dir %{_appdir}/app/design
be38579b 215%{_appdir}/app/design/*
cb64d730
ER
216%dir %attr(775,root,http) %{_appdir}/app/etc
217%dir %attr(775,root,http) %{_appdir}/app/etc/modules
e4a640ec 218%attr(664,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/app/etc/config.xml
cb64d730
ER
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
5c34000d 221%dir %{_appdir}/app/locale
be38579b
ER
222%{_appdir}/app/locale/*
223%{_appdir}/app/Mage.php
5c34000d 224%dir %{_appdir}/includes
be38579b 225%{_appdir}/includes/config.php
be38579b
ER
226#%dir %{_appdir}/report
227#%{_appdir}/report/*
5c34000d 228%dir %{_appdir}/shell
be38579b
ER
229%{_appdir}/shell/*.php
230%dir %{_appdir}/skin
231%{_appdir}/skin/*
232%dir %{_appdir}/js
233%{_appdir}/js/*
be38579b 234%dir %{_appdir}/lib
cb64d730
ER
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
65e6045a
ER
242%if %{without system_zf}
243%{_appdir}/lib/Zend
244%endif
be38579b
ER
245%attr(775,root,http) %dir %{_appdir}/media
246%attr(775,root,http) %dir %{_appdir}/var
be38579b
ER
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
be38579b 255#%{_appdir}/STATUS.txt
cb64d730 256
b2103559
ER
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
cb64d730
ER
262%files setup
263%defattr(644,root,root,755)
264%{_appdir}/LICENSE.html
0827f4e2
ER
265%attr(755,root,root) %{_appdir}/pear
266%dir %{_appdir}/install.php
0827f4e2
ER
267%dir %{_appdir}/pkginfo
268%{_appdir}/pkginfo/*
b2103559
ER
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
65e6045a 277%defattr(644,root,root,755)
b2103559
ER
278%dir %{_appdir}/downloader
279%{_appdir}/downloader/*
This page took 0.094487 seconds and 4 git commands to generate.