[arch-general] Package building - Change name of finished package

Baho Utot baho-utot at columbus.rr.com
Mon Jan 3 10:29:46 EST 2011


I want to change the resulting package name in the PKGBUILD so I can support 
different sites on a server hosting many virtual websites using joomla.

Example:

Stock PKGBUILD

pkgname=joomla
pkgver=1.5.22
pkgrel=1
pkgdesc="A PHP-based content management platform"
arch=('any')
url="http://www.joomla.org/"
license=('GPL')
depends=('php>=4.3.10' 'php-apache>=4.3.10' 'mysql>=3.23' 'apache>=1.3')
provides=('joomla')
install=${pkgname}.install
source=(http://joomlacode.org/gf/download/frsrelease/12610/53421/Joomla_$pkgver-
Stable-Full_Package.zip)

build() {
  # Install Joomla files.
  install -dm755 "$pkgdir$_install_dir"
  cp -r "$srcdir"/* "$pkgdir$_install_dir"
  # Remove the symlink which points to the Joomla tarball itself.
  rm -f "$pkgdir$_install_dir/Joomla_$pkgver-Stable-Full_Package.zip"
  # Remove unnecessary permissions.
  find "$pkgdir$_install_dir" -type f -exec chmod 0664 {} \;
  find "$pkgdir$_install_dir" -type d -exec chmod 0775 {} \;
}

Produces a package named joomla-1.5.22-1-any.pkg.tar.xz



I would like to change it to 

sitename=<some name>
pkgname=joomla
pkgver=1.5.22
pkgrel=1
pkgdesc="A PHP-based content management platform"
arch=('any')
url="http://www.joomla.org/"
license=('GPL')
depends=('php>=4.3.10' 'php-apache>=4.3.10' 'mysql>=3.23' 'apache>=1.3')
provides=('joomla')
install=${pkgname}.install
source=(http://joomlacode.org/gf/download/frsrelease/12610/53421/Joomla_$pkgver-
Stable-Full_Package.zip)

build() {
  # Install Joomla files.
  install -dm755 "$pkgdir/$sitename"
  cp -r "$srcdir"/* "$pkgdir/$sitename"
  # Remove the symlink which points to the Joomla tarball itself.
  rm -f "$pkgdir/$sitename/Joomla_$pkgver-Stable-Full_Package.zip"
  # Remove unnecessary permissions.
  find "$pkgdir/$sitename" -type f -exec chmod 0664 {} \;
  find "$pkgdir/$sitename" -type d -exec chmod 0775 {} \;
}


and have it produce:

joomla-1.5.22-1-any-<sitename>.pkg.tar.xz

Is this possible?



More information about the arch-general mailing list