SUSE specific macro changes. Index: macros.in =================================================================== --- macros.in.orig +++ macros.in @@ -166,22 +166,22 @@ # Template for debug information sub-package. %debug_package \ -%ifnarch noarch\ %global __debug_package 1\ -%package debug\ +%package debuginfo\ Summary: Debug information for package %{name}\ Group: Development/Debug\ AutoReqProv: 0\ -%description debug\ +Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\ +%description debuginfo\ This package provides debug information for package %{name}.\ Debug information is useful when developing applications that use this\ package or when debugging this package.\ -%files debug -f debugfiles.list\ +%files debuginfo -f debugfiles.list\ %defattr(-,root,root)\ -%endif\ %{nil} -%_defaultdocdir %{_usr}/doc +%_defaultdocdir %{_usr}/doc/packages +%_docdir_fmt %%{NAME} # The path to the gzip executable (legacy, use %{__gzip} instead). %_gzipbin %{__gzip} @@ -218,7 +218,7 @@ package or when debugging this package.\ %_tmppath %{_var}/tmp # Path to top of build area. -%_topdir %{_usrsrc}/redhat +%_topdir %{_usrsrc}/packages # The path to the unzip executable (legacy, use %{__unzip} instead). %_unzipbin %{__unzip} @@ -323,7 +323,7 @@ package or when debugging this package.\ # "w9.bzdio" bzip2 level 9. # #%_source_payload w9.gzdio -#%_binary_payload w9.gzdio +%_binary_payload w2.lzdio # The signature to use and the location of configuration files for # signing packages with PGP. @@ -371,7 +371,7 @@ package or when debugging this package.\ # # Use internal dependency generator rather than external helpers? -%_use_internal_dependency_generator 1 +%_use_internal_dependency_generator 0 # # Filter GLIBC_PRIVATE Provides: and Requires: @@ -420,20 +420,22 @@ print (t)\ # Note: Used iff _use_internal_dependency_generator is zero. #%__find_provides @RPMCONFIGDIR@/rpmdeps --provides #%__find_requires @RPMCONFIGDIR@/rpmdeps --requires -%__find_provides @RPMCONFIGDIR@/find-provides -%__find_requires @RPMCONFIGDIR@/find-requires +%__find_provides @RPMCONFIGDIR@/find-provides %name +%__find_requires @RPMCONFIGDIR@/find-requires %name #%__find_conflicts ??? #%__find_obsoletes ??? +#%__find_supplements ??? +#%__find_enhances ??? # # Path to scripts to autogenerate per-interpreter package dependencies, # # Note: Used iff _use_internal_dependency_generator is non-zero. The # helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires}. -%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides -%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires -#%__perl_provides @RPMCONFIGDIR@/perl.prov -#%__perl_requires @RPMCONFIGDIR@/perl.req +#%__perl_provides @RPMCONFIGDIR@/perldeps.pl --provides +#%__perl_requires @RPMCONFIGDIR@/perldeps.pl --requires +%__perl_provides @RPMCONFIGDIR@/perl.prov +%__perl_requires @RPMCONFIGDIR@/perl.req %__python_provides @RPMCONFIGDIR@/pythondeps.sh --provides %__python_requires @RPMCONFIGDIR@/pythondeps.sh --requires @@ -591,15 +593,15 @@ print (t)\ %_dbi_config_Packages %{_dbi_htconfig} lockdbfd # "Depends" is a per-transaction cache of known dependency resolutions. -%_dbi_config_Depends %{_dbi_htconfig} temporary private +%_dbi_config_Depends %{_dbi_htconfig} temporary private nofsync -%_dbi_config_Dirnames %{_dbi_btconfig} -%_dbi_config_Requireversion %{_dbi_btconfig} -%_dbi_config_Provideversion %{_dbi_btconfig} -%_dbi_config_Installtid %{_dbi_btconfig} -%_dbi_config_Removetid %{_dbi_btconfig} +%_dbi_config_Dirnames %{_dbi_btconfig} nofsync +%_dbi_config_Requireversion %{_dbi_btconfig} nofsync +%_dbi_config_Provideversion %{_dbi_btconfig} nofsync +%_dbi_config_Installtid %{_dbi_btconfig} nofsync +%_dbi_config_Removetid %{_dbi_btconfig} nofsync -%_dbi_config %{_dbi_htconfig} +%_dbi_config %{_dbi_htconfig} nofsync # XXX legacy configuration. # Choose db interface: @@ -658,8 +660,8 @@ print (t)\ # Horowitz Key Protocol server configuration # -%_hkp_keyserver hkp://pgp.mit.edu -%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x +#%_hkp_keyserver hkp://pgp.mit.edu +#%_hkp_keyserver_query %{_hkp_keyserver}/pks/lookup?op=get&search=0x #============================================================================== # ---- Transaction macros. @@ -767,80 +769,6 @@ print (t)\ # # XXX Note: that there cannot be any whitespace within the string "p>q", # and that both p and q are package names (i.e. no version/release). -# -#%_dependency_whiteout_5_2 \ -# pam>pamconfig -#%_dependency_whiteout_6_1 \ -# pilot-link-devel>pilot-link -#%_dependency_whiteout_6_2 \ -# egcs-c++>libstdc++ -%_dependency_whiteout_7_0 \ - pango-gtkbeta-devel>pango-gtkbeta\ - XFree86>Mesa \ - compat-glibc>db2 \ - compat-glibc>db1 \ - pam>initscripts \ - initscripts>sysklogd -%_dependency_whiteout_7_1 \ - arts>kdelibs-sound -%_dependency_whiteout_7_2 \ - libgnomeprint15>gnome-print \ - nautilus>nautilus-mozilla \ - tcl>postgresql-tcl -#%_dependency_whiteout_8_0 \ -# perl>perl-Parse-RecDescent \ -# XFree86-libs>XFree86-Mesa-libGL \ -# perl>perl-Filter \ -# perl>mrtg \ -# perl>mod_perl \ -# mysql>perl-DBD-MySQL \ -# ghostscript>gimp-print \ -# arts>kde2-compat \ -# perl-Date-Calc>perl-Bit-Vector \ -# glibc-debug>glibc-devel - -%_dependency_whiteout_8_0 \ - mysql>perl-DBD-MySQL \ - perl>perl-Filter \ - perl>mrtg \ - perl>mod_perl \ - perl-Date-Calc>perl-Bit-Vector \ - -%_dependency_whiteout_fc3 \ - coreutils>pam \ - nautilus>nautilus-cd-burner \ - aspell>aspell-en \ - kernel>initscripts \ - kernel-smp>initscripts \ - xorg-x11-libs>xorg-x11-Mesa-libGL \ - openldap>cyrus-sasl-md5 \ - openldap>cyrus-sasl \ - openjade>docbook-dtds \ - gtk+>gdk-pixbuf \ - xorg-x11>xinitrc \ - gnome-python2>gnome-python2-bonobo \ - httpd-suexec>httpd \ - xemacs-sumo>apel-xemacs \ - php>php-pear \ - openoffice.org-libs>openoffice.org - -%_dependency_whiteout \ - libtermcap>bash \ - modutils>vixie-cron \ - ypbind>yp-tools \ - ghostscript-fonts>ghostscript \ - %{?_dependency_whiteout_fc3} \ - %{?_dependency_whiteout_fc2} \ - %{?_dependency_whiteout_fc1} \ - %{?_dependency_whiteout_9} \ - %{?_dependency_whiteout_8_0} \ - %{?_dependency_whiteout_7_2} \ - %{?_dependency_whiteout_7_1} \ - %{?_dependency_whiteout_7_0} \ - %{?_dependency_whiteout_6_2} \ - %{?_dependency_whiteout_6_1} \ - %{?_dependency_whiteout_5_2} \ - %{nil} # # Default headerSprintf() output format string for rpm -qa @@ -1093,7 +1021,7 @@ print (t)\ %_build_vendor %{_host_vendor} %_build_os %{_host_os} %_host @host@ -%_host_alias @host_alias@%{nil} +%_host_alias @host@%{nil} %_host_cpu @host_cpu@ %_host_vendor @host_vendor@ %_host_os @host_os@ @@ -1250,12 +1178,191 @@ done \ %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) #------------------------------------------------------------------------------ +# More useful perl macros (from Raul Dias ) +# +%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") +%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!") +%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!") +%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!") +%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!") +%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!") +%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!") +%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!") +%perl_prefix %{buildroot} + +#------------------------------------------------------------------------------ +# Python specific macro definitions (originally from PLD). +# +%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) +%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) +%py_libdir %{py_prefix}/%{_lib}/python%{py_ver} +%py_incdir %{py_prefix}/include/python%{py_ver} +%py_sitedir %{py_libdir}/site-packages +%py_compile(O) \ +find %1 -name '*.pyc' -exec rm -f {} \\; \ +python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ +%{-O: \ +find %1 -name '*.pyo' -exec rm -f {} \\; \ +python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ +} +%py_requires(d) \ +%define minver %py_ver \ +%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \ +BuildRequires: python %{-d:python-devel} \ +PreReq: python >= %minver, python < %maxver + +#------------------------------------------------------------------------------ +# +# RPM macros for Java applications. +# +# JPackage Project +# David Walluck +# Ville Skyttä +# Nicolas Mailhot +# +# $Id: macros.jpackage,v 1.1.2.5 2003/08/30 13:24:58 scop Exp $ +# + +# ---- default Java directories + +# +# Root directory where all Java VMs/SDK/JREs are installed. +# +%_jvmdir %{_libdir}/jvm + +# +# Root directory where all Java VMs/SDK/JREs expose their jars +# +%_jvmjardir %{_libdir}/jvm-exports + +# +# Root directory for all Java VM/SDK/JRE's private things. +# +%_jvmprivdir %{_libdir}/jvm-private + +# +# Directory where arch and version independent jars are installed. +# This has already been integrated in RH macros following our request. +# +# By extension: +# %{_javadir}-ext: +# - version dependent jars +# %{_javadir}-x.y.z: +# - jars for Java standard x.y.z (usually symlinks to %{_javadir}-ext) +# %{_javadir}-utils: +# - Java-related scripts +# +# To simplify things only %{_javadir} is defined. +# +%_javadir %{_datadir}/java + +# +# Directory where arch-specific (JNI) version-independent jars are installed. +# +# By extension: +# %{_jnidir}-ext: +# - version dependent jars +# %{_jnidir}-x.y.z: +# - jars for Java standard x.y.z (usually symlinks to %{_jnidir}-ext) +# To simplify things only %{_jnidir} is defined. +# +%_jnidir %{_libdir}/java + +# +# Root directory where all javadoc is installed. Also already in RH macros. +# +%_javadocdir %{_datadir}/javadoc + +# +# Current default JVM home. +# +%java_home %(. %{_javadir}-utils/java-functions; set_jvm; echo $JAVA_HOME) + +# ---- default Java commands + +%ant JAVA_HOME=%{java_home} ant +%jar %{java_home}/bin/jar +%java %(. %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD) +%javac %{java_home}/bin/javac +%javadoc %{java_home}/bin/javadoc + +# ---- Java extension handling macros + +# +# add_jvm_extension should be used in %install by extension packages to declare +# what extension jars they provide. +# +# For example a package that provides foo.jar which is the bar extension +# under java 1.2 and 1.3 should do a: +# +# %install +# ... # create foo.jar in %{javadir}-ext +# %add_jvm_extension foo bar 1.2 1.3 +# +# %files +# %{javadir}-ext/foo.jar +# %{javadir}-*/bar.jar +# +%add_jvm_extension JAVA_LIBDIR=%{buildroot}/%{_javadir} %{_bindir}/jvmjar -l + +# +# Standard JPackage script +# +# This is kind of tasteless and should be moved to an external template +# +# %1 main class +# %2 flags +# %3 options +# %4 jars (separated by ':') +# %5 the name of script you wish to create +# +%jpackage_script() \ +install -d -m 755 $RPM_BUILD_ROOT%{_bindir}\ +cat > $RPM_BUILD_ROOT%{_bindir}/%5 << EOF \ +#!/bin/sh\ +#\ +# %{name} script\ +# JPackage Project \ +\ +# Source functions library\ +. %{_javadir}-utils/java-functions\ +\ +# Source system prefs\ +if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then\ + . %{_sysconfdir}/java/%{name}.conf\ +fi\ +\ +# Source user prefs\ +if [ -f \\$HOME/.%{name}rc ] ; then\ + . \\$HOME/.%{name}rc\ +fi\ +\ +# Configuration\ +MAIN_CLASS=%1\ +BASE_FLAGS=%2\ +BASE_OPTIONS=%3\ +BASE_JARS="%(echo %4 | sed -e 's,:, ,g')"\ +\ +# Set parameters\ +set_jvm\ +set_classpath \\$BASE_JARS\ +set_flags \\$BASE_FLAGS\ +set_options \\$BASE_OPTIONS\ +\ +# Let's start\ +run "\\$@"\ +EOF + +#------------------------------------------------------------------------------ # arch macro for all Intel i?86 compatibile processors # (Note: This macro (and it's analogues) will probably be obsoleted when # rpm can use regular expressions against target platforms in macro # conditionals. # %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon +%arm armv4l armv4b armv5l armv5b armv5tel armv5teb +%arml armv4l armv5l armv5tel +%armb armv4b armv5b armv5teb #------------------------------------------------------------------------ # Use in %install to generate locale specific file lists. For example, @@ -1270,3 +1377,17 @@ done \ # \endverbatim #*/ + + +#------------------------------------------------------------------------ +# standard build service macros +# +%ext_info .gz +%ext_man .gz + +%info_add() test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \ +%{nil} + +%info_del() test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \ +%{nil} +