diff --git a/make_osx_package.sh b/make_osx_package.sh
index 53687a6d7..4a9f03b95 100755
--- a/make_osx_package.sh
+++ b/make_osx_package.sh
@@ -61,6 +61,8 @@ echo Creating OSX package...
# remove old package first
rm -rf $BASE.pkg
+sed -e "s/PANDOCVERSION/$VERSION/" osx/distribution.xml.in > osx/distribution.xml
+
pkgbuild --root $DIST/pandoc --identifier net.johnmacfarlane.pandoc --version 1.13 --ownership recommended $DIST/pandoc.pkg
productbuild --distribution osx/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-osx.pkg
diff --git a/osx/distribution.xml b/osx/distribution.xml.in
similarity index 97%
rename from osx/distribution.xml
rename to osx/distribution.xml.in
index a92f20ad0..145fc0f21 100644
--- a/osx/distribution.xml
+++ b/osx/distribution.xml.in
@@ -11,7 +11,7 @@
pandoc.pkg