You are not logged in.
Hello, this is my first PKGBUILD so I would like to get some reviews from other archers. Should I change something?
#
pkgname=anonsurf
pkgver=2.0
pkgrel=1
pkgdesc="A script from ParrotSec that provides a strong system-wide anonymization module"
arch=(any)
url="https://www.parrotsec.org"
license=('GPL')
depends=('tor' 'iptables')
provides=('anonsurf')
conflicts=('anonsurf')
source=("http://downloads.sourceforge.net/project/aur-anonsurf/aur-anonsurf/anonsurf.tar?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Faur-anonsurf%2Ffiles%2Faur-anonsurf%2F&ts=1465421554&use_mirror=master")
md5sums=(901b5aa3848cd442269873e265699222)
package() {
cd $pkgname
mkdir $pkgdir/usr && mkdir $pkgdir/usr/share && mkdir $pkgdir/usr/share/$pkgname && mkdir $pkgdir/usr/bin
mv * $pkgdir/usr/share/$pkgname/
ln -s /usr/share/anonsurf/anonsurf.sh $pkgdir/usr/bin/anonsurf
}
Last edited by Loen (2016-06-09 20:42:38)
Offline
There's no reason to list the pkgname in "conflicts" and "provides"
That source url seems fishy. Why is it aur-anonsurf?
Your mkdir command would be much simpler with mkdir -p, or install -d. Really, you only need to run the command once, not 4 times.
You should not be changing things in $srcdir in the package function. Copy/install instead of move.
You should quote all paths that use variables you don't control, such as $pkgdir. You don't know if it contains a space or not.
Kind of nit-picky, but all of your array entries are quoted except in the architecture array. They should be consistent.
Offline
Okay, so... i tried to rewrite package(), maybe now it's better?
package() {
install -dm755 $pkgdir/usr/share/$pkgname
cp -rf $pkgname/* $pkgdir/usr/share/$pkgname/
mkdir $pkgdir/usr/bin
ln -s /usr/share/anonsurf/anonsurf.sh $pkgdir/usr/bin/anonsurf
}
Offline
Much better, except for the quoting. You could also combine the third line into the first if you'd like, install can take multiple arguments.
Offline
And for the source link: anonsurf is a script coming from ParrotSec OS and configured for their distro, so i had to modify some little things to make it work on arch. So i created a new tar archive and i uploaded it on sourceforge.
Offline
Loen,
typical solution for such things is to use the original source and modifiy that in the PKGBUILD prepare() function .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline