summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEloy García Almadén2021-02-20 09:50:31 +0100
committerEloy García Almadén2021-02-20 09:50:31 +0100
commit3fb861ec353578fe1d3e05cc25f284b48c111ad2 (patch)
treec6c9db4da44b748e0ce8870677af1b4324d0f3ba
parent7ea64740a2afd12e5d7760b99c8a609cc05e7475 (diff)
downloadaur-3fb861ec353578fe1d3e05cc25f284b48c111ad2.tar.gz
Thanks to Solomon Choina and Grey Christoforo feedback, PKBUILD has been fixed. sudo command is not used anymore
-rw-r--r--PKGBUILD24
1 files changed, 16 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6d5506dc28ea..28a3fa12e727 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: Eloy Garcia Almaden <eloy.garcia.pca@gmail.com>
pkgname=buttermanager
pkgver=2.3
-pkgrel=1
+pkgrel=2
epoch=
pkgdesc="Graphical tool to create BTRFS snapshots, balance filesystems and upgrade the system safetly"
arch=('x86_64')
url="https://github.com/egara/buttermanager"
license=('GPL')
groups=()
-depends=('btrfs-progs' 'python>=3' 'grub-btrfs' 'python-setuptools')
+depends=('btrfs-progs' 'python>=3' 'grub-btrfs' 'python-setuptools' 'python-pyaml' 'python-pyqt5')
makedepends=('python>=3' 'git')
checkdepends=()
optdepends=()
@@ -19,11 +19,19 @@ backup=()
options=()
install=
changelog=
-source=('git+https://github.com/egara/buttermanager#branch=master')
+# Local source if user wants to build the package locally once the git repo has been cloned
+source=('git+file:///home/egarcia/buttermanager')
+# Remote source
+# source=('git+https://github.com/egara/buttermanager#branch=master')
noextract=()
md5sums=('SKIP')
validpgpkeys=()
+build() {
+ cd "$pkgname"
+ python setup.py build
+}
+
package() {
cd "$pkgname"
# Creating destination directory
@@ -31,13 +39,13 @@ package() {
# Installing ButterManager using python-setuptools
echo -e "\n Installing ButterManager. Please wait..."
- sudo python setup.py install
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+ # Copying bm_main.py
+ install -Dm644 "$srcdir/$pkgname/$pkgname/bm_main.py" "${pkgdir}/$(python -c "import site; print(site.getsitepackages()[0])")/$pkgname/bm_main.py"
# Copying .desktop file and icon
- echo -e \n "Creating desktop icon. Finishing the installation"
+ echo -e "\n Creating desktop icon. Finishing the installation"
install -Dm644 "$srcdir/$pkgname/packaging/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$srcdir/$pkgname/packaging/$pkgname.svg" "$pkgdir/opt/$pkgname/gui/$pkgname.svg"
-
- # Removing compiled files with root privileges
- sudo rm -rf "$srcdir/$pkgname/"
}