aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bind
Commit message (Expand)AuthorAgeFilesLines
* make sure /var/lib/named/var/named/reverse existNicolas Lécureuil2017-04-111-0/+4
* Fix typo in file nameNicolas Lécureuil2017-04-111-1/+1
* make sure /var/lib/named/var/named/master existNicolas Lécureuil2017-04-112-4/+5
* make sure /var/lib/named/var/named/master existNicolas Lécureuil2017-04-111-0/+5
* bind: update named_base to work with Mga >= 3Olivier Blin2017-04-101-0/+32
* lint fixes for bindThomas Backlund2015-10-191-2/+2
* rework the layout of the bind moduleMichael Scherer2012-03-206-60/+53
* clean style of the fileMichael Scherer2012-03-201-23/+23
* fix bind moduleMichael Scherer2012-01-161-2/+2
* fix the way we overload bind configuration, since previous way wasMichael Scherer2012-01-161-8/+8
* clean bind serviceMichael Scherer2012-01-161-3/+2
* cleaning of bind moduleMichael Scherer2012-01-081-15/+1
* Add the new reverse zone to the two other places it needs to be added toPascal Terjan2011-10-162-1/+10
* fix syntaxMichael Scherer2011-07-081-1/+1
* force usage of restart for bind ( as stop / start break everything ), Michael Scherer2011-07-071-2/+7
* add proper hook for declaring tld zonesMichael Scherer2011-07-043-5/+22
* fix puppetmaster warning about missing $ in prototypeMichael Scherer2011-06-171-2/+2
* - fix dns problem on friteuse ( as bind compete with dnsmasq for port 53 )Michael Scherer2011-02-131-0/+4
* move dns zone to a module in deploymentMichael Scherer2011-01-133-139/+0
* - allow to override the templates used for zoneMichael Scherer2011-01-131-12/+19
* - reduce TTL from 3 to 1 days, widelly enoughOlivier Thauvin2011-01-101-2/+2
* - add rabbit to dnsMichael Scherer2011-01-091-1/+4
* - switch rsync from zarb to valstarOlivier Thauvin2011-01-091-2/+2
* - also add identity trunk, while I am on itMichael Scherer2011-01-051-0/+1
* - update dns to give the new address for donationMichael Scherer2011-01-051-3/+3
* - add transifex to dnsMichael Scherer2010-12-151-1/+2
* - fix the zone ( too much 0 )Michael Scherer2010-12-021-8/+7
* - fix the previous fix ( last time I do sysadmin work during a meeting withou...Michael Scherer2010-12-011-1/+1
* fix the type of the zone tooMichael Scherer2010-12-011-2/+2
* fix syntaxMichael Scherer2010-12-012-2/+2
* add the reverse ipv6 zone Michael Scherer2010-12-011-0/+13
* - add the zone for reverse dns on our ipv6 rangeMichael Scherer2010-12-013-1/+31
* add a Requires to fix bootstraping ( ie, puppet try to do the linkMichael Scherer2010-11-241-1/+2
* add a repository cname for valstarOlivier Blin2010-11-211-1/+2
* add www-test and blog-testNicolas Vigier2010-11-191-1/+3
* - renable ml domain after fixing the CNAME issueMichael Scherer2010-11-171-4/+7
* Increase serialDexter Morgan2010-11-171-1/+1
* Comment MX entries this breaks alamutDexter Morgan2010-11-171-2/+2
* add MX records for ml.mageia.orgNicolas Vigier2010-11-161-1/+4
* add ml and lists subdomainsNicolas Vigier2010-11-101-1/+3
* add bugs.mageia.orgNicolas Vigier2010-11-081-1/+2
* change dns for svnDexter Morgan2010-11-051-2/+2
* - add epoll configOlivier Thauvin2010-11-051-0/+1
* - fix email in SOaMichael Scherer2010-11-041-3/+3
* - fix the dns to not include zarb.org referenceMichael Scherer2010-11-041-1/+1
* - add config for mga-mirrorsOlivier Thauvin2010-11-041-1/+2
* - add a cname for ldap ( for identity )Michael Scherer2010-11-041-1/+2
* - fix the header stolen from zarbMichael Scherer2010-11-041-2/+4
* add champagne in dnsNicolas Vigier2010-11-021-1/+2
* dns servers moved to ns0.mageia.org and ns1.mageia.orgNicolas Vigier2010-11-022-7/+7
>612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
# @RPMVENDORDIR@/macros:
# Main Mandrivalinux rpm configuration
# Only modified macros goes here
#
# $Id$
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
# should be added to /etc/rpm/macros, while per-user configuration should
# be added to ~/.rpmmacros.

%_host_vendor @RPMCANONVENDOR@
%_real_vendor @RPMCANONVENDOR@

%_vendor @RPMVENDOR@

%_target_platform	%{_target_cpu}-%{_real_vendor}-%{_target_os}%{?_gnu}

%_host %{_host_cpu}-%{_real_vendor}-%{_host_os}

#==============================================================================
# Macro naming conventions (preliminary):
#
#	Macros that begin with an underscore are "local" in the sense that
#	they (if used) will not be exported in rpm headers. Some macros
#	that don't start with an underscore (but look like they should)
#	are compatible with macros generated by rpm-2.5.x and will be made
#	more consistent in a future release.
#

%__gzip			/usr/bin/gzip

%_sys_macros_dir @RPMSYSCONFDIR@/macros.d
%build_sysmacrospath() %{_sys_macros_dir}/%{?1:%{1}}%{?!1:%{name}}.macros

#==============================================================================
# ---- Build system path macros.
#

%defaultbuildroot  %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%__cputoolize         cputoolize

#	Where install-info is located
%__install_info		/sbin/install-info

# Update Menu
%_update_menus_bin %{_bindir}/update-menus

# Various programs used in rpm scripts
%_update_desktop_database_bin %{_bindir}/update-desktop-database
%_update_mime_database_bin %{_bindir}/update-mime-database
%_update_icon_cache_bin %{_bindir}/gtk-update-icon-cache
%_gconftool_bin %{_bindir}/gconftool-2
%_scrollkeeper_bin %{_bindir}/scrollkeeper-update

%__service          /sbin/service
%__chkconfig        /sbin/chkconfig

#==============================================================================
# ---- Required rpmrc macros.
#	Macros that used to be initialized as a side effect of rpmrc parsing.
#	These are the default values that can be overridden by other
#	(e.g. per-platform, per-system, per-packager, per-package) macros.
#

%_enable_debug_packages 1

%debugcflags %{?_enable_debug_packages:-g}

%debug_package_and_restore %{debug_package} \
%package __restore__\
Summary: %{summary}\
Group: %{group}\
%description __restore__

%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package_and_restore}}}\
%%install\
%{nil}

