aboutsummaryrefslogtreecommitdiff
path: root/libraries/perl-Date-Manip
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2010-07-09 02:36:56 -0400
committerRobby Workman <rworkman@slackbuilds.org>2010-07-10 02:17:47 -0500
commit944d84608d9bf501dd16124307fcab77ee5d688d (patch)
treefb40a1f4ad45a6c7dada288e38c969b988f78c09 /libraries/perl-Date-Manip
parent0a9674372879a25ae73ee9feac36453168f130d4 (diff)
libraries/perl-Date-Manip: Added /etc/timezone file.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/perl-Date-Manip')
-rw-r--r--libraries/perl-Date-Manip/doinst.sh20
-rw-r--r--libraries/perl-Date-Manip/perl-Date-Manip.SlackBuild11
2 files changed, 29 insertions, 2 deletions
diff --git a/libraries/perl-Date-Manip/doinst.sh b/libraries/perl-Date-Manip/doinst.sh
new file mode 100644
index 0000000000000..3b1811064d292
--- /dev/null
+++ b/libraries/perl-Date-Manip/doinst.sh
@@ -0,0 +1,20 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+if [ -L etc/localtime-copied-from ]; then
+ localTime="$(readlink etc/localtime-copied-from)"
+ echo $localTime | cut -d/ -f5- > etc/timezone.new
+fi
+
+config etc/timezone.new
+
diff --git a/libraries/perl-Date-Manip/perl-Date-Manip.SlackBuild b/libraries/perl-Date-Manip/perl-Date-Manip.SlackBuild
index 76c8b6457ec2c..bd53d5be704f2 100644
--- a/libraries/perl-Date-Manip/perl-Date-Manip.SlackBuild
+++ b/libraries/perl-Date-Manip/perl-Date-Manip.SlackBuild
@@ -25,7 +25,7 @@
SRCNAM=Date-Manip
PRGNAM=perl-$SRCNAM
VERSION=${VERSION:-6.11}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -82,7 +82,7 @@ perl Build.PL \
find $PKG/usr/man -type f -exec gzip -9 {} \;
-find $PKG -name "perllocal.pod" -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
+find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true
find $PKG -depth -type d -empty -delete || true
@@ -92,8 +92,15 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Date::Manip seems to need a correctly set /etc/timezone file in some cases.
+# We will create a placeholder and update it with the correct info from the
+# doinst.sh script.
+mkdir -p $PKG/etc
+touch $PKG/etc/timezone.new
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}