diff --git a/debian/msbuild.install b/debian/msbuild.install index 236fcffb..06eb00e3 100644 --- a/debian/msbuild.install +++ b/debian/msbuild.install @@ -1,5 +1,7 @@ /usr/bin/ -/usr/lib/mono/xbuild/ +/usr/lib/mono/xbuild/Microsoft +/usr/lib/mono/xbuild/Current +/usr/lib/mono/xbuild/*.dll* /usr/lib/mono/msbuild/Current/bin/Sdks/ /usr/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.Build.NuGetSdkResolver /usr/lib/mono/msbuild/Current/bin/*.config diff --git a/debian/msbuild.links b/debian/msbuild.links index 2ecc268c..f9ed22de 100644 --- a/debian/msbuild.links +++ b/debian/msbuild.links @@ -1 +1,2 @@ /usr/lib/mono/msbuild/Current /usr/lib/mono/msbuild/15.0 +/usr/lib/mono/xbuild/Current /usr/lib/mono/xbuild/15.0 diff --git a/debian/msbuild.preinst b/debian/msbuild.preinst new file mode 100755 index 00000000..e7317013 --- /dev/null +++ b/debian/msbuild.preinst @@ -0,0 +1,20 @@ +#!/bin/sh -e + +OLD_XBUILDDIR=/usr/lib/mono/xbuild/15.0 +OLD_MSBUILDDIR=/usr/lib/mono/msbuild/15.0 + +if [ "$1" = "upgrade" -o "$1" = "install" ] ; then + if [ -d "$OLD_XBUILDDIR" -a ! -L "$OLD_XBUILDDIR" ] ; then + echo "Found old XBuild tools directory, moving out of the way" + mv $OLD_XBUILDDIR $OLD_XBUILDDIR.old + fi +fi + +if [ "$1" = "upgrade" -o "$1" = "install" ] ; then + if [ -d "$OLD_MSBUILDDIR" -a ! -L "$OLD_MSBUILDDIR" ] ; then + echo "Found old MSBuild tools directory, moving out of the way" + mv $OLD_MSBUILDDIR $OLD_MSBUILDDIR.old + fi +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index fa07a246..7aa6c1db 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,6 @@ override_dh_auto_build: override_dh_auto_install: HOME=$(TEMP_HOME) ./artifacts/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix=$(DEBIAN_DIR_ABS)/tmp/usr /p:Configuration=Release-MONO /p:IgnoreDiffFailure=true sed -i "s@$(DEBIAN_DIR_ABS)/tmp@@g" debian/tmp/usr/bin/msbuild - sed -i "s@15.0@Current@g" debian/tmp/usr/bin/msbuild find debian/tmp/usr/lib/mono/ -name Microsoft.DiaSymReader.Native.*dll -delete find debian/tmp/usr/lib/mono/ -name *.dylib -delete