You are not logged in.
When I use makepkg --source, it makes a file named:
wifiz--1.src.tar.gz
However, when I run the same command I use for pkgver, it returns this:
0.9.2.2.r1.g8147a9f
Here is my PKGBUILD:
# Maintainer: Cody Dostal <dostalcody@gmail.com>
pkgname=wifiz
_gitname=WiFiz
pkgver=
pkgrel=1
pkgdesc="NetCTL GUI Frontend, written in wxPython. Stable Version."
arch=('any')
url="https://github.com/codywd/WiFiz"
license=('MIT')
depends=('python2' 'wxpython' 'wireless_tools' 'netctl'
'wpa_supplicant')
makedepends=('git')
optdepends=('gedit: Manually editing profiles.')
conflicts=('wifiz-nightly')
provides=('wifiz')
source=('git://github.com/codywd/WiFiz.git')
# Because the sources are not static, skip Git checksum:
md5sums=('SKIP')
pkgver() {
cd "$_gitname"
echo $(git describe --always --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g')
}
package() {
cd $srcdir/$_gitname
pwd
python2 setup.py install --root="$pkgdir/" --optimize=1
}
Why isn't it returning the expected package name
wifiz-0.9.2.2.r1.g8147a9f-1.src.tar.gz
?
Last edited by pivotraze (2013-05-28 00:36:14)
Offline
I think that's expected; have a look here: https://wiki.archlinux.org/index.php/VC … 9_function
The sample PKGBUILD at the bottom of that page uses 0.0.0 as the version which makes sense since in a PKGBUILD that builds from a revision control system, the PKGBUILD itself doesn't refer to a specific version (that's the point of building from a git/svn/etc source)
EDIT: using your PKGBUILD and setting pkgver to 0.0.0 produces the expected output on my machine:
$ ls wifiz-*
wifiz-0.9.2.2.r1.g8147a9f-1-any.pkg.tar.xz wifiz-0.9.2.2.r1.g8147a9f-1.src.tar.gz
Last edited by fukawi2 (2013-05-28 00:01:16)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
VCS PKGBUILDs need to include the VCS type at the end of the pkgname. In this case your package should be named "wifiz-git".
Here's an updated version of your PKGBUILD:
# Maintainer: Cody Dostal <dostalcody@gmail.com>
pkgname=wifiz-git
_gitname=WiFiz
pkgver=0.9.2.2.r1.g8147a9f
pkgrel=1
pkgdesc="NetCTL GUI Frontend, written in wxPython. Stable Version."
arch=('any')
url="https://github.com/codywd/$_gitname"
license=('MIT')
depends=('python2' 'wxpython' 'wireless_tools' 'netctl' 'wpa_supplicant')
makedepends=('git')
optdepends=('gedit: manually edit profiles')
conflicts=('wifiz' 'wifiz-nightly')
provides=('wifiz')
source=("git://github.com/codywd/$_gitname.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$_gitname"
git describe --always --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}
package() {
cd "$srcdir/$_gitname"
python2 setup.py install --root="$pkgdir/" --optimize=1
}
Note the following changes:
pkgname
conflicts with "wifiz" (all VCS packages should provide and conflict with their non-VCS equivalents)
removed redundant echo and shell invocation from pkgver function
"$srcdir/$_gitname" instead of "$_gitname" in pkgver function: the git repo will not be in the same directory if the user sets SRCDIR in makepkg.conf
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
You're both heroes! Thank you very much! Although, there is now wifiz and wifiz-git in the AUR. The first one, "wifiz" needs to either be removed or merged into "wifiz-git". I emailed the AUR list about it.
Last edited by pivotraze (2013-05-28 00:36:47)
Offline