summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsanbikappa2023-08-09 02:18:23 +0800
committersanbikappa2023-08-09 02:18:23 +0800
commit225fe8f5fcf6830548e9245fdcf42ccf39cbccee (patch)
tree0c33e66d79afc5325a6a1536fd961214339d6c75
parent2fc38a19617d7be19ef0f6ede6d27f1b9af71d18 (diff)
downloadaur-225fe8f5fcf6830548e9245fdcf42ccf39cbccee.tar.gz
upstream fixed permission error, remove patches
-rw-r--r--.install9
-rw-r--r--PKGBUILD53
2 files changed, 6 insertions, 56 deletions
diff --git a/.install b/.install
index 11d08f6b50bc..fd51ad2ea0ae 100644
--- a/.install
+++ b/.install
@@ -2,16 +2,9 @@
post_install() {
echo ""
echo "***************************************************************"
- echo "(1) After installed this plugin, please open Krita then go to:"
+ echo "After installed this plugin, please open Krita then go to:"
echo "\"Settings -> Configure Krita -> Python Plugins Manager\""
echo "to enable the plugin."
- echo ""
- echo "(2) Please note that package maintainer changed the"
- echo "PluginDevTools.KritaAPI.*.zip file's path from:"
- echo " \"/usr/share/krita/pykrita/\""
- echo "to:"
- echo " \"~/.cache/krita/\""
- echo "to avoid writing the system path."
echo "***************************************************************"
echo ""
}
diff --git a/PKGBUILD b/PKGBUILD
index 0804585e04c9..9560c9ca2c4f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
# Maintainer: Mikata Riko <sanbikappa@qq.com>
pkgname=krita-plugin-pythonplugindevelopertools-git
-pkgver=r37.46a671a
-pkgrel=3
+pkgver=r40.aed2a21
+pkgrel=1
epoch=
pkgdesc="Python plugin for Krita that assists with making python plugins for Krita"
arch=('any')
@@ -13,59 +13,16 @@ depends=('krita' 'python-pyqt5')
provides=('krita-plugin-pythonplugindevelopertools' 'krita-plugin-pythonplugindevelopertools-bin')
conflicts=('krita-plugin-pythonplugindevelopertools' 'krita-plugin-pythonplugindevelopertools-bin')
install=.install
-source=("$pkgname-$pkgver::git+https://github.com/KnowZero/Krita-PythonPluginDeveloperTools")
+source=("git+https://github.com/KnowZero/Krita-PythonPluginDeveloperTools")
md5sums=('SKIP')
pkgver() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir/Krita-PythonPluginDeveloperTools"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
-append_patch() {
- search="$1"
- old="$2"
- new="$3"
- sedCommand="s|$2|$3|"
- echo old="$2"
- echo new="$3"
- echo "$search" | while read -r line;do
- file="$(echo "$line" | awk '{sub(/:/,"<mySeparator>")}1' | awk '{sub(/:/,"<mySeparator>")}1' | awk -F'<mySeparator>' '{print $1}')"
- line_number="$(echo "$line" | awk '{sub(/:/,"<mySeparator>")}1' | awk '{sub(/:/,"<mySeparator>")}1' | awk -F'<mySeparator>' '{print $2}')"
- line_content="$(echo "$line" | awk '{sub(/:/,"<mySeparator>")}1' | awk '{sub(/:/,"<mySeparator>")}1' | awk -F'<mySeparator>' '{print $3}')"
- line_replace="$(echo "$line_content" | sed "$sedCommand")"
- echo "${line_number}c${line_number}" >> ${file}.patch
- echo "< $line_content" >> ${file}.patch
- echo "---" >> ${file}.patch
- echo "> $line_replace" >> ${file}.patch
- done
-}
-
-prepare() {
- # General users can not download API files to /usr/share/krita/pykrita/ if they do not have sudo permission
- # set the save path of PluginDevTools.KritaAPI.*.zip files to ~/.cache/krita/
-
- rm -f "$srcdir"/*.patch
-
- # create patches
- cd "$srcdir/$pkgname-$pkgver/plugindevtools/PluginDevTools"
- search=$(grep -n os.path.dirname *.py | grep os.path.realpath | grep .KritaAPI. | grep .zip)
- append_patch "$search" 'os.path.dirname(os.path.realpath(__file__))' 'os.path.join(os.path.expanduser("~"),".cache","krita","PluginDevTools")'
-
- search=$(grep -n self.tempFilePath *.py | grep os.path.dirname | grep os.path.realpath | grep .console.temp.py)
- append_patch "$search" 'os.path.dirname(os.path.realpath(__file__))' 'os.path.join(os.path.expanduser("~"),".cache","krita","PluginDevTools")'
-
-
- # patch files
- cd "$srcdir/$pkgname-$pkgver/plugindevtools/PluginDevTools"
- for i in $(ls *.patch);do
- patch ${i%.patch} $i
- done
- mv *.patch $srcdir/
- cd $srcdir
-}
-
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir/Krita-PythonPluginDeveloperTools"
mkdir -p "$pkgdir/usr/share/krita/pykrita/"
cp -r plugindevtools/{PluginDevTools,PluginDevTools.desktop} "$pkgdir/usr/share/krita/pykrita/"