%__ninja_common_opts -v %{?_smp_mflags}
%__gettextize { \
- if grep -qs 'AM_GNU_GETTEXT.*external' configure.{ac,in} ; then \
- gettextize --copy --force --no-changelog; \
- else \
- gettextize --copy --force --no-changelog --intl; \
- fi; \
+ gettextize --copy --force --no-changelog; \
if [ ! -f po/Makevars ]; then \
cp -f po/Makevars{.template,}; \
fi; \
%__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
%__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
+# for use with cmake:
+# Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
+# BuildRequires: rpmbuild(macros) >= 1.742
+%cmake_on_off() -D%{?2}%{!?2:%{1}}:BOOL=%{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
+
#-----------------------------------------------------------------
# overload to insert debuginfo package
%{!?debug:set +x;} \
if [ -d "$RPM_BUILD_ROOT" ]; then \
if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \
- modulelist=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type f -print); \
+ modulelist=$(find $RPM_BUILD_ROOT/lib/modules \( -name '*.o' -o -name '*.ko' \) -type f -print); \
if [ "$modulelist" ]; then \
modulecount=$(echo "$modulelist" | wc -l); \
printf "Stripping %d kernel modules..." $modulecount; \
echo "DONE"; \
fi; \
fi; \
- filelist=$(find $RPM_BUILD_ROOT -type f ! -regex ".*/usr/lib[x0-9]*/debug/.*\.debug" ! -regex ".*/usr/lib[x0-9]*/guile/.*\.go" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}); \
+ filelist=$(find $RPM_BUILD_ROOT -type f ! -regex ".*/usr/lib[x0-9]*/debug/.*\.debug" ! -regex ".*/usr/lib[x0-9]*.*/guile/.*\.go" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}); \
if [ -n "$filelist" ]; then \
filetypes=`echo "$filelist" | xargs -r -d'\\n' file`; \
elfexelist=`echo "$filetypes" | awk -F: '/ELF.*executable/ {print $1}'`; \