You are not logged in.

#1 2008-08-31 05:00:45

fivre
Member
Registered: 2007-04-17
Posts: 97

$pkgname causing build to break

I have the following PKGBUILD for a patched terminus-font. (Ignore the currently erroneous conflicts line.) It works great, but I'd like to rename it terminus-cyrillic so there's no name conflict. However, doing this means changing pkgname, and therefore hardcoding 'terminus-font' to all the places $pkgname is used. However, this breaks the patches for some reason. Any ideas as to why?

# Maintainer: Travis Raines <rainest@carleton.edu>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Kristoffer Fossg¿rd <kfs1@online.no>
arch=(i686 x86_64)
pkgname=terminus-font
pkgver=4.26
pkgrel=4
pkgdesc="A superb, monospace bitmap font (for X11 and console) with dv1, ge1, and ij1 patches applied for more proper Cyrillic characters."
depends=(xorg-fonts-encodings xorg-fonts-alias xorg-font-utils fontconfig)
conflicts=($pkgname)
source=(http://www.is-vn.bg/hamster/$pkgname-$pkgver.tar.gz http://www.is-vn.bg/hamster/$pkgname-$pkgver-dv1.diff.gz http://www.is-vn.bg/hamster/$pkgname-$pkgver-ge1.diff.gz http://www.is-vn.bg/hamster/$pkgname-$pkgver-ij1.diff.gz)
url="http://www.is-vn.bg/hamster/jimmy-en.html"
license=('GPL')
install=terminus-cyrillic.install
md5sums=('a0352316f3b983ddc670b25ab166094e'
         'b66cdce347c133b381dd7cfdb2a6d9eb'
         'a8f0da402af16bde94c30cf436292b90'
         'f4baacf5105e93eddc513ad74a17d8ff')

build() { 
  cd $startdir/src/$pkgname-$pkgver
  patch -Np1 < ../$pkgname-$pkgver-dv1.diff
  patch -Np1 < ../$pkgname-$pkgver-ge1.diff
  patch -Np1 < ../$pkgname-$pkgver-ij1.diff
  ./configure --prefix=/usr --x11dir=/usr/share/fonts/local/ --psfdir=/usr/share/kbd/consolefonts/
  make DESTDIR=$startdir/pkg install
}

Offline

#2 2008-08-31 05:17:07

kett
Member
Registered: 2008-04-21
Posts: 104

Re: $pkgname causing build to break

This should work.  You just have to be careful with which name you are referring to.  In general, it will work with correctly inputted hardcoded package names.

# Maintainer: Travis Raines <rainest@carleton.edu>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Kristoffer Fossg¿rd <kfs1@online.no>
arch=(i686 x86_64)
pkgname=terminus-cyrillic
_origpkgname=terminus-font
pkgver=4.26
pkgrel=4
pkgdesc="A superb, monospace bitmap font (for X11 and console) with dv1, ge1, and ij1 patches applied for more proper Cyrillic characters."
depends=(xorg-fonts-encodings xorg-fonts-alias xorg-font-utils fontconfig)
conflicts=($_origpkgname)
source=(http://www.is-vn.bg/hamster/$_origpkgname-$pkgver.tar.gz http://www.is-vn.bg/hamster/$_origpkgname-$pkgver-dv1.diff.gz http://www.is-vn.bg/hamster/$_origpkgname-$pkgver-ge1.diff.gz http://www.is-vn.bg/hamster/$_origpkgname-$pkgver-ij1.diff.gz)
url="http://www.is-vn.bg/hamster/jimmy-en.html"
license=('GPL')
install=$pkgname.install
md5sums=('a0352316f3b983ddc670b25ab166094e'
         'b66cdce347c133b381dd7cfdb2a6d9eb'
         'a8f0da402af16bde94c30cf436292b90'
         'f4baacf5105e93eddc513ad74a17d8ff')

build() { 
  cd $startdir/src/$_origpkgname-$pkgver
  patch -Np1 < ../$_origpkgname-$pkgver-dv1.diff
  patch -Np1 < ../$_origpkgname-$pkgver-ge1.diff
  patch -Np1 < ../$_origpkgname-$pkgver-ij1.diff
  ./configure --prefix=/usr --x11dir=/usr/share/fonts/local/ --psfdir=/usr/share/kbd/consolefonts/
  make DESTDIR=$startdir/pkg install
}

Offline

Board footer

Powered by FluxBB