OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web openpkg$ Date: 23-Jan-2003 15:01:01
Branch: HEAD Handle: 2003012314005902
Added files:
openpkg-re/vcheck vc.perl-openpkg
openpkg-src/perl-openpkg
perl-openpkg.sh perl-openpkg.spec
Modified files:
openpkg-web news.txt
Log:
split out perl-openpkg utility
Summary:
Revision Changes Path
1.1 +11 -0 openpkg-re/vcheck/vc.perl-openpkg
1.1 +124 -0 openpkg-src/perl-openpkg/perl-openpkg.sh
1.1 +73 -0 openpkg-src/perl-openpkg/perl-openpkg.spec
1.2984 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/vcheck/vc.perl-openpkg
============================================================================
$ cvs diff -u -r0 -r1.1 vc.perl-openpkg
--- /dev/null 2003-01-23 15:00:59.000000000 +0100
+++ vc.perl-openpkg 2003-01-23 15:00:59.000000000 +0100
@@ -0,0 +1,11 @@
+config = {
+}
+
+prog perl-openpkg = {
+ disabled
+ comment = "rse: no vendor tarball possible, because we are the vendor ;-)"
+ version = 0
+ url = http://cvs.openpkg.org/openpkg-src/
+ regex = perl-openpkg.sh
+}
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/perl-openpkg/perl-openpkg.sh
============================================================================
$ cvs diff -u -r0 -r1.1 perl-openpkg.sh
--- /dev/null 2003-01-23 15:01:01.000000000 +0100
+++ perl-openpkg.sh 2003-01-23 15:01:01.000000000 +0100
@@ -0,0 +1,124 @@
+#!/bin/sh
+##
+## perl-openpkg -- OpenPKG utility for use in Perl module packages
+## Copyright (c) 2002-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
+##
+
+# hard-coded OpenPKG instance prefix
+l_prefix="@l_prefix@"
+
+# make sure we are running in the RPM environment
+if [ ".$RPM_BUILD_ROOT" = . ]; then
+ echo "perl-openpkg:ERROR: \$RPM_BUILD_ROOT not set" 1>&2
+ exit 1
+fi
+if [ ".$RPM_BUILD_DIR" = . ]; then
+ echo "perl-openpkg:ERROR: \$RPM_BUILD_DIR not set" 1>&2
+ exit 1
+fi
+
+# helper function for logging
+log () {
+ echo "perl-openpkg: $*" 1>&2
+}
+
+cmd="$1"
+shift
+case $cmd in
+ prolog )
+ # prepare Perl module installation area
+ log "prepare Perl module installation area"
+ rm -rf $RPM_BUILD_ROOT
+ l_shtool=`${l_prefix}/bin/rpm --eval '%{l_shtool}'`
+ ${l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}${l_prefix}/lib/perl
+
+ # prepare Perl executable wrapper
+ log "prepare Perl executable wrapper"
+ eval `${l_prefix}/bin/perl -V:installarchlib -V:installprivlib
-V:installsitearch -V:installsitelib`
+ perl="${RPM_BUILD_DIR}/perl"
+ echo "#!/bin/sh" >$perl
+ echo "exec ${l_prefix}/bin/perl \\" >>$perl
+ echo " -I${RPM_BUILD_ROOT}${installarchlib} \\" >>$perl
+ echo " -I${RPM_BUILD_ROOT}${installprivlib} \\" >>$perl
+ echo " -I${RPM_BUILD_ROOT}${installsitearch} \\" >>$perl
+ echo " -I${RPM_BUILD_ROOT}${installsitelib} \\" >>$perl
+ echo " \"\$@\"" >>$perl
+ chmod a+x $perl
+ ;;
+
+ install )
+ # determine build parameters
+ log "determine build parameters"
+ perl="${RPM_BUILD_DIR}/perl"
+ perl_args="PREFIX=${RPM_BUILD_ROOT}${l_prefix} INSTALLDIRS=site"
+ perl_args="${perl_args} PERL=${perl} FULLPERL=${perl}"
+ make=`${l_prefix}/bin/rpm --eval '%{l_make} %{l_mflags}'`
+ make_args="PERL=${perl} FULLPERL=${perl}"
+
+ # optionally enter sub-directory of module
+ oldpwd=`pwd`
+ if [ ".$1" = ".-d" ]; then
+ shift
+ dir="$1"
+ shift
+ if [ -d $dir ]; then
+ log "entering sub-directory $dir"
+ cd $dir
+ else
+ dir=`echo "$dir" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;' -e
's;^.*/\([^/]*\)\.tgz$;\1;'`
+ if [ -d $dir ]; then
+ log "entering sub-directory $dir"
+ cd $dir
+ fi
+ fi
+ fi
+
+ # configuring Perl module
+ log "configuring Perl module"
+ chmod -R u+rw Makefile.PL
+ cp Makefile.PL Makefile.PL.orig
+ sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
+ $perl Makefile.PL ${1+"$@"} $perl_args </dev/null
+
+ # building Perl module
+ log "building Perl module"
+ $make $make_args pure_all
+
+ # installing Perl module
+ log "installing Perl module"
+ $make $make_args pure_install
+ ;;
+
+ epilog )
+ # pruning installation area
+ log "pruning installation area"
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -name perllocal.pod -print | xargs rm -f
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -name .packlist -print | xargs rm -f
+ find ${RPM_BUILD_ROOT}${l_prefix} \
+ -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
+
+ # determining installation files
+ log "determining installation files"
+ eval `${l_prefix}/bin/perl -V:installarchlib -V:installprivlib
-V:installsitearch -V:installsitelib`
+ l_rpmtool=`${l_prefix}/bin/rpm --eval '%{l_rpmtool}'`
+ eval ${l_rpmtool} files -v -ofiles -r${RPM_BUILD_ROOT} \
+ `${l_prefix}/bin/rpm --eval '%{l_files_std}'` \
+ "\"%not %dir ${l_prefix}/lib/perl\"" \
+ "\"%not %dir ${l_prefix}/lib/perl/*\"" \
+ "\"%not %dir $installarchlib\"" \
+ "\"%not %dir $installprivlib\"" \
+ "\"%not %dir $installsitearch\"" \
+ "\"%not %dir $installsitelib\"" \
+ "\"%not %dir $installarchlib/auto\"" \
+ "\"%not %dir $installprivlib/auto\"" \
+ "\"%not %dir $installsitearch/auto\"" \
+ "\"%not %dir $installsitelib/auto\"" \
+ "\"%not ${l_prefix}/man\""
+
+ # cleanup
+ rm -f ${RPM_BUILD_DIR}/perl
+ ;;
+esac
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/perl-openpkg/perl-openpkg.spec
============================================================================
$ cvs diff -u -r0 -r1.1 perl-openpkg.spec
--- /dev/null 2003-01-23 15:01:01.000000000 +0100
+++ perl-openpkg.spec 2003-01-23 15:01:01.000000000 +0100
@@ -0,0 +1,73 @@
+##
+## perl-openpkg.spec -- OpenPKG RPM Specification
+## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
+## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: perl-openpkg
+Summary: Perl Packaging Utility
+URL: -
+Vendor: The OpenPKG Project
+Packager: The OpenPKG Project
+Distribution: OpenPKG [BASE]
+Group: Language
+License: PD
+Version: 20030123
+Release: 20030123
+
+# list of sources
+Source0: perl-openpkg.sh
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20030103, perl
+PreReq: OpenPKG, openpkg >= 20030103, perl
+AutoReq: no
+AutoReqProv: no
+
+%description
+ perl-openpkg is a small OpenPKG-specific packaging utility which
+ simplifies the build procedures in the various OpenPKG perl-xxx
+ packages.
+
+%prep
+ %setup -T -c
+
+%build
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/bin
+ %{l_shtool} install -c -m 755 \
+ -e 's;@l_prefix@;%{l_prefix};g' \
+ %{SOURCE perl-openpkg.sh} \
+ $RPM_BUILD_ROOT%{l_prefix}/bin/perl-openpkg
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.2983 -r1.2984 news.txt
--- openpkg-web/news.txt 23 Jan 2003 14:00:48 -0000 1.2983
+++ openpkg-web/news.txt 23 Jan 2003 14:01:00 -0000 1.2984
@@ -1,3 +1,4 @@
+23-Jan-2003: New package: P<perl-openpkg-20030123-20030123>
23-Jan-2003: Upgraded package: P<wget-1.8.2-20030123>
23-Jan-2003: Upgraded package: P<as-gui-0.5.20-20030123>
23-Jan-2003: Upgraded package: P<perl-5.8.0-20030123>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]