%epoch 0
%x8664 x86_64 amd64 ia32e
+%arm armv3l armv4b armv4l armv5teb armv5tel
# kernel compiler
%kgcc %{__cc}
CXXFLAGS="%{rpmcxxflags}" \
LDFLAGS="%{rpmldflags}" \
%{__cmake} \
+-DCMAKE_INSTALL_PREFIX=%{_prefix} \
+-DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
}
%scons { \
%xmms_effect_plugindir %{expand:%%global xmms_effect_plugindir %(xmms-config --effect-plugin-dir 2>/dev/null || echo ERROR)}%xmms_effect_plugindir
%xmms_general_plugindir %{expand:%%global xmms_general_plugindir %(xmms-config --general-plugin-dir 2>/dev/null || echo ERROR)}%xmms_general_plugindir
-%_target_base_arch %{expand:%%global _target_base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/;s/ia32e/x86_64/;s/sparcv./sparc/')}%_target_base_arch
+%_target_base_arch %{expand:%%global _target_base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/;s/ia32e/x86_64/;s/sparcv./sparc/;s/arm.*/arm/')}%_target_base_arch
# user/group checking macros
#
fi \
%{nil}
-# command invoking pear cli
-%__pear /usr/bin/pear
+# Command invoking PEAR CLI
+# Same as /usr/bin/pear, except we force GMT timezone
+%__pear %__php -doutput_buffering=1 -dopen_basedir="" -dmemory_limit=-1 -ddate.timezone=GMT %{php_pear_dir}/pearcmd.php
%pear_install(a:d:n:zD) \
%__pear \\\
%define srcdir %{-n*}%{!-n:%{_pearname}-%{version}} \
%define builddir %{_builddir}/%{srcdir} \
%setup -q -c -T %{-D:-D} -n %{srcdir} \
-%{-z:tar zxf %{S:0}; %{-a:tar zxf %{S:%{-a*}}}} \
+%{-z:%{__tar} zxf %{S:0}; %{-a:%{__tar} zxf %{S:%{-a*}}}} \
%{-z:_P=package2.xml; [ -f $_P ] || _P=package.xml; _N=%{srcdir}; mv $_P $_N; cd $_N} \
%{-c:%{__pear} -c pearrc config-set php_dir %{builddir}/%{php_pear_dir}; %__pear -c %{builddir}/pearrc channel-add %{-c*}} \
%pear_install \
%{-z:cd ..} \
+%{__tar} --wildcards -zvxf %{S:0} package*.xml \
cat %{-z:$_N/}.install.log | %__pear_install_log \
\
# undos sources \
fi \
%{nil}
+# Print optional package info for pear packages
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+# Usage:
+# %post -p <lua>
+# %%pear_package_print_optionalpackages
+#
+# Requirements:
+# BuildRequires: rpmbuild(macros) >= 1.571
+%pear_package_print_optionalpackages \
+f = io.open("%{_docdir}/%{name}-%{version}/optional-packages.txt", "r") \
+if f then \
+ for l in f:lines() do print(l); end \
+end \
+%{nil}
+
# Register OpenLDAP schema.
# Author: Elan Ruusamäe <glen@pld-linux.org>