You are not logged in.

#1 2008-01-18 00:29:36

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

First pkgbuild, verification please

Hello!

This is my first pkgbuild from scratch.
I had read the standards but I want to be sure it's alright. smile

Thank.

# Author: Shaika-Dzari <shaikadzari at gmail _dot_ com>
pkgname=animeshell
pkgver=1.0
pkgrel=1
pkgdesc="Collection manager for your animes and mangas"
arch=('i686')
url="http://code.google.com/p/animeshell/"
license=('GPL')
depends=('qt4')
source=(http://animeshell.googlecode.com/files/Animeshell-$pkgver-linux.tar.bz2 Animeshell.desktop)
md5sums=('9cb24c9d68c117c05021d3465494e327'
         '4be9aa92283d3751fec654aa5fb2f2fb')

build() {
  export QMAKESPEC=linux-g++

  cd "$startdir/src/Animeshell-$pkgver-linux"

  qmake -config release
  make || return 1

  # Executable
  install -d $startdir/pkg/usr/bin
  install -Dm755 bin/Animeshell $startdir/pkg/usr/bin/
  
  # .desktop file
  install -d $startdir/pkg/usr/share/applications
  install -Dm644 $startdir/src/Animeshell.desktop $startdir/pkg/usr/share/applications/

  # Icon
  install -d $startdir/pkg/usr/share/pixmaps
  install -Dm644 ui/resources/animeshell-icon-10.png $startdir/pkg/usr/share/pixmaps/animeshell.png
}
[Desktop Entry]
Name=Animeshell
Comment=Collection manager
Exec=Animeshell
Terminal=false
Type=Application
Icon=animeshell.png
Categories=Qt;Application;
Encoding=UTF-8

Offline

#2 2008-01-18 01:45:22

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: First pkgbuild, verification please

That looks quite good....

The "#Author" should be "#Contributor".   Also "install -D" creates the directory structure so you shouldn't need the "install -d" lines beforehand.

From memory, you don't need the ".png" in the Icon section of you .desktop file.  Use desktop-file-validate (in desktop-file-utils) to check this.

Online

#3 2008-01-18 08:05:44

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: First pkgbuild, verification please

Allan wrote:

The "#Author" should be "#Contributor".

You're right.

Allan wrote:

Also "install -D" creates the directory structure so you shouldn't need the "install -d" lines beforehand.

I tried but the structure was not create hmm

Allan wrote:

From memory, you don't need the ".png" in the Icon section of you .desktop file.  Use desktop-file-validate (in desktop-file-utils) to check this.

You were right for .png and I validated my .desktop file to be "freedesktop standard" tongue

Go to Aur. http://aur.archlinux.org/packages.php?d … 1&ID=14696 big_smile

Thank Allan

Last edited by Shaika-Dzari (2008-01-18 08:18:32)

Offline

#4 2008-01-18 10:45:52

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: First pkgbuild, verification please

Shaika-Dzari wrote:
Allan wrote:

Also "install -D" creates the directory structure so you shouldn't need the "install -d" lines beforehand.

I tried but the structure was not create hmm hmm

Weird, from the man page:

       -D     create all leading components of DEST except the last, then copy
              SOURCE to DEST

Last edited by Allan (2008-01-18 12:12:08)

Online

#5 2008-01-18 11:04:02

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: First pkgbuild, verification please

Allan wrote:
Shaika-Dzari wrote:
Allan wrote:

Also "install -D" creates the directory structure so you shouldn't need the "install -d" lines beforehand.

Weird, from the man page:

       -D     create all leading components of DEST except the last, then copy
              SOURCE to DEST

no it is not so weird. As there is currently no directory where you want to install the file to (at least that is what it is assuming) it has otherwise no idea if the last component is either a directory or a file.
This means that for example

install -Dm644 sample.desktop $startdir/pkg/usr/share/applications

removes the last component (applications in this example), and installs the sample.desktop file under the name applications in $startdir/pkg/usr/share/

Therefore, the correct way is

install -Dm644 sample.desktop $startdir/pkg/usr/share/applications/sample.desktop

Last edited by pressh (2008-01-18 16:25:35)

Offline

#6 2008-01-18 12:10:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: First pkgbuild, verification please

Of course, I just looked at the icon install line, which of course would work...

Online

#7 2008-01-18 16:15:42

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: First pkgbuild, verification please

Hello,

Great! I replace this:

  # Executable
  install -d $startdir/pkg/usr/bin
  install -Dm755 bin/Animeshell $startdir/pkg/usr/bin/
  # .desktop file
  install -d $startdir/pkg/usr/share/applications
  install -Dm644 $startdir/src/Animeshell.desktop $startdir/pkg/usr/share/applications/
  # Icon
  install -d $startdir/pkg/usr/share/pixmaps
  install -Dm644 ui/resources/animeshell-icon-10.png $startdir/pkg/usr/share/pixmaps/animeshell.png

by this code:

  # Executable
  install -Dm755 bin/Animeshell $startdir/pkg/usr/bin/Animeshell
  # .desktop file
  install -Dm644 $startdir/src/Animeshell.desktop $startdir/pkg/usr/share/applications/Animeshell.desktop
  # Icon
  install -Dm644 ui/resources/animeshell-icon-10.png $startdir/pkg/usr/share/pixmaps/animeshell.png

And it work great. Every folder is create.
I will update my pkgbuild.

Thank pressh smile

Offline

#8 2008-01-18 19:35:01

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: First pkgbuild, verification please

I just checked out your 2nd release on AUR.. the PKGBUILD looks very clean.. Keep up the good work!  Just a word of warning though.. now that you know how easy it is to make PKGBUILDs you will find yourself making more and more wink

I like how you add comments before each install line.. that's what I do in my PKGBUILD's also!

Keep up the good work!

Offline

#9 2008-01-19 04:31:12

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: First pkgbuild, verification please

Thank Zer0 smile

Offline

Board footer

Powered by FluxBB