]> git.pld-linux.org Git - SPECS.git/blob - magento.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.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 %define         php_min_version 5.2.0
8 Summary:        An open-source eCommerce platform focused on flexibility and control
9 Name:           magento
10 Version:        1.4.1.1
11 Release:        0.15
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
16 Source1:        apache.conf
17 Source2:        crontab
18 Source3:        cron_disabled.php
19 Source4:        cron_import.php
20 Source5:        cron_export.php
21 Patch0:         php43.patch
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}
33 Requires:       php(ctype)
34 Requires:       php(curl)
35 Requires:       php(dom)
36 Requires:       php(gd)
37 Requires:       php(hash)
38 Requires:       php(iconv)
39 Requires:       php(mcrypt)
40 Requires:       php(pdo-mysql)
41 Requires:       php(simplexml)
42 Requires:       php-mhash
43 Requires:       webapps
44 Requires:       webserver(access)
45 Requires:       webserver(alias)
46 Requires:       webserver(indexfile)
47 Requires:       webserver(php)
48 Requires:       webserver(rewrite)
49 Suggests:       php(apc)
50 BuildArch:      noarch
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %define         _webapps        /etc/webapps
54 %define         _webapp         %{name}
55 %define         _sysconfdir     %{_webapps}/%{_webapp}
56 %define         _appdir         %{_datadir}/%{_webapp}
57
58 # lib/3Dsecure
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
62
63 %if %{without system_zf}
64 %define         libs_zf                 Zend/.*
65 %endif
66 %define         _noautoreq_pear %{libs_mage} %{libs_pear} %{libs_3dsecure} %{?libs_zf}
67
68 # exclude optional php dependencies
69 %define         _noautophp      php-sqlite
70
71 # put it together for rpmbuild
72 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
73
74 %description
75 An open-source eCommerce platform focused on flexibility and control.
76
77 %package setup
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}
82
83 %description setup
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.
87
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.
92
93 %package downloader
94 Summary:        Magento downloader
95 Group:          Applications/WWW
96 Requires:       %{name} = %{version}-%{release}
97
98 %description downloader
99 Downloader for Magento.
100
101 %prep
102 %setup -qc
103 mv %{name}/{.??*,*} . && rmdir %{name}
104
105 # use system Zend, magento has bundled ZF somewhere between versions 1.9.6 and 1.9.7
106 %if %{with system_zf}
107 rm -r lib/Zend
108 %endif
109
110 # php-pear-PEAR 1.7.2
111 rm lib/PEAR/PEAR.php
112 rm -r lib/PEAR/PEAR
113
114 # php-pear-HTTP 1.4.1
115 rm lib/PEAR/HTTP/HTTP.php
116
117 # php-pear-HTTP_Request 1.4.4
118 rm lib/PEAR/HTTP/Request.php
119 rm -r lib/PEAR/HTTP/Request
120
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}
125
126 # php-pear-Mail_mimeDecode 1.5.0
127 rm lib/PEAR/Mail/mimeDecode.php
128
129 # php-pear-Net_URL 1.0.15
130 rm lib/PEAR/Net/URL.php
131
132 # php-pear-Net_Socket 1.0.9
133 rm lib/PEAR/Net/Socket.php
134
135 # php-pear-SOAP-0.12.0-1.noarch
136 rm -r lib/PEAR/SOAP
137
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
142
143 # php-pear-XML_Serializer 0.19.2
144 rm lib/PEAR/XML/Serializer.php
145 rm lib/PEAR/XML/Unserializer.php
146
147 rmdir lib/PEAR/{HTTP,Mail,Net}
148
149 %undos -f php,phtml
150 #%patch0 -p1
151 %patch1 -p1
152 %patch2 -p1
153 %patch3 -p1
154 %patch4 -p1
155 %patch5 -p1
156 %patch6 -p1
157
158 # cleanup backups after patching
159 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
160
161 # include default config in package files (empty so it can be treated as missing)
162 > app/etc/local.xml
163
164 # make docs to pack
165 install -d doc
166 mv RELEASE_NOTES.txt doc
167 mv LICENSE*.txt doc
168 mv *sample doc
169 mv .htaccess.sample doc/htaccess.sample
170
171 # contents included in apache.conf
172 find -name .htaccess | xargs rm
173
174 %install
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
180
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
184
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
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %triggerin -- apache1 < 1.3.37-3, apache1-base
194 %webapp_register apache %{_webapp}
195
196 %triggerun -- apache1 < 1.3.37-3, apache1-base
197 %webapp_unregister apache %{_webapp}
198
199 %triggerin -- apache < 2.2.0, apache-base
200 %webapp_register httpd %{_webapp}
201
202 %triggerun -- apache < 2.2.0, apache-base
203 %webapp_unregister httpd %{_webapp}
204
205 %files
206 %defattr(644,root,root,755)
207 %doc doc/*
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
211 %dir %{_appdir}
212 %{_appdir}/errors
213 %dir %{_appdir}/app
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
229 #%{_appdir}/report/*
230 %dir %{_appdir}/shell
231 %{_appdir}/shell/*.php
232 %dir %{_appdir}/skin
233 %{_appdir}/skin/*
234 %dir %{_appdir}/js
235 %{_appdir}/js/*
236 %dir %{_appdir}/lib
237 %{_appdir}/lib/3Dsecure
238 %{_appdir}/lib/flex
239 %{_appdir}/lib/googlecheckout
240 %{_appdir}/lib/LinLibertineFont
241 %{_appdir}/lib/PEAR
242 %{_appdir}/lib/phpseclib
243 %{_appdir}/lib/Varien
244 %if %{without system_zf}
245 %{_appdir}/lib/Zend
246 %endif
247 %attr(775,root,http) %dir %{_appdir}/media
248 %attr(775,root,http) %dir %{_appdir}/var
249 %{_appdir}/favicon.ico
250 %{_appdir}/cron.php
251 %{_appdir}/cron.sh
252 %{_appdir}/crontab
253 %{_appdir}/cron_disabled.php
254 %{_appdir}/cron_import.php
255 %{_appdir}/cron_export.php
256 %{_appdir}/index.php
257 #%{_appdir}/STATUS.txt
258
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
263
264 %files setup
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
270 %{_appdir}/pkginfo/*
271
272 %{_appdir}/lib/Varien/Pear
273 %{_appdir}/lib/Varien/Pear.php
274
275 %{_appdir}/app/code/core/Mage/Install
276 %{_appdir}/app/design/install/default/default/template/install
277
278 %files downloader
279 %defattr(644,root,root,755)
280 %dir %{_appdir}/downloader
281 %{_appdir}/downloader/*
This page took 0.086547 seconds and 3 git commands to generate.