You are not logged in.

#1 2011-04-06 23:09:03

Ideka
Member
Registered: 2011-01-19
Posts: 15

[SOLVED] git PKGBUILD, version changes each time I build it

I made a PKGBUILD that builds a package from a github repository: https://github.com/justinmeza/lci.
When I cd to its location and run $ makepkg -s, the pkgver variable is changed to today's date, even tough last commit was made almost a month ago.

$ LC_ALL=C makepkg
==> Determining latest git revision...
  -> Version found: 20110406
==> Making package: lci-git 20110406-1 (Wed Apr  6 19:59:59 UYT 2011)
...

Am I doing something wrong, or overlooking something? or is this the expected behavior? It seems strange to me.

Thanks!

Last edited by Ideka (2011-04-07 12:33:17)

Offline

#2 2011-04-06 23:17:38

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] git PKGBUILD, version changes each time I build it

Post your PKGBUILD.

Offline

#3 2011-04-06 23:22:41

Ideka
Member
Registered: 2011-01-19
Posts: 15

Re: [SOLVED] git PKGBUILD, version changes each time I build it

It currently looks like this:

# Maintainer: Gerardo Marset <gammer1994@gmail.com>
pkgname=lci-git
pkgver=20110413
pkgrel=1
pkgdesc="A simple and fast 1.2 lolcode interpreter written in C."
arch=('i686' 'x86_64')
url="http://icanhaslolcode.org/"
license=('GPL3')
makedepends=('git')
provides=('lci')
conflicts=('lci')

_gitroot="https://github.com/justinmeza/lci.git"
_gitname="lci"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  cd "$srcdir/$_gitname-build"

  make
  make check
  install -Dm755 lci ${pkgdir}/usr/bin/lci
}

Offline

#4 2011-04-07 00:01:13

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] git PKGBUILD, version changes each time I build it

Yes, that's how git PKGBUILDs work. The version is the build date, regardless of when the last commit was.

Offline

#5 2011-04-07 00:14:02

Ideka
Member
Registered: 2011-01-19
Posts: 15

Re: [SOLVED] git PKGBUILD, version changes each time I build it

Oh. So that means the pkgrel variable means nothing and is redundant in git PKGBUILDS?

Offline

#6 2011-04-07 08:42:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] git PKGBUILD, version changes each time I build it

falconindy wrote:

Yes, that's how git PKGBUILDs work. The version is the build date, regardless of when the last commit was.

I thought there was something in the build that did that, but it appears not... makepkg determines that it is a git PKGBUILD itself somehow...

Ideka wrote:

Oh. So that means the pkgrel variable means nothing and is redundant in git PKGBUILDS?

Unless you build multiple packages on the same day....

Offline

#7 2011-04-07 12:27:14

Ideka
Member
Registered: 2011-01-19
Posts: 15

Re: [SOLVED] git PKGBUILD, version changes each time I build it

fukawi2 wrote:
Ideka wrote:

Oh. So that means the pkgrel variable means nothing and is redundant in git PKGBUILDS?

Unless you build multiple packages on the same day....

Oh, right.

Well, this is solved now. Thank you!

Last edited by Ideka (2011-04-07 12:34:09)

Offline

Board footer

Powered by FluxBB