%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon k6

%sunsparc sun4 sun4m sun4c sun4d sparc sparcv8 sparcv9 sparc64 scparcv9b sparcv9v

# common compilation flags
%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
%_serverbuild_flags %nil
%_ssp_cflags -fstack-protector --param=ssp-buffer-size=4 %{?_serverbuild_flags}
%__common_cflags -O2 %{debugcflags} -pipe %{?_fortify_cflags} %{?_ssp_cflags} -fexceptions

#==============================================================================
# ---- Optional rpmrc macros.
#	Macros that are initialized as a side effect of rpmrc and/or spec
#	file parsing.
#

%_changelog_truncate	3 years ago

#	Multilibs
%_multilibno		1
%_multilibpatt		(/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$

%_arch_tag_suffix (%_lib)
%arch_tagged() %{1}%{_arch_tag_suffix} %{?2:%{2} %{3}%{?!3:%{error:undefined 3rd argument in arch_tagged}}}

%_sysconfdir    /etc
%_localstatedir %{_var}/lib
%_logdir %{_var}/log

%_infodir		/usr/share/info
%_mandir		/usr/share/man
%_initrddir		%{_sysconfdir}/rc.d/init.d

%_defaultdocdir %{_usr}/share/doc

%_docdir_fmt %%{NAME}

%_libexecdir %_libdir

# Games macros
%_gamesdir	games
%_gamesbindir   %{_prefix}/%{_gamesdir}
%_gamesdatadir  %{_datadir}/%{_gamesdir}

#	Default extension to use.
%_extension		.lzma

# Menu directories
%_menudir %{_prefix}/lib/menu
%_iconsdir %{_datadir}/icons
%_miconsdir %{_datadir}/icons/mini
%_liconsdir %{_datadir}/icons/large

%_xfontdir %_datadir/fonts

%_mandir %_datadir/man

%_webconfdir %{_sysconfdir}/httpd/conf
%_webappconfdir %_webconfdir/webapps.d
# compatibility
%webappconfdir %_webappconfdir

#==============================================================================
# ---- Build configuration macros.
#
# Package version macro.
#	The type of package to produce, for compatibility with legacy
#	versions of rpm.
#
# Script gets packaged file list on input.
# Returns list of multiarch files that are not marked as such,
# i.e. files in $RPM_BUILD_ROOT that have arch-dependent values
#
# Note: Disable (by commenting out) for legacy compatibility.
#%__check_multiarch_files @RPMLIBDIR@/check-multiarch-files %{buildroot}

# Use internal dependency generator rather than external helpers?
%_use_internal_dependency_generator	0

%__find_provides	@RPMVENDORDIR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @RPMVENDORDIR@/find-provides
%__find_requires	@RPMVENDORDIR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @RPMVENDORDIR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}}

