source: scripts/patch/perl-patch.sh @ 7f4caf0

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 7f4caf0 was 7f4caf0, checked in by Jim Gifford <clfs@…>, 15 years ago

Bzip2 Multilib Update

  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/bash
2# Create a Perl Patch
3
4# Get Version #
5#
6VERSION=$1
7
8# Check Input
9#
10if [ "${VERSION}" = "" ]; then
11  echo "$0 - Perl_Version"
12  echo "This will Create a Patch for Perl Perl_Version"
13  exit 255
14fi
15
16# Download Perl Source
17#
18cd /usr/src
19if ! [ -e perl-${VERSION}.tar.gz  ]; then
20  wget http://www.cpan.org/src/perl-${VERSION}.tar.gz
21fi
22
23# Set Patch Number
24#
25cd /usr/src
26wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
27PATCH_NUM=$(cat index.html | grep perl | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
28PATCH_NUM=$(expr ${PATCH_NUM} + 1)
29rm -f index.html
30
31# Cleanup Directory
32#
33rm -rf perl-${VERSION} perl-${VERSION}.orig
34tar xvf perl-${VERSION}.tar.gz
35mv perl-${VERSION} perl-${VERSION}.orig
36CURRENTDIR=$(pwd -P)
37
38# Get Current Updates from GIT
39#
40cd /usr/src
41mkdir perl.git
42cd perl.git
43git clone git://perl5.git.perl.org/perl.git
44
45# Cleanup
46#
47cd /usr/src/perl-${VERSION}
48REMOVE=".patch AUTHORS Changes*"
49for file in $REMOVE; do
50  cd /usr/src/perl-${VERSION}
51  rm -f ${file}
52  cd /usr/src/perl-${VERSION}.orig
53  rm -f ${file}
54done
55cd ..
56
57# Remove Directories
58#
59cd /usr/src/perl-${VERSION}
60REMOVE="os2 vms win32"
61for dir in $REMOVE; do
62  cd /usr/src/perl-${VERSION}
63  rm -rf ${dir}
64  cd /usr/src/perl-${VERSION}.orig
65  rm -rf ${dir}
66done
67cd ..
68
69# Create Patch
70#
71cd /usr/src
72echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > perl-${VERSION}-branch_update-x.patch
73echo "Date: `date +%m-%d-%Y`" >> perl-${VERSION}-branch_update-x.patch
74echo "Initial Package Version: ${VERSION}" >> perl-${VERSION}-branch_update-x.patch
75echo "Origin: Upstream" >> perl-${VERSION}-branch_update-x.patch
76echo "Upstream Status: Applied" >> perl-${VERSION}-branch_update-x.patch
77echo "Description: This is a branch update for perl-${VERSION}, and should be" >> perl-${VERSION}-branch_update-x.patch
78echo "             rechecked periodically." >> perl-${VERSION}-branch_update-x.patch
79echo "" >> perl-${VERSION}-branch_update-x.patch
80diff -Naur perl-${VERSION}.orig perl-${VERSION} >> perl-${VERSION}-branch_update-x.patch
81echo "Created /usr/src/perl-${VERSION}-branch_update-x.patch."
Note: See TracBrowser for help on using the repository browser.