diff options
author | DelightedCat | 2021-06-06 13:26:08 +0200 |
---|---|---|
committer | DelightedCat | 2021-06-06 13:27:30 +0200 |
commit | 6a8c4560f40eb5214b77ee010034058310b2a311 (patch) | |
tree | 9da5879c42ef6c5c6fed11455d1432a1bb6306fa | |
parent | 5f7b09886bafd2379f34a8ca14b1e572c521e08b (diff) | |
download | aur-6a8c4560f40eb5214b77ee010034058310b2a311.tar.gz |
Fix mgcb search path and update since repository changes
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | mgcb-editor.desktop | 14 | ||||
-rw-r--r-- | mgcb-search-path.diff | 12 |
5 files changed, 58 insertions, 40 deletions
@@ -1,14 +1,12 @@ pkgbase = mgcb-editor-git - pkgdesc = The MonoGame Content Pipeline tool + pkgdesc = Creates platform specific content files. pkgver = 3.8.0 - pkgrel = 2 + pkgrel = 3 url = https://www.monogame.net/ arch = x86_64 license = custom - makedepends = git makedepends = dotnet-sdk-3.1 - depends = git - depends = dotnet-sdk-3.1 + makedepends = dotnet-sdk-5.0 + depends = dotnet-runtime-5.0 pkgname = mgcb-editor-git - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..6cfda8426b14 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +pkg/ +src/ +mgcb-editor-git*.zst @@ -2,44 +2,63 @@ pkgname=mgcb-editor-git pkgver=3.8.0 -pkgrel=2 -pkgdesc="The MonoGame Content Pipeline tool" +pkgrel=3 +pkgdesc="Creates platform specific content files." arch=('x86_64') url="https://www.monogame.net/" license=('custom') -depends=('git' 'dotnet-sdk-3.1') -makedepends=('git' 'dotnet-sdk-3.1') +depends=("dotnet-runtime-5.0") +makedepends=('dotnet-sdk-3.1' 'dotnet-sdk-5.0') prepare() { - cd $srcdir - git clone --recursive https://github.com/MonoGame/MonoGame.git + # Using the "official" way of including a source does not work for MonoGame... + # The workaround is to clone the repository in prepare() + if [ ! -d $srcdir/MonoGame ]; then + git clone --recursive https://github.com/MonoGame/MonoGame.git + else + cd $srcdir/MonoGame + git submodule update + fi + + cd $srcdir/MonoGame + git reset --hard + + # Apply the patch to make sure the tool will pick up the mgcb.dll file + git apply ../../mgcb-search-path.diff } build() { cd $srcdir/MonoGame + dotnet tool restore dotnet cake - - - - - #cd $srcdir/MonoGame/Tools/MonoGame.Content.Builder.Editor - #dotnet restore MonoGame.Content.Builder.Editor.Linux.csproj - #dotnet build MonoGame.Content.Builder.Editor.Linux.csproj -c Release } package() { - cd $srcdir/MonoGame/Artifacts/MonoGame.Content.Builder.Editor/Launcher/Release + cd $srcdir/MonoGame/Artifacts/MonoGame.Content.Builder.Editor.Launcher/Release/publish + # Copy the binary output to the right directory mkdir -p $pkgdir/opt/mgcb-editor cp -r * $pkgdir/opt/mgcb-editor - cd $pkgdir/opt/mgcb-editor/Content + # Copy the .desktop file to the right location + mkdir -p $pkgdir/usr/share/applications/ + cp $pkgdir/opt/mgcb-editor/mgcb-editor-linux/mgcb-editor.desktop $pkgdir/usr/share/applications/ + + # Replace the .desktop placeholders to the correct binary + sed -i 's/{Exec}/\/opt\/mgcb-editor\/mgcb-editor/' $pkgdir/usr/share/applications/mgcb-editor.desktop + sed -i 's/{TryExec}/\/opt\/mgcb-editor\/mgcb-editor/' $pkgdir/usr/share/applications/mgcb-editor.desktop + # Copy the icon file to /usr/share + mkdir -p $pkgdir/usr/share/icons + cp $pkgdir/opt/mgcb-editor/mgcb-editor-linux/monogame.svg $pkgdir/usr/share/icons + + # Copy the mime type definition to /usr/share mkdir -p $pkgdir/usr/share/mime/text - cp x-mgcb.xml $pkgdir/usr/share/mime/text - - cd $srcdir/.. + cp $pkgdir/opt/mgcb-editor/mgcb-editor-linux/x-mgcb.xml $pkgdir/usr/share/mime/text + + cd $srcdir/MonoGame/Artifacts/MonoGame.Content.Builder/Release/publish - mkdir -p $pkgdir/usr/share/applications - cp mgcb-editor.desktop $pkgdir/usr/share/applications + # Copy the mgcb binaries to the correct location + mkdir -p $pkgdir/opt/mgcb-editor/mgcb + cp -r * $pkgdir/opt/mgcb-editor/mgcb } diff --git a/mgcb-editor.desktop b/mgcb-editor.desktop deleted file mode 100644 index 529c90dfa12b..000000000000 --- a/mgcb-editor.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=MGCB Editor -GenericName=MGCB Editor -Comment=Creates platform specific content files. -Exec=/opt/mgcb-editor/mgcb-editor-gtk -Icon=/opt/mgcb-editor/Content/monogame.svg -StartupNotify=true -Terminal=false -Type=Application -MimeType=text/x-mgcb; -Categories=Development; -StartupWMClass=mgcb-editor-gtk diff --git a/mgcb-search-path.diff b/mgcb-search-path.diff new file mode 100644 index 000000000000..44d0ace3504d --- /dev/null +++ b/mgcb-search-path.diff @@ -0,0 +1,12 @@ +diff --git a/Tools/MonoGame.Content.Builder.Editor/Common/PipelineController.cs b/Tools/MonoGame.Content.Builder.Editor/Common/PipelineController.cs +index da61cd0fb..7ea4ec277 100644 +--- a/Tools/MonoGame.Content.Builder.Editor/Common/PipelineController.cs ++++ b/Tools/MonoGame.Content.Builder.Editor/Common/PipelineController.cs +@@ -37,6 +37,7 @@ namespace MonoGame.Tools.Pipeline + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "../../../MonoGame.Content.Builder/Release"), + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "../../../../../../MonoGame.Content.Builder/Release"), + #endif ++ "/opt/mgcb-editor/mgcb" + }; + + public IEnumerable<ContentItemTemplate> Templates |