You are not logged in.
Hello everyone,
After a week on Arch, this is my first PKGBUILD, thank you very much in advance for your help :
https://github.com/ChinaskiJr/vpndemon-cli-aur
Last edited by ChinaskiJr (2019-02-02 09:59:01)
Offline
Some points I noticed:
* you got a couple of implicit dependencies that are not needed (i.e. 'dbus' and 'openvpn')
* bash is not really needed in makedepends since it is assumed for builders to have base-devel installed and pacman depends on bash anyway (and so do other core parts of arch).
* the source array should hold a Release URL, not the master branch. Also it should be named $pkgname-$pkgver (so people who set SRCDEST don't get into trouble). For an example look at https://git.archlinux.org/svntogit/comm … ages/piper
* you only need one shasum array. Either drop sha256sums or sha512sums.
* you don't need all those mkdir/cp/mv in package(), install can do all that for you:
package() {
install -D -m755 "${srcdir}/vpndemon-cli-master/vpndemon-cli.sh" "${pkgdir}/usr/bin/vpndeom-cli"
}
Also, your project is not really properly licensed, neither is the upstream project. I'd suggest adding a LICENSE file to the project. Github can create the template for you!
Offline
Welcome to the forums ChinaskiJr
A couple of points to get you started...
The source URL is incorrect. As you are building a specific version you need to specify this otherwise you'll be pulling from git master instead.
Also read this.
source=("$pkgname-$pkgver.zip::$url/archive/v$pkgver.zip")
You don't need both checksums. You can remove sha256sums.
Why do you have bash listed as a makedepend?
You haven't provided the correct license...
https://wiki.archlinux.org/index.php/PKGBUILD#license
Your entire package function can be replaced by one line...
man install
Offline
Hello guys,
Thank you both for your answers !
I updated the repository with your recommendations. I just only have one last question, it's about the dependencies :
* you got a couple of implicit dependencies that are not needed (i.e. 'dbus' and 'openvpn')
I now understand well for openvpn and networkmanager-openvpn, but what about dbus ? Do you mean the dependency is not needed because it's part of the Arch core as a dependency of systemd ?
Offline
* bash is not really needed in makedepends since it is assumed for builders to have base-devel installed
Bash is not in base-devel.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
It is transitively, though pacman and probably others.
Offline
Eh, no. The second half of the statement, which I did not quote, indicates correctly that bash is required by pacman and thus would already be installed. But this was in addition to the statement that I quoted and responded to that bash would already be installed because it is in base-devel. It is not.
It may be logical to assume that bash would already be installed for other reasons, but then those other reasons should stand on their own, not be an after-thought to a false premise.
Last edited by Trilby (2019-02-01 21:34:15)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I now understand well for openvpn and networkmanager-openvpn, but what about dbus ? Do you mean the dependency is not needed because it's part of the Arch core as a dependency of systemd ?
You could logically assume that systemd is installed, but NetworkManager actually has a dependency chain that leads to dbus.
networkmanager -> polkit -> systemd -> dbus
It may be logical to assume that bash would already be installed for other reasons, but then those other reasons should stand on their own, not be an after-thought to a false premise.
I see your point, I tried to cram two things into one sentence and it kinda ruined it all. I should have made a separate sentence for the last part
Offline
Eh, no. The second half of the statement, which I did not quote, indicates correctly that bash is required by pacman and thus would already be installed. But this was in addition to the statement that I quoted and responded to that bash would already be installed because it is in base-devel. It is not.
Pacman is in base-devel. Pacman depends on bash. Hence, bash is in base-devel transitively, as I said.
Offline
Ok then, thank you very much for all your help. I'm going to submit this to the AUR now.
Bye !
Offline