[aur-general] PKGBUILD for talking-clock

Storm Dragon stormdragon2976 at gmail.com
Mon Nov 12 14:35:59 EST 2012


# Contributor: Storm Dragon <aur at stormdragon.us>
pkgname=talking-clock
pkgver=2
pkgrel=1
pkgdesc="Highly configurable clock written in bash with soundpack and voice options."
arch=('any')
url="http://github.com/stormdragon2976/talking-clock"
license=('GPL2')
depends=('bash')
makedepends=('git')
optdepends=('espeak: TTS support'
	'festival: TTS support'
	'speech-dispatcher: TTS support'
	'svox-pico-git: TTS support'
	'pulseaudio: Chime sound support'
	'sox: Chime sound support'
	'vorbis-tools: Chime sound support'
'yad: for talking-clock-gui to work')

_gitroot="https://github.com/stormdragon2976/talking-clock.git"
_gitname="talking-clock"

build()
{
msg "Connecting to the Git repository..."
  
if [[ -d "$srcdir/$_gitname" ]] ; then
    cd "$_gitname"
    git pull origin
    msg "The local files are updated"
  else
    git clone --depth 1 $_gitroot
  fi

  cd "$srcdir/$_gitname"
}

package()
 {
  msg "Starting to build the package..."

  install -d $pkgdir/usr/bin
 install -d $pkgdir/usr/share/talking-clock
  install -m755 src/talking-clock $pkgdir/usr/bin
  install -m755 talking-clock-gui/talking-clock-gui $pkgdir/usr/bin
  install -m666 README $pkgdir/usr/share/talking-clock
  install -m755 src/bell.ogg $pkgdir/usr/share/talking-clock
  }

# vim:set ts=2 sw=2 et:
-------------- next part --------------
Hi,
Thanks, everyone, for the help with my PKGBUILD. I think I have gotten everything right, makepkg --source works, but because this is my first package I will run it buy you all again before posting, for final inspection :)
Thanks
Storm
On Mon, Nov 12, 2012 at 01:54 PM, Jesse Juhani Jaara <jesse.jaara at gmail.com> wrote:

> from: Jesse Juhani Jaara <jesse.jaara at gmail.com>
> date: Mon, Nov 12 08:54 PM +02:00 2012
> to: aur-general at archlinux.org
> reply-to: "Discussion about the Arch User Repository \(AUR\)" <aur-general at archlinux.org>
> subject: Re: [aur-general] PKGBUILD for talking-clock
> 
> You can remove the two lines
> |source=(https://github.com/stormdragon2976/talking-clock)
> |md5sums=('81c45b81f4ce5617a79005e9370a2845')
> 
> Git packages do not need those lines, unless there is some "static"
> content in the package. For example a systemd unit file.
> 
> Also all git packages should have -git prefix in their names, unless it
> is 100% sure there will never ever be a "stable" branch or tarball.
> 
> Also any package that doesn't provide any binary files. Python, perl,
> bash, java, ruby etc apps should use 'any' as the arch instead of
> 'x86_64' and 'i686') Same for packages that only contain nonexecutble
> data, like fonts or icon sets.
> 
> Consider adding the version number to the license field like 'GPL3' or
> 'GPL2'.
> 
> provides=() is used only when another package with same binary/data
> exist under differend name. For example package 'libass-git' has line
> provides=('libass') becouse it contains the same library as the libass
> package. Also used when one package provides differend implementation of
> the same command/app, but both can be installled at the same time. For
> example openjdk7 and jre packages both provide the 'java-envirointment'
> virtual package, needed to run java apps.
> 
> conflicts=() same thing as above, but this means that the package has a
> file in same location in the same path. For example libass-gi has file
> named /usr/lib/libass.so    and libass package has file with same name
> in same path. So they conflict with eachothers and cannot be installed
> at the same time.
> 
> replace=() is used when a package with completely differend name
> replaces some other older app. You shouldn't really need this one in
> basic PKGBUILDs.
> 
> So this comes down to meaning you can get rid of those 3 lines on your
> PKGBUILD
> 
> Also instead of
> |  msg "Installing..."
> 
> you would be better of with message like this
> |  msg "Starting to build the package..."
> 
> Also in the build() function only command needed to prepare the source
> code for compilation (c->binary, py-> pyc, class -> .jar) an the actual
> command needed to build/compile the source are allowed.
> 
> Then you need another function named package(), in this function one
> puts in the commands that copy the compiled binary + data files to the
> ${pkgdir} directory. (make install, cp a b, mv, install....)
> 
> You also should enclose every instance of ${srcdir} and ${pkgdir} in
> "-marks. I am referring to the install lines.
> 
> 
> You may also want to install namcap it can check your PKGBUILDS and
> packages for possible errors.
-- 
Registered Linux user number 508465: https://linuxcounter.net/user/508465.html
My blog, Thoughts of a Dragon: http://www.stormdragon.us/
Get paid to read email: http://is.gd/feRiB
 ______________________ 
( MMMMM! humanburgers! )
 ---------------------- 
        o   ^__^
         o  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||



More information about the aur-general mailing list