%find_lang  @RPMVENDORDIR@/find-lang.pl %{buildroot}

# Macro: %{mklibname <name> [<major> [<minor>]] [-s] [-d]}
# - %{mklibname test}               => lib64test, on a lib64 platform
# - %{mklibname test 1 -d}      => libtest1-devel
# - %{mklibname test 1 -d 0 -s} => libtest1_0-static-devel
%mklibname(ds)  %{_lib}%{1}%{?2:%{2}}%{?3:_%{3}}%{-s:-static}%{-d:-devel}

# Update Menu
%_update_menus_bin %{_bindir}/update-menus
%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi \
%{nil}

# Clean Menu
%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi \
%{nil}

# Update Window Managers session.
%_fndsession_bin %{_sbindir}/fndSession
%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi \
%{nil}

#	Macros to install info-files.
%_install_info()	if [[ -f %{_infodir}/%{1}%{_extension} ]];then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir;fi \
%{nil}

#	Macros to remove info-files. (keep the "alone on its line ';'")
%_remove_install_info() if [ "$1" = "0" ]; then if [[ -f %{_infodir}/%{1}%{_extension} ]];then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ;fi; fi \
%{nil}

# For rebuilding gcj-db
%_rebuildgcjdb_bin %{_bindir}/rebuild-gcj-db
%update_gcjdb if [ -x %{_rebuildgcjdb_bin} ]; then %{_rebuildgcjdb_bin} || true ; fi \
%{nil}

%clean_gcjdb if [ -x %{_rebuildgcjdb_bin} ]; then %{_rebuildgcjdb_bin} || true ; fi \
%{nil}

# Rebuild .desktop / MIME mapping database
%update_desktop_database if [ -x %{_update_desktop_database_bin} ]; then \
%{_update_desktop_database_bin} %{_datadir}/applications > /dev/null || \
true ; fi \
%{nil}

%clean_desktop_database if [ "$1" = "0" -a -x %{_update_desktop_database_bin} ]; then \
%{_update_desktop_database_bin} %{_datadir}/applications > /dev/null || true ; fi \
%{nil}

# Rebuild freedesktop.org MIME magic/extension database
%update_mime_database if [ -x %{_update_mime_database_bin} ]; then \
%{_update_mime_database_bin} %{_datadir}/mime > /dev/null || true ; fi \
%{nil}

%clean_mime_database if [ "$1" = "0" -a -x %{_update_mime_database_bin} ]; \
then %{_update_mime_database_bin} %{_datadir}/mime > /dev/null || true ; fi \
%{nil}

# Rebuild icon cache
%update_icon_cache() if [ -x %{_update_icon_cache_bin} ]; then \
%{_update_icon_cache_bin} --force --quiet %{_iconsdir}/%{1} || true; fi \
%{nil}

