X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.macros;h=9001452303fd5e3d3b43c7a2fe8c7b209cd8d02b;hb=231830119f0fb98a7ef4ef51d79b36a6f1c105d1;hp=51c5a84a9d6f02a4012fd5791777cd63295640f5;hpb=495892af25eed5a44a6a31748120ad04d8e2482c;p=packages%2Frpm.git diff --git a/rpm.macros b/rpm.macros index 51c5a84..9001452 100644 --- a/rpm.macros +++ b/rpm.macros @@ -5,7 +5,7 @@ %__chown_Rhf @__CHOWN_RHF@ %__chgrp_Rhf @__CHGRP_RHF@ -%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root.@ROOT_GROUP@ +%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:@ROOT_GROUP@ %_fixgroup true %_fixperms %{__chmod} -Rf @FIXPERMS@ %_topdir %(echo $HOME)/rpm @@ -66,6 +66,7 @@ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --x-libraries=/usr/X11R6/%{_lib} \ } #---------------------------------------------------------------- @@ -91,6 +92,7 @@ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --x-libraries=/usr/X11R6/%{_lib} \ } # ------------------------------------------------------------------------ @@ -143,7 +145,7 @@ %_omf_dest_dir %(scrollkeeper-config --omfdir) # Location of pkgconfig files -%_pkgconfigdir /usr/lib/pkgconfig +%_pkgconfigdir /usr/%{_lib}/pkgconfig # Location of top applink dir %_applnkdir /usr/X11R6/share/applnk @@ -163,6 +165,9 @@ # Location of Gtk and associated libraries documentation %_gtkdocdir %{_defaultdocdir}/gtk-doc/html +# Location of KDE documentation +%_kdedocdir %{_defaultdocdir}/kde/HTML + # Current date %date %(LC_ALL="C" date +"%a %b %d %Y") @@ -184,7 +189,7 @@ %requires_releq_kernel_smp() %(LC_ALL="C" rpm -qf --qf 'Prereq: kernel-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -vE "(is not|no such)") %requires_eq_to %(LC_ALL="C" rpm -q --qf 'Requires: %1 = %%{epoch}:%%{version}\\n' %2 | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") -%apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' `apr-config --includedir`/ap_mmn.h) +%apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR) # kernel version-release handling %__kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2) @@ -275,7 +280,7 @@ while read file ; do \ for dir in `chrpath -l "$file" | \ awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'` ; do \ case $dir in \ - /home/* | /tmp/* | /usr/lib | /lib | /usr/local/lib | /usr/X11R6/lib ) \ + /home/* | /tmp/* | /usr/lib | /usr/lib64 | /lib | /lib64 | /usr/local/lib | /usr/local/lib64 | /usr/X11R6/lib | /usr/X11R6/lib64 ) \ echo "remove-rpath: $dir in $file"; \ ;; \ * ) \ @@ -299,9 +304,9 @@ done; fi; } \ echo "Compress kernel modules if any."; \ %{?verbose:set -x;} \ if test -d $RPM_BUILD_ROOT/lib/modules ; then \ - find $RPM_BUILD_ROOT/lib/modules -name \*.o -type f -print | \ + find $RPM_BUILD_ROOT/lib/modules -name \*o -type f -print | \ xargs -r %{__gzip} -9nf; \ - find $RPM_BUILD_ROOT/lib/modules -name \*.o -type l -printf "%p %l\n" | \ + find $RPM_BUILD_ROOT/lib/modules -name \*o -type l -printf "%p %l\n" | \ while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \ fi; \ } } @@ -330,38 +335,14 @@ echo "Compress kernel modules if any."; \ ################################################################### # Requires/Provides automation # exceptions system by Jacek Konieczny -%__spec_prep_pre \ -_autoreqprov=n \ -%{?_noautocompressdoc:_autoreqprov=y}\ -if [ "$_autoreqprov" = "y" ] ; then \ - if [ -f %{_builddir}/__rpm_lock ] ; then \ - echo "Some package using \%_noauto* macros is already being built" >&2 \ - echo "If it is not true delete %{_builddir}/__rpm_lock" >&2 \ - exit 1 \ - else \ - rm -f %{_builddir}/__rpm_*\ - touch %{_builddir}/__rpm_lock \ - fi \ -fi \ -%{?_noautocompressdoc:echo '%{_noautocompressdoc}' > %{_builddir}/__rpm_noautocompressdoc}\ -%{___build_pre}\ -%{nil} - - -%__spec_clean_pre %{___build_pre}\ -_autoreqprov=n \ -%{?_noautocompressdoc:_autoreqprov=y}\ -if [ "$_autoreqprov" = "y" ] ; then \ - rm -f %{_builddir}/__rpm_* \ -fi \ -%{nil} - - -#%_noautoreqfiles "%{_defaultdocdir}.*" "%{_examplesdir}.*" +# +#%_noautoreqfiles '%{_defaultdocdir}.*' '%{_examplesdir}.*' #%_noautoreq %{nil} -#%_noautoreqdep %{nil} +%_noautoreqdep %(sed -e s'/#.*//' /etc/rpm/noautoreqdep) #%_noautoprovfiles %{nil} #%_noautoprov %{nil} +#%_noautocompressdoc %{nil} +# %_missing_doc_files_terminate_build 1%{nil} %_unpackaged_files_terminate_build %{nil} # (X)emacs support @@ -388,7 +369,7 @@ fi \ # directories %py_prefix %(echo `python -c "import sys; print sys.prefix"`) -%py_libdir %{py_prefix}/lib/python%{py_ver} +%py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %py_incdir /usr/include/python%{py_ver} %py_sitedir %{py_libdir}/site-packages %py_dyndir %{py_libdir}/lib-dynload @@ -400,7 +381,7 @@ fi \ # Software written in Python language require Python with main version # unchanged -%pyrequires_eq() Requires: %1 >= %py_ver %1 < %(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`) +%pyrequires_eq() Requires: %1 >= 1:%py_ver %1 < 1:%(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`) # depmod macro %depmod() { \ @@ -416,11 +397,14 @@ fi; \ } # XMMS specific macros -%xmms_data_dir %(echo `xmms-config --data-dir`) -%xmms_plugin_dir %(echo `xmms-config --plugin-dir`) -%xmms_visualization_plugin_dir %(echo `xmms-config --visualization-plugin-dir`) -%xmms_input_plugin_dir %(echo `xmms-config --input-plugin-dir`) -%xmms_output_plugin_dir %(echo `xmms-config --output-plugin-dir`) -%xmms_effect_plugin_dir %(echo `xmms-config --effect-plugin-dir`) -%xmms_general_plugin_dir %(echo `xmms-config --general-plugin-dir`) +%xmms_prefix %(xmms-config --prefix) +%xmms_exec_prefix %(xmms-config --exec-prefix) +%xmms_version %(xmms-config --version) +%xmms_datadir %(xmms-config --data-dir) +%xmms_plugindir %(xmms-config --plugin-dir) +%xmms_visualization_plugindir %(xmms-config --visualization-plugin-dir) +%xmms_input_plugindir %(xmms-config --input-plugin-dir) +%xmms_output_plugindir %(xmms-config --output-plugin-dir) +%xmms_effect_plugindir %(xmms-config --effect-plugin-dir) +%xmms_general_plugindir %(xmms-config --general-plugin-dir)