summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0000000000..3b1811064d
--- /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 76c8b6457e..bd53d5be70 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}