You are not logged in.

#1 2016-03-13 19:49:13

gilzoide
Member
Registered: 2016-03-13
Posts: 3

[Review request] lap-git

Hey there, this is my PKGBUILD for the lap library. Should I change anything before submitting it to AUR?

# Maintainer: gilzoide <gilzoide@gmail.com>

pkgname=lap-git
pkgver=20160312
pkgrel=1
pkgdesc="A functional style C++11 library for parsing command line arguments"
arch=('i686' 'x86_64')
url="https://github.com/gilzoide/lap"
license=("GPL3")
depends=()
makedepends=('git' 'scons')
source=("$pkgname"::'git://github.com/gilzoide/lap.git')
md5sums=('SKIP')

# Make pkg version as last commit date
pkgver () {
	cd "$pkgname"
	git log -n 1 --date=short | awk '/Date/ {gsub ("-",""); print $2}'
}

# Build with scons
# Change to "scons debug=1" if you want a build with debug symbols
build () {
	cd "$pkgname"
	scons
}

# Install with scons
# Change to "scons debug=1 install --prefix "${pkgdir}"" if you want a build
# with debug symbols
package () {
	cd "$pkgname"
	scons install --prefix "${pkgdir}"
}

Offline

#2 2016-03-13 20:24:21

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,550

Re: [Review request] lap-git

Please don't use the date for the pkgver. Git isn't linear, so there's nothing to stop the date of the last commit from being older than the one before it. It also doesn't work when there's more than one commit on a given day, and can change based on the local system's time zone.

Is there really no runtime deps?

Last edited by Scimmia (2016-03-13 20:26:32)

Offline

#3 2016-03-14 11:28:09

gilzoide
Member
Registered: 2016-03-13
Posts: 3

Re: [Review request] lap-git

Please don't use the date for the pkgver.

Uh, I get it, thanks. But what should I use instead?

Is there really no runtime deps?

Well, there's libc/libstdc++, as it's pure C++11. Should I include it?

Offline

#4 2016-03-14 12:47:04

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: [Review request] lap-git

Perhaps this (WIP) document I prepared on the subject of versioning for VCS packages (at least git and hg) may be useful to you: https://ptpb.pw/r/h-9U.md

You can find some examples of good (mostly git based) PKGBUILDs here, avoid the AUR if possible.

Additionally, use namcap to help you find issues with either the PKGBUILD or the resulting package tarball.

Last edited by Earnestly (2016-03-14 12:55:30)

Offline

#5 2016-03-14 12:54:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,524
Website

Re: [Review request] lap-git

gilzoide wrote:

Please don't use the date for the pkgver.

Uh, I get it, thanks. But what should I use instead?

Please follow recommendations in the wiki:
https://wiki.archlinux.org/index.php/VC … 9_function


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2016-03-14 13:33:53

gilzoide
Member
Registered: 2016-03-13
Posts: 3

Re: [Review request] lap-git

Earnestly wrote:

Additionally, use namcap to help you find issues with either the PKGBUILD or the resulting package tarball.

Namcap only tells me there's no Contributor tag

Thank you all, I'm using git + revision pkgver now

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

I'll post it in AUR, thanks again smile

Offline

Board footer

Powered by FluxBB