%clean_icon_cache() if [ -x %{_update_icon_cache_bin} -a -r %{_iconsdir}/%{1}/index.theme ]; then \
%{_update_icon_cache_bin} --force --quiet %{_iconsdir}/%{1} || true ; fi \
%{nil}

# Install GConf schemas
%post_install_gconf_schemas() if [ -x %{_gconftool_bin} ]; then \
SCHEMAS="" \
for SCHEMA in %{*} ; do \
  SCHEMAS="$SCHEMAS %{_sysconfdir}/gconf/schemas/$SCHEMA.schemas" \
done \
GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} --makefile-install-rule $SCHEMAS > /dev/null || true ; fi \
%{nil}

%preun_uninstall_gconf_schemas() if [ "$1" = "0" -a -x %{_gconftool_bin} ]; then \
SCHEMAS="" \
for SCHEMA in %{*} ; do \
  SCHEMAS="$SCHEMAS %{_sysconfdir}/gconf/schemas/$SCHEMA.schemas" \
done \
GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} --makefile-uninstall-rule  $SCHEMAS > /dev/null || true ; fi \
%{nil}

# Rebuild scrollkeeper database
%update_scrollkeeper if [ -x %{_scrollkeeper_bin} ]; then \
%{_scrollkeeper_bin} -q || true ; fi \
%{nil}

%clean_scrollkeeper if [ "$1" = "0" -a -x %{_scrollkeeper_bin} ]; \
then %{_scrollkeeper_bin} -q || true ; fi \
%{nil}

# Mandriva Linux version
# - "9.1"    =>  910
# - "10.2.2" => 1022
# (user may copy the following line in specfile)
%mdkversion		%(perl -pe '/(\\d+)\\.(\\d)\\.?(\\d)?/; $_="$1$2".($3||0)' /etc/mandriva-release)

%distsuffix mdv

%mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?distsuffix:%distsuffix}%{?!distsuffix:mdv}%{?mandriva_release:%mandriva_release}

