You are not logged in.
This plasmoid is related to the existing AUR package nordpy. I am not the maintainer of that package nor the creator of this plasmoid. I just wish to submit this PKGBUILD to the AUR. It will be my first. Do I need permission from the person who created this (morpheusthewhite)?
I started with the source from https://github.com/morpheusthewhite/nordpy-plasmoid. It includes this build.sh file:
$ cat build.sh
#!/bin/sh
echo "Building and installing plugin"
mkdir -p plugin/build
cd plugin/build
qmake .. && make && sudo make install || { echo "Failed building plugin"; exit 1; }
echo "Building and installing plasmoid"
cd ../..
mkdir -p build
cd build
cmake .. && make && sudo make install || { echo "Failed building plasmoid"; exit 1; }
I attempted to translate that into a PKGBUILD, but I am getting this error. It appears I don't have directories correct.
==> Starting build()...
/startdir/PKGBUILD: line 29: qmake: command not found
CMake Error: The source directory "/build/nordpy-plasmoid/src/nordpy-plasmoid" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /mnt/chroots/arch/myrepo/myruser/build
I don't understand the solution because I don't use qmake and I have zero experience with CMakeLists.txt files. But I can guess the solution is to fix the directories in my PKGBUILD somehow.
The current directory tree:
$ tree .
.
├── build.sh
├── CMakeLists.txt
├── icons
│ ├── CMakeLists.txt
│ └── sc-apps-nordvpn.svgz
├── LICENSE
├── nordpy-plasmoid.git
├── nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst.sig
├── package
│ ├── contents
│ │ ├── images
│ │ │ └── nordvpn.png
│ │ ├── screenshot.png
│ │ ├── scripts
│ │ │ └── utils.mjs
│ │ └── ui
│ │ └── main.qml
│ └── metadata.desktop
├── PKGBUILD
├── plugin
│ ├── nordpyconnectionmanager.cpp
│ ├── nordpyconnectionmanager.h
│ ├── nordpy_plugin.cpp
│ ├── nordpy_plugin.h
│ ├── plugin.pro
│ └── qmldir
└── README.md
7 directories, 20 files
My PKGBUILD (produces the error above):
# Maintainer: morpheusthewhite <zffromGerace@hotmail.it>
# Contributor: MountainX
pkgname=nordpy-plasmoid
pkgver=r10.ec6491c
pkgrel=1
pkgdesc="Plasma widget to control NordPy; it uses the last server type used within the application to establish the VPN connection."
arch=('any')
url="https://github.com/morpheusthewhite/nordpy-plasmoid.git"
license=('GPL')
depends=('polkit' 'nordpy' 'extra-cmake-modules')
makedepends=('git' 'extra-cmake-modules')
source=("https://github.com/morpheusthewhite/nordpy-plasmoid.git")
sha256sums=('SKIP')
# pkgver() {
# cd "$srcdir/${pkgname}"
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
# }
prepare() {
mkdir -p "$srcdir/${pkgname}/build"
mkdir -p "$srcdir/${pkgname}/plugin/build"
}
build() {
# "Building and installing plugin"
cd "$srcdir/${pkgname}/plugin/build"
qmake .. && make # && sudo make install
# "Building and installing plasmoid"
cd "$srcdir/${pkgname}/build"
cmake .. && make # && sudo make install
}
package() {
cd "$srcdir/${pkgname}/plugin/build"
make DESTDIR="$pkgdir" install
cd "$srcdir/${pkgname}/build"
make DESTDIR="$pkgdir" install
}
Last edited by MountainX (2020-11-01 21:43:52)
Offline
You do not understand the following?
/startdir/PKGBUILD: line 29: qmake: command not found
Missing git+ so no source will be present.
source=("https://github.com/morpheusthewhite/nordpy-plasmoid.git")
Last edited by loqs (2020-10-30 19:05:11)
Offline
You do not understand the following?
/startdir/PKGBUILD: line 29: qmake: command not found
Not exactly... do I need to add a package that provides qmake to the makedepends? (I'm not a developer.)
Missing git+ so no source will be present.
source=("https://github.com/morpheusthewhite/nordpy-plasmoid.git")
should it be this?
source=("${pkgname}::git+https://github.com/bit-shift-io/audiobook.git")
or this?
source=("git+https://github.com/bit-shift-io/audiobook.git")
Offline
loqs wrote:You do not understand the following?
/startdir/PKGBUILD: line 29: qmake: command not found
Not exactly... do I need to add a package that provides qmake to the makedepends? (I'm not a developer.)
Yes
loqs wrote:Missing git+ so no source will be present.
source=("https://github.com/morpheusthewhite/nordpy-plasmoid.git")
should it be this?
source=("${pkgname}::git+https://github.com/bit-shift-io/audiobook.git")
or this?
source=("git+https://github.com/bit-shift-io/audiobook.git")
source=("git+https://github.com/morpheusthewhite/nordpy-plasmoid.git")
As the following makes no difference when the pkgname already matches the git repository name
pkgname=nordpy-plasmoid
source=("${pkgname}::git+https://github.com/morpheusthewhite/nordpy-plasmoid.git")
Edit:
# Maintainer: morpheusthewhite <zffromGerace@hotmail.it>
# Contributor: MountainX
pkgname=nordpy-plasmoid
pkgver=r10.ec6491c
pkgrel=1
pkgdesc="Plasma widget to control NordPy; it uses the last server type used within the application to establish the VPN connection."
arch=('x86_64')
url="https://github.com/morpheusthewhite/nordpy-plasmoid.git"
license=('GPL3')
depends=('polkit' 'nordpy' 'qt5-base' 'qt5-declarative' 'plasma-framework')
makedepends=('git' 'extra-cmake-modules')
source=("git+https://github.com/morpheusthewhite/nordpy-plasmoid.git")
sha256sums=('SKIP')
pkgver() {
cd $pkgname
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
# "Building and installing plugin"
qmake $pkgname/plugin -o build-plugin/Makefile
make -C build-plugin
# "Building and installing plasmoid"
cmake -B build $pkgname
make -C build
}
package() {
make -C build-plugin INSTALL_ROOT="$pkgdir" install
make -C build DESTDIR="$pkgdir" install
}
CMake_package_guidelines
Makepkg#Specifying_install_directory_for_QMAKE_based_packages
Last edited by loqs (2020-10-30 20:31:51)
Offline
Thank you. That package is qt5-base. It turns out I also needed to add plasma-framework as a makedepends because of this:
CMake Error at CMakeLists.txt:8 (find_package):
By not providing "FindKF5Plasma.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"KF5Plasma", but CMake did not find one.
(I will show the full CMakeLists.txt below.)
Here is my updated PKGBUILD (still not error-free).
pkgname=nordpy-plasmoid
pkgver=r10.ec6491c
pkgrel=1
pkgdesc="Plasma widget to control NordPy; it uses the last server type used within the application to establish the VPN connection."
arch=('any')
url="https://github.com/morpheusthewhite/nordpy-plasmoid.git"
license=('GPL')
depends=('polkit' 'nordpy')
makedepends=('git' 'extra-cmake-modules' 'plasma-framework' 'qt5-tools' 'qt5-base')
source=("git+https://github.com/morpheusthewhite/nordpy-plasmoid.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
mkdir -p "$srcdir/${pkgname}/build"
mkdir -p "$srcdir/${pkgname}/plugin/build"
}
build() {
# "Building and installing plugin"
cd "$srcdir/${pkgname}/plugin/build"
qmake .. && make
# "Building and installing plasmoid"
cd "$srcdir/${pkgname}/build"
cmake .. && make
}
package() {
cd "$srcdir/${pkgname}/plugin/build"
make DESTDIR="$pkgdir" install
cd "$srcdir/${pkgname}/build"
make DESTDIR="$pkgdir" install
}
contents of CMakeLists.txt:
cmake_minimum_required(VERSION 3.0)
project(nordpy)
find_package(ECM 1.4.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(KF5Plasma REQUIRED)
plasma_install_package(package org.kde.nordpy)
add_subdirectory(icons)
... and now I get this error:
==> Entering fakeroot environment...
==> Starting package()...
mkdir: cannot create directory ‘/usr/lib/qt/qml/org/kde/private/nordpy’: Permission denied
make: *** [Makefile:658: install_target] Error 1
==> ERROR: A failure occurred in package().
Aborting...
==> ERROR: Build failed, check /mnt/chroots/arch/myrepo/myuser/build
pkgver=r10.ec6491c
/path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst
ERROR: /path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst not found. Is there a version problem?
ls: cannot access 'nordpy-plasmoid*.pkg.tar.zst': No such file or directory
namcap -i /path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst:
Error: Problem reading /path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst
Usage: /usr/lib/python3.8/site-packages/namcap.py [OPTIONS] packages
Options are:
-L, --list : list available rules
-i : prints information (debug) responses from rules
-m : makes the output parseable (machine-readable)
-e rulelist, --exclude=rulelist : don't apply RULELIST rules to the package
-r rulelist, --rules=rulelist : only apply RULELIST rules to the package
-t tags : use a custom tag file
-v version : print version and exit
gpg: can't open '/path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst': No such file or directory
gpg: signing failed: No such file or directory
stat: cannot statx '/path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst': No such file or directory
gpg: WARNING: no command supplied. Trying to guess what you mean ...
gpg: processing message failed: Unknown system error
repo add /path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst:
==> Verifying database signature...
gpg: assuming signed data in '/path/to/myrepo//myrepo.db.tar.zst'
gpg: Signature made Thu 29 Oct 2020 09:30:57 PM EDT
gpg: using RSA key ZYZ
gpg: Good signature from "MountainX" [ultimate]
-> Database signature file verified.
==> Extracting myrepo.db.tar.zst to a temporary location...
==> Verifying database signature...
gpg: assuming signed data in '/path/to/myrepo//myrepo.files.tar.zst'
gpg: Signature made Thu 29 Oct 2020 09:30:57 PM EDT
gpg: using RSA key XYZ
gpg: Good signature from "MountainX" [ultimate]
-> Database signature file verified.
==> Extracting myrepo.files.tar.zst to a temporary location...
==> ERROR: File '/path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst' not found.
==> No packages modified, nothing to do.
cp: cannot stat '/path/to/packages/myrepo/nordpy-plasmoid/nordpy-plasmoid-r10.ec6491c-1-any.pkg.tar.zst': No such file or directory
Is the permissions problem at ‘/usr/lib/qt/qml/org/kde/private/nordpy’ due to my error? Or is there something wrong with the source install instructions (such as maybe this line in CMakeLists.txt: plasma_install_package(package org.kde.nordpy)? I have nordpy listed as a dependency in the PKGBUILD, so I'm not sure it needs to be listed in CMakeLists.txt, does it?
Last edited by MountainX (2020-10-30 21:28:46)
Offline
See My edit to post #4 and the link to specifying the install directory for qmake.
Offline
See My edit to post #4 and the link to specifying the install directory for qmake.
Thank you. I really appreciate your help. I had read both of those links but I also need to learn more about "make". I learned a lot from seeing what you did.
Last edited by MountainX (2020-10-30 21:44:34)
Offline
This is available here now: https://aur.archlinux.org/packages/nordpy-plasmoid-git/
Offline
I cannot build the package from the AUR now... here is what happened:
I submitted the PKGBUILD we created in this thread to the maintainer of nordpy-plasmoid and he published it on the AUR at https://aur.archlinux.org/packages/nordpy-plasmoid-git.
I had tested the PKGBUILD on my system and was able to build it in a clean chroot. The main difference is that he named the package "nordpy-plasmoid-git" whereas in my testing I had been using the pkgname "nordpy-plasmoid". (He also added "groups=()" but I assume that is inconsequential.)
The error is:
==> Retrieving sources...
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Creating working copy of nordpy-plasmoid git repo...
Cloning into 'nordpy-plasmoid'...
done.
==> Starting build()...
Cannot find file: nordpy-plasmoid-git/plugin.
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /mnt/chroots/arch/aurds/computeruser/build
However, if I change the pkgname in his PKGBUILD from:
pkgname=nordpy-plasmoid-git
to:
pkgname=nordpy-plasmoid
I can build the package again. I know this must be a stupid question, but what is the proper solution? I assume he can't/won't rename his github repo. I also assume the proper name for the package in AUR is the name he used (nordpy-plasmoid-git).
Offline
You need to cd "$srcdir/${pkgname%-git}"
BTW the person who changed the pkgname should have verified it still worked...
Last edited by eschwartz (2020-11-01 21:24:54)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
You need to cd "$srcdir/${pkgname%-git}"
Thank you. That's simple.
BTW the person who changed the pkgname should have verified it still worked...
Yes, but since he developed the package, I don't mind contributing this small effort to get it on the AUR. Also, it helps me learn.
EDIT: the working PKGBUILD:
pkgname=nordpy-plasmoid-git
pkgver=r10.ec6491c
pkgrel=1
pkgdesc="Plasma widget to control NordPy; it uses the last server type used within nordpy to establish the VPN connection."
arch=('x86_64')
url="https://github.com/morpheusthewhite/nordpy-plasmoid.git"
license=('GPL3')
groups=()
depends=('polkit' 'nordpy' 'qt5-base' 'qt5-declarative' 'plasma-framework')
makedepends=('git' 'extra-cmake-modules')
source=("git+https://github.com/morpheusthewhite/nordpy-plasmoid.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
# "Building and installing plugin"
qmake ${pkgname%-git}/plugin -o build-plugin/Makefile
make -C build-plugin
# "Building and installing plasmoid"
cmake -B build ${pkgname%-git}
make -C build
}
package() {
make -C build-plugin INSTALL_ROOT="$pkgdir" install
make -C build DESTDIR="$pkgdir" install
}
Last edited by MountainX (2020-11-01 21:36:34)
Offline