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

2011-01-03 Thread Baho Utot
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?



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

2011-01-03 Thread Ray Rashif
On 3 January 2011 23:29, Baho Utot baho-u...@columbus.rr.com wrote:
 joomla-1.5.22-1-any-sitename.pkg.tar.xz

 Is this possible?

No.

joomla-$sitename-1.55.22-1-any.pkg.tar.xz is possible:

_sitename=foo
pkgname=joomla-$_sitename
...


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

2011-01-03 Thread Baho Utot
On Monday, January 03, 2011 11:17:46 am Ray Rashif wrote:
 On 3 January 2011 23:29, Baho Utot baho-u...@columbus.rr.com wrote:
  joomla-1.5.22-1-any-sitename.pkg.tar.xz
  
  Is this possible?
 
 No.
 
 joomla-$sitename-1.55.22-1-any.pkg.tar.xz is possible:
 
 _sitename=foo
 pkgname=joomla-$_sitename
 ...

Yes I figured that as a possiblilty as I have seen simular in some other 
PKGBUILDs.  

joomla-1.5.22-1-any-sitename.pkg.tar.xz is cleaner but I can live with 
joomla-$sitename-1.55.22-1-any.pkg.tar.xz

just isn't pretty.

Thanks


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

2011-01-03 Thread Guillaume ALAUX
On 3 January 2011 16:52, Baho Utot baho-u...@columbus.rr.com wrote:
 On Monday, January 03, 2011 11:17:46 am Ray Rashif wrote:
 On 3 January 2011 23:29, Baho Utot baho-u...@columbus.rr.com wrote:
  joomla-1.5.22-1-any-sitename.pkg.tar.xz
 
  Is this possible?

 No.

 joomla-$sitename-1.55.22-1-any.pkg.tar.xz is possible:

 _sitename=foo
 pkgname=joomla-$_sitename
 ...

 Yes I figured that as a possiblilty as I have seen simular in some other
 PKGBUILDs.

 joomla-1.5.22-1-any-sitename.pkg.tar.xz is cleaner but I can live with
 joomla-$sitename-1.55.22-1-any.pkg.tar.xz

 just isn't pretty.

 Thanks


You could use a split PKGBUILD[0]:

basename=joomla

build()
package_joom-site1() {}
package_joom-site2() {}
package_joom-site3() {}
...

[0] http://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting

--
Guillaume


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

2011-01-03 Thread Baho Utot
On Monday, January 03, 2011 11:38:52 am Guillaume ALAUX wrote:
 On 3 January 2011 16:52, Baho Utot baho-u...@columbus.rr.com wrote:
  On Monday, January 03, 2011 11:17:46 am Ray Rashif wrote:
  On 3 January 2011 23:29, Baho Utot baho-u...@columbus.rr.com wrote:
   joomla-1.5.22-1-any-sitename.pkg.tar.xz
   
   Is this possible?
  
  No.
  
  joomla-$sitename-1.55.22-1-any.pkg.tar.xz is possible:
  
  _sitename=foo
  pkgname=joomla-$_sitename
  ...
  
  Yes I figured that as a possiblilty as I have seen simular in some other
  PKGBUILDs.
  
  joomla-1.5.22-1-any-sitename.pkg.tar.xz is cleaner but I can live with
  joomla-$sitename-1.55.22-1-any.pkg.tar.xz
  
  just isn't pretty.
  
  Thanks
 
 You could use a split PKGBUILD[0]:
 
 basename=joomla
 
 build()
 package_joom-site1() {}
 package_joom-site2() {}
 package_joom-site3() {}
 ...
 
 [0] http://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting
 
 --
 Guillaume


OK thanks I'll try that

I'll need to find am example so I can grok that build style.




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

2011-01-03 Thread Guillaume ALAUX
On 3 January 2011 17:08, Baho Utot baho-u...@columbus.rr.com wrote:
 On Monday, January 03, 2011 11:38:52 am Guillaume ALAUX wrote:
 On 3 January 2011 16:52, Baho Utot baho-u...@columbus.rr.com wrote:
  On Monday, January 03, 2011 11:17:46 am Ray Rashif wrote:
  On 3 January 2011 23:29, Baho Utot baho-u...@columbus.rr.com wrote:
   joomla-1.5.22-1-any-sitename.pkg.tar.xz
  
   Is this possible?
 
  No.
 
  joomla-$sitename-1.55.22-1-any.pkg.tar.xz is possible:
 
  _sitename=foo
  pkgname=joomla-$_sitename
  ...
 
  Yes I figured that as a possiblilty as I have seen simular in some other
  PKGBUILDs.
 
  joomla-1.5.22-1-any-sitename.pkg.tar.xz is cleaner but I can live with
  joomla-$sitename-1.55.22-1-any.pkg.tar.xz
 
  just isn't pretty.
 
  Thanks

 You could use a split PKGBUILD[0]:

 basename=joomla

 build()
 package_joom-site1() {}
 package_joom-site2() {}
 package_joom-site3() {}
 ...

 [0] http://www.archlinux.org/pacman/PKGBUILD.5.html#_package_splitting

 --
 Guillaume


 OK thanks I'll try that

 I'll need to find am example so I can grok that build style.




wireshark[0] is a split package for instance.

http://projects.archlinux.org/svntogit/packages.git/tree/wireshark/trunk/PKGBUILD

--
Guillaume