%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
	[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")

# make
%_make_bin make
%make %{_make_bin} %_smp_mflags

#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
#   Expanded at end of %install scriptlet.
#

%__os_install_post    \
    @RPMVENDORDIR@/brp-compress \
    @RPMVENDORDIR@/brp-strip \
    @RPMVENDORDIR@/brp-strip-static-archive \
    @RPMVENDORDIR@/brp-strip-comment-note \
%{nil}

%__os_install_post    \
    %{?__spec_helper_post}%{?!__spec_helper_post:/usr/share/spec-helper/spec-helper} \
%{nil}

%__debug_install_post   \
   @RPMVENDORDIR@/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
%{nil}


#==============================================================================
# ---- Database configuration macros.
#	Macros used to configure Berkley db parameters.
#
# rpmdb macro configuration values are a colon (or white space) separated
# list of tokens, with an optional '!' negation to explicitly disable bit
# values, or a "=value" if a parameter. A per-tag value is used (e.g.
# %_dbi_config_Packages) if defined, otherwise a per-rpmdb default
# (e.g. %_dbi_config). The configuration is also conditioned on the
# existence of an internal %{_rpmdb_rebuild} switch to permit changing
# the configuration while rebuilding an rpmdb database.
#
# The rpmdb configuration tokens are in a popt table in rpmdb/dbconfig.c,
# see that for the latest gory details. Note carefully that, unless you
# are writing an rpm installer, you shouldn't have to touch *any* of these
# parameters.
#
# Here's a short list of the tokens, with a guess of whether the option is
# useful:
#	(nothing)	currently used in rpm, known to work.
#	"+++"		under development, will be supported in rpm eventually.
#	"???"		I have no clue, you're mostly on your own.
#
# If you do find yourself inclined to fiddle, here's what I see (shrug):
# 1) Only the value of mp_size has any serious impact on overall performance,
#    and you will need ~256Kb to handle a typical machine install.
# 2) Only the Packages hash, because of the size of the values (i.e. headers),
#    will ever need tuning. Diddle the pagesize if you're interested, although
#    I believe that you will find pagesize=512 "best".
# 3) Adding nofsync increases speed, but risks total data loss. Fiddle shared
#    and/or mp_size instead.
# 4) btree is faster than hash, but would require some painful rpm release
#    engineering to convert everbody's databases to btree, not gonna happen
#    soon.
#
# See the db3-devel package, or http://www.sleepycat.com for Berkeley db-3.x
# documentation.
#
#   token	works?	Berkeley db flag or value
#==================================================
#---------------------- DBENV->open parameters and tunable values:
#   mmapsize=16Mb	DBENV->set_mp_mmapsize
#   cachesize=1Mb	DBENV->set_cachesize, DB->set_cachesize
#---------------------- DBENV->open and DB->open common bits:
#   create		DB_CREATE
#   thread	???	DB_THREAD	(useless w/o posix mutexes on linux)
#---------------------- DBENV->open bits:
#   joinenv		DB_JOIN_ENV
#   mpool		DB_INIT_MPOOL
#   cdb		+++	DB_INIT_CDB
#   txn		???	DB_INIT_TXN
#   log		???	DB_INIT_LOG
#   lock	???	DB_INIT_LOCK
#   recover	???	DB_RECOVER
#   recover_fatal ???	DB_RECOVER_FATAL
#   use_environ	???	DB_USE_ENVIRON
#   use_environ_root ??? DB_USE_ENVIRON_ROOT
#   private	+++	DB_PRIVATE
#   lockdown	???	DB_LOCKDOWN
#   shared	+++	DB_SYSTEM_MEM
#---------------------- DB->open parameters and tunable values:
#   pagesize=512 +++	DB->set_pagesize
#---------------------- DB->open bits:
#   excl	???	DB_EXCL
#   nommap	???	DB_NOMMAP
#   rdonly		DB_RDONLY
#---------------------- DB->open types:
#   btree		DB_BTREE
#   hash		DB_HASH
#   recno	???	DB_RECNO
#   queue	???	DB_QUEUE
#   unknown	+++	DB_UNKNOWN
#---------------------- DB->set_flags bits:
#   bt_dup	+++	(btree only) DB_DUP
#   bt_dupsort	+++	(btree only) DB_DUPSORT
#   ht_dup	+++	(hash only) DB_DUP
#   ht_dupsort	+++	(hash only) DB_DUPSORT
#----------------------- rpmdb specific configuration:
#   usedbenv		(always on) Use db3 environment?
#   verify		(db3 only) Verify Packages db after RW close?
#   lockdbfd		(always on for Packages) Use fcntl(2) locking ?
#   nofsync		Disable fsync(2) call performed after db3 writes?
#   temporary		Unlink file when closing.
#

#==============================================================================
# ---- GPG/PGP/PGP5 signature macros.
#	Macro(s) to hold the arguments passed to GPG/PGP for package
#	signing and verification.
#

# We disable the gpg key automatic querying 
%_hkp_keyserver_query   %nil


#	Verify digest/signature flags for various rpm modes:
#	0x30300 (_RPMVSF_NODIGESTS)    --nohdrchk      if set, don't check digest(s)
#	0xc0c00 (_RPMVSF_NOSIGNATURES) --nosignature   if set, don't check signature(s)
#	0xf0000 (_RPMVSF_NOPAYLOAD)    --nolegacy      if set, check header+payload (if possible)
#	0x00f00 (_RPMVSF_NOHEADER)     --nohdrchk      if set, don't check rpmdb headers
%_vsflags_query		0xc0c00


#==============================================================================
# ---- Transaction macros.
#	Macro(s) used to parameterize transactions.
#
#	The output binary package file name template used when building
#	binary packages.
#

#	Open all indices before doing chroot(2).
#
%_openall_before_chroot	1

%_repackage_all_erasures	0

%_query_all_fmt		%%{name}-%%{version}-%%{release}

%_rpmlock_path  %{_dbpath}/__db.000

#==============================================================================
# ---- Cache configuration macros.
#	Macro(s) used to configure the universe of headers used to
#	solve dependencies using rpmcache(8).
#
#	Note: These values are specific to my machine, and most certainly
#	are incorrect for any non-redhat.com machine. The macros are
#	included here only to document the macro names and usage.

#==============================================================================
# ---- per-platform macros.
#	Macros that are specific to an individual platform. The values here
#	will be used if the per-platform macro file does not exist..
#

#==============================================================================
# ---- Scriptlet template templates.
#	Global defaults used for building scriptlet templates.
#

#==============================================================================
# ---- Scriptlet templates.
#	Macro(s) that expand to a command and script that is executed.
#	CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
#

#==============================================================================
# ---- configure macros.
#	Macro(s) slavishly copied from autoconf's config.status.
#

#==============================================================================
# ---- config.guess platform macros.
#	Macro(s) similar to the tokens used by configure.
#

#==============================================================================
# ---- specfile macros.
#	Macro(s) here can be used reliably for reproducible builds.
#	(Note: Above is the goal, below are the macros under development)
#

# Servers opt flags
%serverbuild %define _serverbuild_flags -fstack-protector-all

%__libtoolize_configure %{?__libtoolize:(cd $CONFIGURE_TOP; [ -f configure.in -o -f configure.ac ] && %{__libtoolize} --copy --force)}

# This is an improved version of %configure (from PLD team).
%configure \
  CONFIGURE_TOP="${CONFIGURE_TOP:-.}"; \
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  %{?__cputoolize:%{__cputoolize} -c $CONFIGURE_TOP} ; \
  %{?_enable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \
  [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \
  CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \
  $CONFIGURE_TOP/configure %{_target_platform} \\\
	--program-prefix=%{?_program_prefix} \\\
 	--prefix=%{_prefix} \\\
	--exec-prefix=%{_exec_prefix} \\\
	--bindir=%{_bindir} \\\
	--sbindir=%{_sbindir} \\\
	--sysconfdir=%{_sysconfdir} \\\
	--datadir=%{_datadir} \\\
	--includedir=%{_includedir} \\\
	--libdir=%{_libdir} \\\
	--libexecdir=%{_libexecdir} \\\
	--localstatedir=%{_localstatedir} \\\
	--sharedstatedir=%{_sharedstatedir} \\\
	--mandir=%{_mandir} \\\
	--infodir=%{_infodir} \\\
    $CONFIGURE_XPATH

%configure2_5x \
  CONFIGURE_TOP="${CONFIGURE_TOP:-.}"; \
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  %{?__cputoolize:%{__cputoolize} -c $CONFIGURE_TOP} ; \
  %{?_enable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \
  [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \
  CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \
  $CONFIGURE_TOP/configure --build=%{_target_platform} \\\
 	--prefix=%{_prefix} \\\
	--exec-prefix=%{_exec_prefix} \\\
	--bindir=%{_bindir} \\\
	--sbindir=%{_sbindir} \\\
	--sysconfdir=%{_sysconfdir} \\\
	--datadir=%{_datadir} \\\
	--includedir=%{_includedir} \\\
	--libdir=%{_libdir} \\\
	--libexecdir=%{_libexecdir} \\\
	--localstatedir=%{_localstatedir} \\\
	--sharedstatedir=%{_sharedstatedir} \\\
	--mandir=%{_mandir} \\\
	--infodir=%{_infodir} \\\
    $CONFIGURE_XPATH

%makeinstall_std make DESTDIR=%{?buildroot:%{buildroot}} install

%old_makeinstall \
    make \\\
	prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
	exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
	bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
	sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
	sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
	datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
	includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
	libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
	libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
	localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
	sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
	mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
	infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
    install


#------------------------------------------------------------------------------
# Useful python macros
%pyver	%(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")

#------------------------------------------------------------------------------
# Useful perl macros 
# (initially from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
# (modified by Pixel <pixel@mandrakesoft.com>)
#
#	[...]
#	Group: Development/Perl
#	[...]
#	%build
#	perl Makefile.PL INSTALLDIRS=vendor
#	%make
#	[...]
#	%install
#	rm -rf $RPM_BUILD_ROOT
#	make install PREFIX="$RPM_BUILD_ROOT/%{prefix}"
#	[...]
#	%files
#	%defattr(644,root,root,755)
#	%{perl_vendorlib}/CGI
# or
#	%{perl_vendorarch}/DBI
#	%{perl_vendorarch}/auto/DBI
#	%{_mandir}/*/*
#

# kept for compatibility, but should not be used, especially the ugly perl_archlib!
%perl_sitearch	%(eval "`perl -V:installsitearch`"; echo $installsitearch)
%perl_archlib	%(eval "`perl -V:installarchlib`"; echo $installarchlib)

#--------------------------------------------------------------------------------
# Macro from conectiva

%rename() \
Obsoletes: %{1} < %{version}-%{release} \
Provides: %{1} = %{version}-%{release}

#--------------------------------------------------------------------------------
# --without section

#%prep %{?_without_prep:%define __spec_prep_cmd /bin/true\
#%%prep\
#%{warn:Skipping %%prep stage\
#}}%{?!_without_prep:%%prep}
#
#%build %{?_without_build:%define __spec_build_cmd /bin/true\
#%%build\
#%{warn:Skipping %%build stage\
#}}%{?!_without_build:%%build}
#
#%install %{?_without_install:%define __spec_install_cmd /bin/true\
#%%install\
#%{warn:Skipping %%install stage\
#}}%{?!_without_install:%%install}
#
#%check %{?_without_check:%define __spec_check_cmd /bin/true\
#%%check\
#%{warn:Skipping %%check stage\
#}}%{?!_without_check:%%check}

# Shorthand for %{defined with_...}
# macros provided by rpm 4.4, but buggy :(
%_with() %{expand: %%{?_with_%1:1} %%{!?_with_%1: %%{?_without_%1:0} %%{!?_without_%1: %%{?with_%1:%%{with_%1}} %%{!?with_%1: %%{?without_%1:!%%{without_%1}} %%{!?without_%1: %%{?2:%%2} %%{!?2:1} } } } } }
%_without() !%{expand: %%{with %1 %{?2:%2}}}

%_package_i18n(g:f:) \
%%package -n %{?1:%{1}}%{?!1:%{name}}-i18n\
Summary: Internationalization and locale data for %{?1:%{1}}%{?!1:%{name}}\
License: %{license}\
Group: %{?-g:%{-g*}}%{?!-g:%{group}}\
\
%%description -n %{?1:%{1}}%{?!1:%{name}}-i18n\
Internationalization and locale data for %{?1:%{1}}%{?!1:%{name}}\
\
%%files -n %{?1:%{1}}%{?!1:%{name}}-i18n %{?-f:%{-f}}%{?!-f:-f %{?1:%{1}}%{?!1:%{name}}.lang}\
%{nil}


#------------------------------------------------------------------------------
# Python specific macros

# (from rpm 4.4.6)
%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%python_sitelib	%(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%python_version	%(%{__python} -c "import sys; print(sys.version[0:3])")

# More 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)
# backward compatibility
%py_libdir              %py_purelibdir
%py_platlibdir          %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
%py_purelibdir          %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
%py_incdir              %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
%py_sitedir             %py_puresitedir
%py_platsitedir         %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
%py_puresitedir         %(python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)

%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} \
Requires: python >= %minver, python < %maxver


#------------------------------------------------------------------------------
# Ocaml macro
#

%ocaml_sitelib %(if [ -x /usr/bin/ocamlc ]; then ocamlc -where;fi)/site-lib

#------------------------------------------------------------------------------
# Redefine RPM sections to allow jumping over them
#

%prep %%prep \
[ %{_with prep} -eq 1 ] || exit 0 \
[ %{_with build} -eq 1 ] || exit 0 \
[ %{_with install} -eq 1 ] || exit 0 \
%{nil}

%build %%build \
[ %{_with install} -eq 1 ] || exit 0 \
[ %{_with build} -eq 1 ] || exit 0 \
%{nil}

%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package_and_restore}}}\
%%install\
[ %{_with install} -eq 1 ] || exit 0 \
%{nil}