You are not logged in.

#1 2015-11-20 18:42:03

frandieguez
Member
Registered: 2015-11-20
Posts: 3

PKGBUILD for mssh

Hi guys!

As per Arch rules of submission I'm posting here the PKGBUILD contents for the mssh software before pushing it to AUR.

PKGBUILD:

# Maintainer: Fran Dieguezr <fran dot dieguez at mabishu dot com>
pkgname=mssh-git
pkgver=2.2.r0.g9221061
pkgrel=1
pkgdesc="tool to administrate multiple servers at once"
arch=('x86_64' 'i686')
license=('custom')
url="http://ftp.brad-smith.co.uk/mssh/"
options=('!strip')
makedepends=(
  git
  autoconf
  automake
  bash-completion
  gconf
  intltool
  pkg-config
)
depends=(
  gconf
  openssh
  vte3
)
conflicts=("mssh")
provides=("mssh")
source=("$pkgname::git://baloo.dyndns.biz/mssh.git")
sha256sums=('SKIP')
pkgver() {
  cd $pkgname
  git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/[_-]/./g'
}
build() {
  cd "$srcdir/${pkgname}"

  ./bootstrap.sh
  ./configure --prefix=/usr --sysconfdir=/etc \
    --with-gconf-schema-file-dir=/usr/share/gconf/schemas \
    --disable-nls
  make
}
check() {
  cd "$srcdir/${pkgname}"
  make -k check
}
package() {
  cd "$srcdir/${pkgname}"

  make DESTDIR="$pkgdir/" install
  install -Dm644 "$srcdir/../license" "$pkgdir/usr/share/licenses/$pkgname/license"
}

license file:

Copyright: (C) 2009 Bradley Smith <brad@brad-smith.co.uk>
Copyright: (C) 2014 Hector Garcia <hector@debian.org>
License: BSD
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:

    1. Redistributions of source code must retain the copyright notice,
       this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the copyright notice,
       this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    3. The name of the author may not be used to endorse or promote
       products derived from this software without specific prior written
       permission.

 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
 NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Do you have any suggestion?

Regards

Last edited by frandieguez (2015-11-20 18:42:33)

Offline

#2 2015-11-20 22:08:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: PKGBUILD for mssh

Overall, it looks good. The most of the suggestions I have are somewhat nit-picky.

The only big thing I see is that the license file isn't included in the source array. If you're not pulling it from somewhere else, you need to include it. Once the license is in the source array, it should be in $srcdir. Using "$srcdir/.." on the install command is wrong.

The first letter of the pkgdesc should probably be capitalized.
That license looks like it's BSD. Still needs to be installed, so the only thing that needs changed is in the license array.
Most of those makedepends should not be included. The "base-devel" group is assumed to be installed at build time.
I prefer to add the pkgver to the provides entry, ie "mssh=$pkgver". This way it will satisfy versioned dependencies.
You should be consistent with your use of braces on variables. Sometimes you use them, sometimes you don't.
Sometimes you cd to $srcdir/$pkgname, sometimes just $pkgname. Functions are guaranteed to start in $srcdir, so you can do it either way, but you should be consistent.

Online

#3 2015-11-20 23:03:42

frandieguez
Member
Registered: 2015-11-20
Posts: 3

Re: PKGBUILD for mssh

Hi Scimmia,

really appreciate your suggestions. I was including the license file but after a deep search in the original repository I found it inside the COPYING file.
Please find below the updated PKGBUILD:

# Maintainer: Fran Dieguez <fran dot dieguez at mabishu dot com>
pkgname=mssh-git
pkgver=2.2.r0.g9221061
pkgrel=1
pkgdesc="Tool to administrate multiple servers at once"
arch=('x86_64' 'i686')
license=('BSD')
url="http://baloo.dyndns.biz/"
options=('!strip')
makedepends=("git" "bash-completion" "gconf" "intltool")
depends=("gconf" "openssh" "vte3")
conflicts=("mssh")
provides=("mssh=$pkgver")
source=("$pkgname::git://baloo.dyndns.biz/mssh.git")
sha256sums=('SKIP')
pkgver() {
  cd $pkgname
  git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/[_-]/./g'
}
build() {
  cd $pkgname
  ./bootstrap.sh
  ./configure --prefix=/usr --sysconfdir=/etc \
    --with-gconf-schema-file-dir=/usr/share/gconf/schemas \
    --disable-nls
  make
}
check() {
  cd $pkgname
  make -k check
}
package() {
  cd $pkgname
  make DESTDIR="$pkgdir/" install
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

If you find it right I will upload it to AUR.

Offline

#4 2015-11-20 23:11:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: PKGBUILD for mssh

Looking good. The only thing I see is that you still have some braces on variables when installing the license file.

Online

Board footer

Powered by FluxBB