summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Przybyś2020-03-08 10:46:45 +0100
committerMichał Przybyś2020-03-08 10:46:45 +0100
commitcf7f6857d0e7a36daa78572b105660deef1c00f1 (patch)
tree0c6649464d2e20e18a5eb8c313035546df900ae4
parent70b678f46fb08fc40b9e37d45455171973b52ec9 (diff)
downloadaur-cf7f6857d0e7a36daa78572b105660deef1c00f1.tar.gz
Updated pkgrel to 3
* changed from using a binary to compiling the package * changed icon source from url to file from repository * added _sdk variable to PKGBUILD to simplify changing .Net SDK version * added a patch to change configuration path from $HOME/RoslynPad to $XDG_CONFIG_HOME/RoslynPad
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD42
-rw-r--r--config_path.patch25
4 files changed, 64 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06299bd7701..421484a34eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
pkgbase = roslynpad
pkgdesc = A cross-platform C# editor based on Roslyn and AvalonEdit
pkgver = 14.1
- pkgrel = 2
+ pkgrel = 3
url = https://roslynpad.net/
arch = any
license = Apache
+ makedepends = dotnet-sdk-2.2
depends = dotnet-runtime-2.2
depends = desktop-file-utils
- source = https://github.com/aelij/RoslynPad/releases/download/14.1/RoslynPadNetCore.zip
- source = https://github.com/aelij/RoslynPad/raw/master/src/RoslynPad/Resources/RoslynPad.png
+ source = https://github.com/aelij/RoslynPad/archive/14.1.tar.gz
+ source = config_path.patch
source = roslynpad
source = roslynpad.desktop
source = roslynpad.install
- md5sums = 6a9a8acc16eee0e4aeea291e6a90dd2e
- md5sums = 8d0506a92294de1a4d26bec0f009d015
+ md5sums = 93f43b4ca8107a8ba6d940bc6bbdf7e6
+ md5sums = 8fe1f6f59439d1c09a779d10496241e5
md5sums = 2bbafbadd0b5f3d088ce8a248058a06f
md5sums = d6788321c8bf62a8b5198039dbbee2d3
md5sums = a91349cbede88402f0b44728ad9b443f
diff --git a/.gitignore b/.gitignore
index ec0e380cfa1..677c5472aa7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,8 @@
-bin
src
+pkg
RoslynPad.png
RoslynPadNetCore.zip
*.pkg.tar.xz
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 94d110e2c01..065b5c4aea2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,49 @@
# Maintainer: Michał Przybyś <michal@przybys.eu>
+_sdk=2.2
pkgname=roslynpad
pkgver=14.1
-pkgrel=2
+pkgrel=3
pkgdesc='A cross-platform C# editor based on Roslyn and AvalonEdit'
arch=(any)
url='https://roslynpad.net/'
license=(Apache)
-depends=(dotnet-runtime-2.2
+depends=("dotnet-runtime-${_sdk}"
desktop-file-utils)
-source=("https://github.com/aelij/RoslynPad/releases/download/${pkgver}/RoslynPadNetCore.zip"
- https://github.com/aelij/RoslynPad/raw/master/src/RoslynPad/Resources/RoslynPad.png
+makedepends=("dotnet-sdk-${_sdk}")
+source=("https://github.com/aelij/RoslynPad/archive/${pkgver}.tar.gz"
+ config_path.patch
roslynpad
roslynpad.desktop
roslynpad.install)
-md5sums=(6a9a8acc16eee0e4aeea291e6a90dd2e
- 8d0506a92294de1a4d26bec0f009d015
+md5sums=(93f43b4ca8107a8ba6d940bc6bbdf7e6
+ 8fe1f6f59439d1c09a779d10496241e5
2bbafbadd0b5f3d088ce8a248058a06f
d6788321c8bf62a8b5198039dbbee2d3
a91349cbede88402f0b44728ad9b443f)
+prepare() {
+ cd "${srcdir}/RoslynPad-${pkgver}/src"
+ patch -Np1 -i "${srcdir}/config_path.patch"
+}
+
+build() {
+ cd "${srcdir}/RoslynPad-${pkgver}/src"
+ latest_sdk=$(dotnet --list-sdks | sed -E "s/^(${_sdk/./\.}}\.[0-9]+) .*/\1/; t; d" | tail -1)
+ dotnet new globaljson --force --sdk-version "${latest_sdk}"
+
+ cd RoslynPad.NetCore
+ dotnet publish -c Release /p:DebugType=None
+}
+
package() {
- install -dm755 "${pkgdir}"/opt/roslynpad
- cp -aR "${srcdir}"/* "${pkgdir}"/opt/roslynpad/
+ cd "${srcdir}"
+ install -Dm755 roslynpad "${pkgdir}/usr/bin/roslynpad"
+ install -Dm644 roslynpad.desktop "${pkgdir}/usr/share/applications/roslynpad.desktop"
+
+ cd "RoslynPad-${pkgver}/src"
+ install -Dm644 RoslynPad/Resources/RoslynPad.svg "${pkgdir}/usr/share/pixmaps/roslynpad.svg"
- install -Dm755 roslynpad "${pkgdir}"/usr/bin/roslynpad
- install -Dm644 RoslynPad.png "${pkgdir}"/usr/share/pixmaps/roslynpad.png
- install -Dm644 roslynpad.desktop "${pkgdir}"/usr/share/applications/roslynpad.desktop
+ cd "RoslynPad.NetCore/bin/Release/netcoreapp${_sdk}/publish"
+ install -dm755 "${pkgdir}/opt/roslynpad"
+ cp -aR * "${pkgdir}/opt/roslynpad"
}
diff --git a/config_path.patch b/config_path.patch
new file mode 100644
index 00000000000..f70b3ce32ed
--- /dev/null
+++ b/config_path.patch
@@ -0,0 +1,25 @@
+diff -ur src.orig/RoslynPad.Common.UI/ViewModels/MainViewModelBase.cs src/RoslynPad.Common.UI/ViewModels/MainViewModelBase.cs
+--- src.orig/RoslynPad.Common.UI/ViewModels/MainViewModelBase.cs 2020-03-08 10:34:16.955919485 +0100
++++ src/RoslynPad.Common.UI/ViewModels/MainViewModelBase.cs 2020-03-08 10:36:26.631248084 +0100
+@@ -269,7 +269,13 @@
+ }
+ else // Unix or Mac
+ {
+- documentsPath = Environment.GetEnvironmentVariable("HOME");
++ documentsPath = Environment.GetEnvironmentVariable("XDG_CONFIG_HOME");
++ if (documentsPath == null) {
++ string? homePath = Environment.GetEnvironmentVariable("HOME");
++ if (homePath != null) {
++ documentsPath = Path.Combine(homePath, ".config");
++ }
++ }
+ }
+
+ if (string.IsNullOrEmpty(documentsPath))
+@@ -782,4 +788,4 @@
+
+ #endregion
+ }
+-}
+\ No newline at end of file
++}