%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 \\\
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>
# Undos files
#
# Author: Paweł Zuzelski <pawelz@pld-linux.org>
+# Author: Elan Ruusamäe <glen@pld-linux.org>
#
# Usage:
# %undos list_of_files
+# %undos -f EXT[,EXT]
+# %undos -i -f EXT[,EXT]
+#
+# -f EXT[,EXT] - find(1) files by extensions
+# -i - case insensitive file search
+#
+# Example:
+# Un-DOS all *.js, *.css files
+# %undos -f js,css
+# Un-DOS all *.js, *.JS files
+# %undos -f js -i
+# undos all Makefiles
+# %{__find} -name Makefile | xargs %undos
#
# Requirements:
# BuildRequires: sed >= 4.0
-# BuildRequires: rpmbuild(macros) >= 1.553
+# BuildRequires: rpmbuild(macros) >= 1.565
-# NB: make sure this command stays on one line
-%undos %{__sed} -i -e 's,\\r$,,'
+# NB: make sure this macro stays on one line
+# NB: make sure it includes newline escape
+%undos(f:i) %{-f:%{__find} -regextype posix-extended -%{-i:i}regex '^.+\\.(%(echo %{-f*} | tr ',' '|'))$' -print0 | xargs -0} %{__sed} -i -e 's,\\r$,,' %* \
+%{nil}
# Hook to register nagios object based plugins in Nagios NRPE daemon config.
#