diff --git a/build.xml b/build.xml
index 791cef6..99290c9 100644
--- a/build.xml
+++ b/build.xml
@@ -10,6 +10,7 @@
+
diff --git a/pkg-builder.pl b/pkg-builder.pl
index 038f056..3104aa0 100755
--- a/pkg-builder.pl
+++ b/pkg-builder.pl
@@ -231,6 +231,7 @@ ($)
cpy_file("build/dist/javax.annotation-api-1.2.jar", "$stage_base_dir/opt/zimbra/lib/jars/javax.annotation-api-1.2.jar");
cpy_file("build/dist/apache-jsp-9.4.46.v20220331.jar", "$stage_base_dir/opt/zimbra/lib/jars/apache-jsp-9.4.46.v20220331.jar");
cpy_file("build/dist/UserAgentUtils-1.21.jar", "$stage_base_dir/opt/zimbra/lib/jars/UserAgentUtils-1.21.jar");
+ cpy_file("build/dist/zmlocalconfig", "$stage_base_dir/opt/zimbra/lib/patches/localconfig/zmlocalconfig");
return ["."];
}
@@ -362,7 +363,9 @@ ($)
}
}
}
-
+ if ( $pkg_name =~ "zimbra-common-core-libs" ){
+ push( @cmd, "--pkg-post-install-script=scripts/postinst.sh" );
+ }
push( @cmd, @{ [ map { "--pkg-replaces=$_"; } @{ $pkg_info->{replaces} } ] } ) if ( $pkg_info->{replaces} );
push( @cmd, @{ [ map { "--pkg-depends=$_"; } @{ $pkg_info->{other_deps} } ] } ) if ( $pkg_info->{other_deps} );
push( @cmd, @{ [ map { "--pkg-depends=$_ (>= $PKG_GRAPH{$_}->{version})"; } @{ $pkg_info->{soft_deps} } ] } ) if ( $pkg_info->{soft_deps} );
diff --git a/scripts/postinst.sh b/scripts/postinst.sh
new file mode 100644
index 0000000..652effb
--- /dev/null
+++ b/scripts/postinst.sh
@@ -0,0 +1,4 @@
+if [ -f /opt/zimbra/bin/zmlocalconfig ]; then
+ cp -af /opt/zimbra/lib/patches/localconfig/zmlocalconfig /opt/zimbra/bin/zmlocalconfig
+ chmod 755 /opt/zimbra/bin/zmlocalconfig
+fi