You are not logged in.
The todoist package in the AUR has been recently orphaned. I am considering adopting it, but I have very limited experience with PKGBUILDs (and Go).
This is a Go project, but the instructions provided by the author for building the project look a bit different than usual Go projects.
The currently available PKGBUILD does not work with the new releases of the project. Here is my working PKGBUILD. I would appreciate some feedback.
pkgname=todoist
pkgver=0.10.0
pkgrel=1
pkgdesc="Todoist CLI Client, written in Golang."
arch=('x86_64' 'i686')
url="https://github.com/sachaos/todoist"
license=('MIT')
depends=('glibc')
makedepends=('go' 'git' 'dep')
optdepends=('peco: for zsh functions script')
options=('!strip' '!emptydirs')
source=("https://github.com/sachaos/todoist/archive/v$pkgver.tar.gz")
sha256sums=('e4ad00b64bba61d199de3dff12095fde71bca2b32b8a14ff83189b5cfb2d2e54')
prepare() {
mkdir -p $srcdir/go/src/github.com/sachaos/$pkgname
mv $srcdir/$pkgname-$pkgver/* $srcdir/go/src/github.com/sachaos/$pkgname/
}
build() {
export GOPATH="$srcdir/go"
export PATH="$PATH:$srcdir/go/bin/"
cd $srcdir/go/src/github.com/sachaos/$pkgname
make install
}
package() {
install -Dm755 "$srcdir/go/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
cd "$srcdir/go/src/github.com/sachaos/$pkgname"
install -Dm644 todoist_functions.sh "${pkgdir}/usr/share/todoist/todoist_functions.sh"
mkdir -p $pkgdir/usr/share/licenses/$pkgname
install -m 0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/
}
# vim:set ts=2 sw=2 et:
Last edited by childerico (2018-02-14 13:53:03)
Offline
- You are missing several unquoted "$srcdir" and "$pkgdir"
- You should use a source=() that begins with "$pkgname-$pkgver.tar.gz::", see the warning at https://wiki.archlinux.org/index.php/PKGBUILD#source
- In prepare() you might want to use `ln -sf` instead of `mv`
- You don't really need to specify glibc as a dependency, since it is required by nearly every component of the operating system and any system that does not have glibc is 1) broken, 2) has a broken dependency for bash, coreutils, glibc, pacman, and many other packages in the base group. That being said, there is no rule against it -- this is a bit of a bikeshed argument.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank you! I will fix/improve those points.
Offline
You shouldn't use the name of the software in its description...
https://wiki.archlinux.org/index.php/PKGBUILD#pkgdesc
Offline
@Slithery: I know, but since the package provides just a CLI client for Todoist, it seems reasonable - I think - to specify in the description what service this client allows to access. Do you agree?
BTW, if I had created this package, I would probably have named it todoist-cli. Maybe that would have been a better solution.
Offline