summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordetiam2023-06-14 09:56:31 +0800
committerdetiam2023-06-14 09:56:31 +0800
commit80d6f913a2cccadfce5401aa5f38f1f209b461de (patch)
treea2b97b77e47e3c51bb692c91721af60e03c34793
parentc4b13b8cb9b064596bb26dc0c80a7bf1efdbc0d7 (diff)
downloadaur-80d6f913a2cccadfce5401aa5f38f1f209b461de.tar.gz
fix: failed to start
- use depends inside install_pince.sh - install libscanmem by the functions inside install_pince.sh - fixed "Please run "sh install_pince.sh" message
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD80
3 files changed, 65 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aaa7e56f271b..ade8394249ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,18 @@
pkgbase = pince-git
pkgdesc = A Linux reverse engineering tool inspired by Cheat Engine.
- pkgver = r1232.c732e61
+ pkgver = r1277.53022ff
pkgrel = 1
url = https://github.com/korcankaraokcu/PINCE
arch = any
license = GPL3
- depends = python
- depends = python-pexpect
- depends = python-psutil
- depends = python-pyqt6
- depends = python-distorm
- depends = python-pygdbmi
- depends = python-gobject
- depends = python-keyboard
- depends = gdb
- depends = sudo
- makedepends = git
- makedepends = intltool
+ makedepends = git
+ makedepends = intltool
+ depends = base-devel
source = pince-git::git+https://github.com/korcankaraokcu/PINCE.git
md5sums = SKIP
pkgname = pince-git
-
+ depends = base-devel
+ depends = python-distorm
+ depends = python-gobject
+ depends = python-pince-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fd7d127e6182
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.SRCINFO
+!.PKGBUILD
+!.gitignore \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 43f877bbc43e..a4ab956d9f47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,73 @@
# Maintainer: Jakob Kreuze <jakob@memeware.net>
# Contributor: Bader <Bad3r@unsigned.sh>
+# Contributor: detiam <dehe_tian at outlook dot com>
+
+# shellcheck disable=SC1090
+# shellcheck disable=SC2206
pkgname=pince-git
-pkgver=r1222.9db33c3
+pkgver=r1277.53022ff
pkgrel=1
pkgdesc="A Linux reverse engineering tool inspired by Cheat Engine."
arch=('any')
url="https://github.com/korcankaraokcu/PINCE"
license=('GPL3')
-depends=('python' 'python-pexpect' 'python-psutil' 'python-pyqt6' 'python-distorm' 'python-pygdbmi' 'python-gobject' 'python-keyboard' 'gdb' 'sudo')
+depends=('base-devel') # follow upstream, set this later
makedepends=('git' 'intltool')
-source=("$pkgname::git+https://github.com/korcankaraokcu/PINCE.git")
+source=("$pkgname::git+$url.git")
md5sums=('SKIP')
+_installpath='usr/share/PINCE'
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-package() {
- cd "$srcdir/$pkgname"
-
- # Compile and copy libscanmem dependencies.
- git submodule update --init --recursive
- mkdir -p libpince/libscanmem
-
- cd scanmem
- sh autogen.sh
- ./configure --prefix="$pkgdir/usr"
- make libscanmem.la
- cp --preserve .libs/libscanmem.so ../libpince/libscanmem/libscanmem.so
- cp --preserve gui/scanmem.py ../libpince/libscanmem
- cp --preserve gui/misc.py ../libpince/libscanmem
- cd ..
+prepare() {
+ # Remove ".venv/PINCE" exist check
+ sed -i '/^if \[ ! -d "\.venv\/PINCE" \]; /,/activate$/ s/^/# /' "./$pkgname/PINCE.sh"
+ # Create a simple start script
+ cat >pince<< \
+EOF
+pushd /$_installpath
+sh PINCE.sh "$@"
+popd
+EOF
+}
- sed -i 's/import misc/from \. import misc/g' libpince/libscanmem/scanmem.py
- sed -i 's/\.\/gdb_pince\/gdb.*\/bin\/gdb/\/usr\/bin\/gdb/g' libpince/type_defs.py
- sed -i 's/\ssudo/cd \/usr\/share\/PINCE \&\& sudo/' PINCE.sh
- sed -i 's/\sgksudo/cd \/usr\/share\/PINCE \&\& gksudo/' PINCE.sh
- sed -i 's/OS=.*/OS="Arch"/' PINCE.sh
+build() {
+ pushd "$pkgname"
+ # Source libscanmem installation functions
+ . <(sed -n '/^compile_scanmem() /,/^}/p' install_pince.sh)
+ . <(sed -n '/^install_scanmem() /,/^}/p' install_pince.sh)
+ . <(sed -n '/^exit_on_error() /,/^}/p' install_pince.sh)
+ # Run functions
+ install_scanmem || exit_on_error
+ popd
+}
+package() {
+ pushd "$pkgname"
+ # Source PKG_NAMES* vars
+ . <(sed -n '/^PKG_NAMES/p' install_pince.sh)
+ # Set new depends
+ depends+=($PKG_NAMES_ARCH)
+ for pkg in $PKG_NAMES_PIP; do
+ ## why archlinux python package isn't just match "python-$pkg" format?
+ ## and one of these depends in aur are outdated now 2023/05/08
+ if [ "$pkg" == "distorm3" ]; then
+ depends+=("python-distorm")
+ elif [ "$pkg" == "pygobject" ]; then
+ depends+=("python-gobject")
+ else
+ depends+=("python-$pkg")
+ fi
+ done
+ # Copy files
install -d "$pkgdir/usr/bin"
- install PINCE.sh "$pkgdir/usr/bin/pince"
- install -d "$pkgdir/usr/share/PINCE"
- install PINCE.py COPYING AUTHORS THANKS "$pkgdir/usr/share/PINCE"
- cp -r GUI libpince media "$pkgdir/usr/share/PINCE"
+ install -Dm755 ../pince "$pkgdir/usr/bin"
+ install -d "$pkgdir/$_installpath"
+ install PINCE.sh PINCE.py \
+ COPYING COPYING.CC-BY AUTHORS THANKS "$pkgdir/$_installpath"
+ cp -r GUI libpince media "$pkgdir/$_installpath"
+ popd
}