RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: file/ configure.ac file/magic/ Makefile.am rpm/ Makefile.am...

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Mon 16 Jul 2007 - 10:49:05 CEST
Message-Id: <20070716084905.5FC883484F3@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm file                         Date:   16-Jul-2007 10:49:05
  Branch: HEAD                             Handle: 2007071609490005

  Modified files:
    file                    configure.ac
    file/magic              Makefile.am
    rpm                     Makefile.am configure.ac macros.in rpm.spec.in
    rpm/build               Makefile.am
    rpm/doc                 Makefile.am
    rpm/doc/fr              Makefile.am
    rpm/doc/ja              Makefile.am
    rpm/doc/ko              Makefile.am
    rpm/doc/pl              Makefile.am
    rpm/doc/ru              Makefile.am
    rpm/doc/sk              Makefile.am
    rpm/lib                 Makefile.am poptALL.c
    rpm/misc                Makefile.am
    rpm/rpmdb               Makefile.am
    rpm/rpmio               Makefile.am rpmlua.c
    rpm/scripts             Makefile.am rpm.pc.in
    rpm/tools               Makefile.am

  Log:
    Another round on my long road of untwisting and simplify the RPM
    build- and install-environment. This commit addresses the fact that
    RPM 5 until now used versioned paths in a partly hard-coded and partly
    unfinished way (mainly just for the lib/rpm/ directory). Instead of
    hard-coding the versioning in macros and even the C code, move it back
    to where it really belongs to IMHO: the Autoconf glue. And activate it
    there only if explicitly requested with option --with-path-versioned.
    
    This way one is again able to build RPM 5 in the way a distribution
    vendor finally wishes it (usually without any versioning at all) and the
    way a developer might wishes it (usually with full versioning to not
    destroy the system RPM installation at all).
    
                                 - - -
    
    Caveat: Automake doesn't support versioned installation paths very good.
    Well, actually it doesn't support it at all except for binaries via a
    "transform" rule. The only (and even officially documented) way is to
    install regularily and then adjust the filesystem files afterwards. This
    works just fine, but only if one installs to a *non-system* "prefix" or
    at least uses "DESTDIR" to install into an intermediate directory first
    and then move the stuff over the system location. So, if you are using
    --prefix=/usr please use "make install DESTDIR=/tmp/usr" and _then_
    copy over the /tmp/usr files to /usr. For all other "prefix" it usually
    doesn't matter.

  Summary:
    Revision    Changes     Path
    1.25        +8  -0      file/configure.ac
    1.20        +2  -2      file/magic/Makefile.am
    2.191       +9  -2      rpm/Makefile.am
    2.65        +15 -1      rpm/build/Makefile.am
    2.183       +40 -4      rpm/configure.ac
    1.14        +13 -0      rpm/doc/Makefile.am
    1.2         +13 -0      rpm/doc/fr/Makefile.am
    1.3         +13 -0      rpm/doc/ja/Makefile.am
    1.2         +13 -0      rpm/doc/ko/Makefile.am
    1.4         +13 -0      rpm/doc/pl/Makefile.am
    1.2         +13 -0      rpm/doc/ru/Makefile.am
    1.3         +13 -0      rpm/doc/sk/Makefile.am
    2.160       +15 -1      rpm/lib/Makefile.am
    2.34        +1  -1      rpm/lib/poptALL.c
    1.179       +2  -2      rpm/macros.in
    1.26        +14 -0      rpm/misc/Makefile.am
    2.445       +1  -1      rpm/rpm.spec.in
    1.70        +18 -6      rpm/rpmdb/Makefile.am
    1.97        +15 -1      rpm/rpmio/Makefile.am
    2.18        +1  -1      rpm/rpmio/rpmlua.c
    1.43        +16 -2      rpm/scripts/Makefile.am
    1.2         +3  -2      rpm/scripts/rpm.pc.in
    2.93        +1  -2      rpm/tools/Makefile.am
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: file/configure.ac
  ============================================================================
  $ cvs diff -u -r1.24 -r1.25 configure.ac
  --- file/configure.ac	2 Jul 2007 06:48:12 -0000	1.24
  +++ file/configure.ac	16 Jul 2007 08:49:03 -0000	1.25
  @@ -6,6 +6,14 @@
   AM_CONFIG_HEADER([config.h])
   AM_MAINTAINER_MODE
   
  +USRLIBRPM="$libdir/rpm"
  +AC_ARG_WITH(
  +    [path-lib],
  +    AS_HELP_STRING([--with-path-lib=ARG], [build with RPM system library directory path]),
  +    [USRLIBRPM="$withval"]
  +)
  +AC_SUBST(USRLIBRPM)
  +
   AC_MSG_CHECKING(for builtin ELF support)
   AC_ARG_ENABLE(elf,
   [  --disable-elf            disable builtin ELF support],
  @@ .
  patch -p0 <<'@@ .'
  Index: file/magic/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 Makefile.am
  --- file/magic/Makefile.am	18 Jun 2007 00:03:04 -0000	1.19
  +++ file/magic/Makefile.am	16 Jul 2007 08:49:03 -0000	1.20
  @@ -1,5 +1,5 @@
  -#pkgdata_DATA = magic magic.mime magic.mgc magic.mime.mgc
  -pkglibdir =  @prefix@/lib/rpm/5.0
  +
  +pkglibdir =  @USRLIBRPM@
   pkglib_DATA = magic magic.mime magic.mgc magic.mime.mgc
   
   EXTRA_DIST = magic2mime Localstuff Header magic.mime $(magic_FRAGMENTS)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.190 -r2.191 Makefile.am
  --- rpm/Makefile.am	16 Jul 2007 08:33:25 -0000	2.190
  +++ rpm/Makefile.am	16 Jul 2007 08:49:00 -0000	2.191
  @@ -61,9 +61,16 @@
   
   bin_PROGRAMS = 		rpm rpmbuild
   
  +install-exec-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(bin_PROGRAMS); do \
  +	    mv $(DESTDIR)$(bindir)/$${p}$(EXEEXT) \
  +	       $(DESTDIR)$(bindir)/$${p}-$(VERSION)$(EXEEXT); \
  +	done
  +endif
  +
   pkglibdir =		@USRLIBRPM@
  -versionlibdir =		$(pkglibdir)/@VERSION@
  -versionlib_DATA =	rpmpopt macros
  +pkglib_DATA =	rpmpopt macros
   
   noinst_HEADERS = build.h debug.h system.h
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.64 -r2.65 Makefile.am
  --- rpm/build/Makefile.am	16 Jul 2007 08:02:36 -0000	2.64
  +++ rpm/build/Makefile.am	16 Jul 2007 08:49:01 -0000	2.65
  @@ -18,7 +18,7 @@
   	@WITH_ZLIB_CPPFLAGS@ \
   	@WITH_FILE_CPPFLAGS@
   
  -pkgincdir = $(pkgincludedir)
  +pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = rpmbuild.h rpmspec.h
   noinst_HEADERS = buildio.h
   
  @@ -37,6 +37,20 @@
   librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES) 
   	$(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD)
   
  +install-data-hook:
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
  +	done
  +if WITH_PATH_VERSIONED
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
  +	    if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
  +	        mv $(DESTDIR)$(usrlibdir)/$${base}.a \
  +	           $(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
  +	    fi; \
  +	done
  +endif
  +
   clean-local:
   	rm -f *.o # .created $(FILELOBJS)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.182 -r2.183 configure.ac
  --- rpm/configure.ac	16 Jul 2007 08:39:54 -0000	2.182
  +++ rpm/configure.ac	16 Jul 2007 08:49:00 -0000	2.183
  @@ -989,6 +989,23 @@
   AC_SUBST(RPMGROUP)
   AC_SUBST(RPMGID)
   
  +dnl # support for versioned installation paths
  +AC_ARG_WITH(
  +    [path-versioned],
  +    AC_HELP_STRING([--with-path-versioned], [install with versioned paths]),
  +    [WITH_PATH_VERSIONED=$withval],
  +    [WITH_PATH_VERSIONED=no])
  +AM_CONDITIONAL(
  +    [WITH_PATH_VERSIONED],
  +    [ test ".$WITH_PATH_VERSIONED" = .yes ])
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    WITH_PATH_VERSIONED_SUFFIX="-${VERSION}"
  +else
  +    WITH_PATH_VERSIONED_SUFFIX=""
  +fi
  +AC_SUBST([WITH_PATH_VERSIONED_SUFFIX])
  +AC_SUBST([WITH_PATH_VERSIONED])
  +
   dnl # FIXME: hard-coded paths?!
   if test "x$varprefix" = "x"; then
       # For /usr and /usr/local, we want the 'var' directory to go
  @@ -1010,6 +1027,9 @@
   dnl # determine RPM database directory path
   AC_MSG_CHECKING([for RPM database directory])
   DBPATH=`echo "${varprefix}/lib/rpm"`
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    DBPATH="${DBPATH}-${VERSION}"
  +fi
   AC_ARG_WITH(
       [path-database],
       AS_HELP_STRING([--with-path-database=ARG], [build with RPM database directory path]),
  @@ -1025,6 +1045,9 @@
   dnl # determine RPM package sources directory path
   AC_MSG_CHECKING([for RPM package sources directory])
   PKGSRCDIR=`echo "${usrprefix}/src/rpm"`
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    PKGSRCDIR="${PKGSRCDIR}-${VERSION}"
  +fi
   AC_ARG_WITH(
       [path-sources],
       AS_HELP_STRING([--with-path-sources=ARG], [build with RPM package sourcs directory path]),
  @@ -1040,6 +1063,9 @@
   dnl # determine RPM locale directory path
   AC_MSG_CHECKING([for RPM locale directory])
   LOCALEDIR=`echo "${usrprefix}/share/locale"`
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    LOCALEDIR="$LOCALEDIR/rpm-$VERSION"
  +fi
   AC_ARG_WITH(
       [path-locale],
       AS_HELP_STRING([--with-path-locale=ARG], [build with RPM locale directory path]),
  @@ -1056,10 +1082,13 @@
   dnl # determine RPM system library directory path
   AC_MSG_CHECKING([for RPM system library directory])
   USRLIBRPM=`echo "${usrprefix}/lib/rpm"`
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    USRLIBRPM="${USRLIBRPM}-${VERSION}"
  +fi
   AC_ARG_WITH(
       [path-lib],
       AS_HELP_STRING([--with-path-lib=ARG], [build with RPM system library directory path]),
  -    [USRLIBRPM="$withval"]
  +    [USRLIBRPM="$withval"], [ ac_configure_args="$ac_configure_args --with-path-lib=\"$USRLIBRPM\"" ]
   )
   AC_DEFINE_UNQUOTED(
       [USRLIBRPM], ["$USRLIBRPM"],
  @@ -1071,6 +1100,9 @@
   dnl # determine RPM global configuration directory path
   AC_MSG_CHECKING([for RPM global configuration directory])
   SYSCONFIGDIR="/etc/rpm"
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    SYSCONFIGDIR="$SYSCONFIGDIR/$VERSION"
  +fi
   AC_ARG_WITH(
       [path-cfg],
       AS_HELP_STRING([--with-path-cfg=ARG], [build with RPM global configuration directory path]),
  @@ -1085,12 +1117,16 @@
   
   dnl # determine RPM macro files path
   AC_MSG_CHECKING([for RPM macro files path])
  -MACROFILES="${USRLIBRPM}/${VERSION}/macros"
  +MACROFILES="${USRLIBRPM}/macros"
   MACROFILES="${MACROFILES}:${USRLIBRPM}/%{_target}/macros"
   MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/macros.*"
   MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/macros"
   MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/%{_target}/macros"
  -MACROFILES="${MACROFILES}:~/.rpmmacros"
  +if test ".$WITH_PATH_VERSIONED" = .yes; then
  +    MACROFILES="${MACROFILES}:~/.rpmmacros-${VERSION}"
  +else
  +    MACROFILES="${MACROFILES}:~/.rpmmacros"
  +fi
   AC_ARG_WITH(
       [path-macros],
       AS_HELP_STRING([--with-path-macros=ARG], [build with colon-separated RPM macro files path]),
  @@ -1105,7 +1141,7 @@
   
   dnl # determine POPT configuration file path
   AC_MSG_CHECKING([for POPT configuration file path])
  -RPMPOPTFILE="${USRLIBRPM}/${VERSION}/rpmpopt"
  +RPMPOPTFILE="${USRLIBRPM}/rpmpopt"
   AC_ARG_WITH(
       [path-rpmpopt],
       AS_HELP_STRING([--with-path-rpmpopt=ARG], [build with POPT configuration file path]),
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.13 -r1.14 Makefile.am
  --- rpm/doc/Makefile.am	4 Jul 2007 17:31:16 -0000	1.13
  +++ rpm/doc/Makefile.am	16 Jul 2007 08:49:01 -0000	1.14
  @@ -8,3 +8,16 @@
   man_MANS	= gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 rpmgraph.8 rpm2cpio.8
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/fr/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 Makefile.am
  --- rpm/doc/fr/Makefile.am	20 Jun 2002 14:50:02 -0000	1.1
  +++ rpm/doc/fr/Makefile.am	16 Jul 2007 08:49:01 -0000	1.2
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/fr
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/ja/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 Makefile.am
  --- rpm/doc/ja/Makefile.am	5 Jun 2003 11:48:23 -0000	1.2
  +++ rpm/doc/ja/Makefile.am	16 Jul 2007 08:49:02 -0000	1.3
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/ja
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/ko/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 Makefile.am
  --- rpm/doc/ko/Makefile.am	20 Jun 2002 14:50:02 -0000	1.1
  +++ rpm/doc/ko/Makefile.am	16 Jul 2007 08:49:02 -0000	1.2
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/ko
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/pl/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 Makefile.am
  --- rpm/doc/pl/Makefile.am	16 Jun 2003 15:02:35 -0000	1.3
  +++ rpm/doc/pl/Makefile.am	16 Jul 2007 08:49:02 -0000	1.4
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/pl
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/ru/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 Makefile.am
  --- rpm/doc/ru/Makefile.am	19 Jul 1999 22:13:12 -0000	1.1
  +++ rpm/doc/ru/Makefile.am	16 Jul 2007 08:49:02 -0000	1.2
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/ru
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/doc/sk/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 Makefile.am
  --- rpm/doc/sk/Makefile.am	29 Aug 2000 22:04:33 -0000	1.2
  +++ rpm/doc/sk/Makefile.am	16 Jul 2007 08:49:03 -0000	1.3
  @@ -6,3 +6,16 @@
   mandir		= @mandir@/sk
   
   EXTRA_DIST	= $(man_MANS)
  +
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(man_MANS); do \
  +	    case "$$p" in \
  +		    *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
  +		    *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
  +	                 `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
  +	    esac; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.159 -r2.160 Makefile.am
  --- rpm/lib/Makefile.am	16 Jul 2007 08:02:36 -0000	2.159
  +++ rpm/lib/Makefile.am	16 Jul 2007 08:49:03 -0000	2.160
  @@ -20,7 +20,7 @@
   
   EXTRA_PROGRAMS =
   
  -pkgincdir = $(pkgincludedir)
  +pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = \
   	fs.h misc.h rpmcli.h rpmlib.h \
   	rpmal.h rpmdpkg.h rpmds.h rpmevr.h rpmfc.h rpmfi.h rpmgi.h \
  @@ -47,6 +47,20 @@
   librpm.la: $(librpm_la_OBJECTS) $(librpm_la_DEPENDENCIES) 
   	$(librpm_la_LINK) -rpath $(usrlibdir) $(librpm_la_OBJECTS) $(librpm_la_LIBADD)
   
  +install-data-hook:
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
  +	done
  +if WITH_PATH_VERSIONED
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
  +	    if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
  +	        mv $(DESTDIR)$(usrlibdir)/$${base}.a \
  +	           $(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
  +	    fi; \
  +	done
  +endif
  +
   getdate.c: getdate.y
   	@echo expect 10 shift/reduce conflicts
   	$(YACC) $(srcdir)/getdate.y
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.33 -r2.34 poptALL.c
  --- rpm/lib/poptALL.c	16 Jul 2007 01:32:28 -0000	2.33
  +++ rpm/lib/poptALL.c	16 Jul 2007 08:49:03 -0000	2.34
  @@ -539,7 +539,7 @@
   /*@=nullpass =temptrans@*/
       (void) poptReadConfigFile(optCon, RPMPOPTFILE);
       (void) poptReadDefaultConfig(optCon, 1);
  -    poptSetExecPath(optCon, USRLIBRPM "/" VERSION, 1);
  +    poptSetExecPath(optCon, USRLIBRPM, 1);
   
       /* Process all options, whine if unknown. */
       while ((rc = poptGetNextOpt(optCon)) > 0) {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros.in
  ============================================================================
  $ cvs diff -u -r1.178 -r1.179 macros.in
  --- rpm/macros.in	16 Jul 2007 08:33:25 -0000	1.178
  +++ rpm/macros.in	16 Jul 2007 08:49:00 -0000	1.179
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.178 2007/07/16 08:33:25 rse Exp $
  +# $Id: macros.in,v 1.179 2007/07/16 08:49:00 rse Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -33,7 +33,7 @@
   %_usrlibrpm		@USRLIBRPM@
   %_etcrpm		@SYSCONFIGDIR@
   
  -%_rpmhome		%{_usrlibrpm}/%{_rpmversion}
  +%_rpmhome		%{_usrlibrpm}
   
   #==============================================================================
   # ---- Generally useful path macros.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/misc/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.25 -r1.26 Makefile.am
  --- rpm/misc/Makefile.am	16 Jul 2007 08:02:37 -0000	1.25
  +++ rpm/misc/Makefile.am	16 Jul 2007 08:49:04 -0000	1.26
  @@ -37,3 +37,17 @@
   librpmmisc.la: $(librpmmisc_la_OBJECTS) $(librpmmisc_la_DEPENDENCIES) 
   	$(librpmmisc_la_LINK) -rpath $(usrlibdir) $(librpmmisc_la_OBJECTS) $(librpmmisc_la_LIBADD)
   
  +install-data-hook:
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
  +	done
  +if WITH_PATH_VERSIONED
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
  +	    if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
  +	        mv $(DESTDIR)$(usrlibdir)/$${base}.a \
  +	           $(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
  +	    fi; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpm.spec.in
  ============================================================================
  $ cvs diff -u -r2.444 -r2.445 rpm.spec.in
  --- rpm/rpm.spec.in	20 Jun 2007 21:10:19 -0000	2.444
  +++ rpm/rpm.spec.in	16 Jul 2007 08:49:00 -0000	2.445
  @@ -5,7 +5,7 @@
   %define	with_apidocs		@WITH_APIDOCS@%{nil}
   
   %{!?_usrlibrpm:%global _usrlibrpm @USRLIBRPM@}
  -%{!?_rpmhome:%global _rpmhome @USRLIBRPM@/@VERSION@}
  +%{!?_rpmhome:%global _rpmhome @USRLIBRPM@}
   
   %define	__prefix	%{?_prefix}%{!?_prefix:/usr}
   %{?!_lib: %define _lib lib}
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.69 -r1.70 Makefile.am
  --- rpm/rpmdb/Makefile.am	16 Jul 2007 08:02:37 -0000	1.69
  +++ rpm/rpmdb/Makefile.am	16 Jul 2007 08:49:04 -0000	1.70
  @@ -24,13 +24,12 @@
   tjfn_LDFLAGS = @LDFLAGS_STATIC@
   tjfn_LDADD = librpmdb.la
   
  -pkgincdir = $(pkgincludedir)
  +pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = header.h hdrinline.h rpmdb.h
   noinst_HEADERS = fprint.h header_internal.h legacy.h
   
   pkglibdir =		@USRLIBRPM@
  -versionlibdir = 	$(pkglibdir)/@VERSION@
  -versionlib_PROGRAMS =
  +pkglib_PROGRAMS =
   
   mylibs = \
   	$(top_builddir)/rpmdb/librpmdb.la \
  @@ -52,6 +51,20 @@
   librpmdb.la: $(librpmdb_la_OBJECTS) $(librpmdb_la_DEPENDENCIES) 
   	$(librpmdb_la_LINK) -rpath $(usrlibdir) $(librpmdb_la_OBJECTS) $(librpmdb_la_LIBADD)
   
  +install-data-hook:
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
  +	done
  +if WITH_PATH_VERSIONED
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
  +	    if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
  +	        mv $(DESTDIR)$(usrlibdir)/$${base}.a \
  +	           $(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
  +	    fi; \
  +	done
  +endif
  +
   tagtbl.c: Makefile.am $(top_srcdir)/lib/rpmlib.h 
   	@echo '/*@-bounds@*/' > $@
   	@echo '#include "system.h"' >> $@
  @@ -86,12 +99,11 @@
   
   install-data-local:
   	test -z "$(pkgincdir)" || $(MKDIR_P) $(DESTDIR)$(pkgincdir)
  -	test -z "$(versionlibdir)" || $(MKDIR_P) $(DESTDIR)$(versionlibdir)
   	$(pkgincHEADERS_INSTALL) $(my_DB_HEADER) $(DESTDIR)$(pkgincdir)/db.h
   	for tool in . $(my_DB_TOOLS); do \
   		test ".$$tool" = .. && continue; \
  -		$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(versionlibPROGRAMS_INSTALL) \
  -			$(top_builddir)/$(WITH_DB_SUBDIR)/$$tool $(DESTDIR)$(versionlibdir)/$$tool; \
  +		$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkglibPROGRAMS_INSTALL) \
  +			$(top_builddir)/$(WITH_DB_SUBDIR)/$$tool $(DESTDIR)$(pkglibdir)/$$tool; \
   	done
   
   clean-local:
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.96 -r1.97 Makefile.am
  --- rpm/rpmio/Makefile.am	16 Jul 2007 08:02:37 -0000	1.96
  +++ rpm/rpmio/Makefile.am	16 Jul 2007 08:49:04 -0000	1.97
  @@ -28,7 +28,7 @@
   	$(top_builddir)/misc/librpmmisc.la \
   	@LTLIBINTL@
   
  -pkgincdir = $(pkgincludedir)
  +pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = \
   	argv.h envvar.h fts.h mire.h rpmdav.h rpmhash.h \
   	rpmio-stub.h \
  @@ -58,6 +58,20 @@
   librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES) 
   	$(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD)
   
  +install-data-hook:
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
  +	done
  +if WITH_PATH_VERSIONED
  +	-for l in $(usrlib_LTLIBRARIES); do \
  +	    base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
  +	    if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
  +	        mv $(DESTDIR)$(usrlibdir)/$${base}.a \
  +	           $(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
  +	    fi; \
  +	done
  +endif
  +
   #BUILT_SOURCES = rpmio.lcd
   
   rpmio.lcd: Makefile.am ${librpmio_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmlua.c
  ============================================================================
  $ cvs diff -u -r2.17 -r2.18 rpmlua.c
  --- rpm/rpmio/rpmlua.c	16 Jul 2007 08:02:37 -0000	2.17
  +++ rpm/rpmio/rpmlua.c	16 Jul 2007 08:49:04 -0000	2.18
  @@ -77,7 +77,7 @@
   	lua_call(L, 1, 0);
   /*@=noeffectuncon@*/
       }
  -#define	_LUADOTDIR	"%{?_rpmhome}%{!?_rpmhome:" USRLIBRPM "/" VERSION "}"
  +#define	_LUADOTDIR	"%{?_rpmhome}%{!?_rpmhome:" USRLIBRPM "}"
       {	const char * _lua_path = rpmGetPath(_LUADOTDIR, "/lua/?.lua", NULL);
   	if (_lua_path != NULL) {
   	    lua_pushliteral(L, "LUA_PATH");
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.42 -r1.43 Makefile.am
  --- rpm/scripts/Makefile.am	14 Jul 2007 06:46:15 -0000	1.42
  +++ rpm/scripts/Makefile.am	16 Jul 2007 08:49:04 -0000	1.43
  @@ -31,8 +31,7 @@
   bin_SCRIPTS = gendiff rpm2cpio
   
   pkglibdir =		@USRLIBRPM@
  -versionlibdir =		$(pkglibdir)/@VERSION@
  -versionlib_SCRIPTS = \
  +pkglib_SCRIPTS = \
   	brp-compress brp-python-bytecompile brp-java-gcjcompile \
   	brp-strip brp-strip-comment-note brp-nobuildrootpath \
   	brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
  @@ -53,3 +52,18 @@
   pkgconfigdir = $(libdir)/pkgconfig
   pkgconfig_DATA = rpm.pc
   
  +install-exec-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(bin_SCRIPTS); do \
  +	    mv $(DESTDIR)$(bindir)/$${p}$(EXEEXT) \
  +	       $(DESTDIR)$(bindir)/$${p}-$(VERSION)$(EXEEXT); \
  +	done
  +endif
  +install-data-hook:
  +if WITH_PATH_VERSIONED
  +	-for p in $(pkgconfig_DATA); do \
  +	    mv $(DESTDIR)$(pkgconfigdir)/$${p} \
  +	       `echo "$(DESTDIR)$(pkgconfigdir)/$${p}" | sed 's/\.\([^.]*\)$$/-$(VERSION).\1/'`; \
  +	done
  +endif
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/rpm.pc.in
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 rpm.pc.in
  --- rpm/scripts/rpm.pc.in	27 Jun 2007 12:24:44 -0000	1.1
  +++ rpm/scripts/rpm.pc.in	16 Jul 2007 08:49:04 -0000	1.2
  @@ -2,9 +2,10 @@
   ##  rpm.pc -- RPM pkg-config(1) specification
   ##
   
  +suffix=@WITH_PATH_VERSIONED_SUFFIX@
   prefix=@prefix@
   exec_prefix=@exec_prefix@
  -includedir=@includedir@
  +includedir=@includedir@${suffix}
   libdir=@libdir@
   
   Name: @PACKAGE_NAME@
  @@ -12,6 +13,6 @@
   Version: @PACKAGE_VERSION@
   URL: http://rpm5.org/
   Cflags: -I${includedir}/rpm
  -Libs: -L${libdir} -lrpmbuild -lrpm -lrpmdb -lrpmio -lrpmmisc
  +Libs: -L${libdir} -lrpmbuild${suffix} -lrpm${suffix} -lrpmdb${suffix} -lrpmio${suffix} -lrpmmisc${suffix}
   Libs.private: @LDFLAGS@ @LIBS@
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/tools/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.92 -r2.93 Makefile.am
  --- rpm/tools/Makefile.am	27 Jun 2007 20:34:14 -0000	2.92
  +++ rpm/tools/Makefile.am	16 Jul 2007 08:49:05 -0000	2.93
  @@ -22,8 +22,7 @@
   	@LTLIBINTL@
   
   pkglibdir =		@USRLIBRPM@
  -versionlibdir =		$(pkglibdir)/@VERSION@
  -versionlib_PROGRAMS =	rpmdeps @WITH_LIBELF_DEBUGEDIT@
  +pkglib_PROGRAMS =	rpmdeps @WITH_LIBELF_DEBUGEDIT@
   
   convertdb1_SOURCES =	convertdb1.c
   convertdb1_LDADD =	$(myLDADD)
  @@ .
Received on Mon Jul 16 10:49:05 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.