[aur-general] PKGBUILD for talking-clock
Hi, This is my first package to the AUR. The Arch Wiki says if I am at all unsure to submit my work to the AUR list for review, so, here it is lol. This seems right to me, the only thing I am wondering about is the md5sums part. It pulls from git, so the md5sum seems like it will change with every update. Is there a way to skip the check automatically, or a way to stay up to date with changes in the md5sum? Thanks Storm -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/stormdragon2976 "We sail the endless oceans, we sail the raging seas. The quest is never ending, it leads us to destiny." Alestorm- The Quest
# Contributor: Storm Dragon <aur@stormdragon.us> pkgname=talking-clock pkgver=20121112 pkgrel=1 pkgdesc="Highly configurable clock written in bash with soundpack and voice options." arch=('i686' 'x86_64') url="http://github.com/stormdragon2976/talking-clock" license=('GPL') 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') provides=(talking-clock,talking-clock-gui) should be: provides=('talking-clock' 'talking-clock-gui') conflicts=(talking-clock,talking-clock-gui) same remark as before replaces=(talking-clock,talking-clock-gui) same remark as before source=(https://github.com/stormdragon2976/talking-clock) md5sums=('81c45b81f4ce5617a79005e9370a2845') no need for md5sums when using scm
_gitroot="https://github.com/stormdragon2976/talking-clock" i think this should be: _gitroot="https://github.com/stormdragon2976/talking-clock.git" _gitname="talking-clock"
build() { cd $srcdir/
On Mon, Nov 12, 2012 at 01:29:25PM -0500, Storm Dragon wrote: this line is not really needed since the build function will sit in $srcdir already
install -d $pkgdir/usr/bin
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
move this into a package() function the cloning belongs in the build function
msg "Installing..."
rm -rf "$srcdir/$_gitname-build" cp -a "$srcdir/$_gitname" "$srcdir/$_gitname-build"
why remove and copy the source if you are not building anything ?
cd "$srcdir/$_gitname-build"
if you are not really building this should be cd "$srcdir/$_gitname"
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
all the install stuff is best run from the package function
}
# vim:set ts=2 sw=2 et:
Hi, This is my first package to the AUR. The Arch Wiki says if I am at all unsure to submit my work to the AUR list for review, so, here it is lol. This seems right to me, the only thing I am wondering about is the md5sums part. It pulls from git, so the md5sum seems like it will change with every update. Is there a way to skip the check automatically, or a way to stay up to date with changes in the md5sum? Thanks Storm -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/stormdragon2976 "We sail the endless oceans, we sail the raging seas. The quest is never ending, it leads us to destiny." Alestorm- The Quest ^^ gotta love this :)
usually we have an empty md5sums array when using vcs source. just a cosmetic remark, when indenting try to make sure you indent the same amount of spaces everywhere. did you test this pkgbuild ? -- Ike
Hi Storm, If your package pulls the source from git, there's no need for the 'source' and 'md5sums' arrays. Right now, your PKGBUILD is downloading the github website for the talking-clock project as that's what you put in your 'source' array. It's no wonder that the md5sums will always change :) Just remove the two lines and you'll be fine :) Cheers, Xiao-Long Chen
Date: Mon, 12 Nov 2012 13:29:25 -0500 From: stormdragon2976@gmail.com To: aur-general@archlinux.org Subject: [aur-general] PKGBUILD for talking-clock
Hi, This is my first package to the AUR. The Arch Wiki says if I am at all unsure to submit my work to the AUR list for review, so, here it is lol. This seems right to me, the only thing I am wondering about is the md5sums part. It pulls from git, so the md5sum seems like it will change with every update. Is there a way to skip the check automatically, or a way to stay up to date with changes in the md5sum? Thanks Storm -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ Follow me on Twitter: http://www.twitter.com/stormdragon2976 "We sail the endless oceans, we sail the raging seas. The quest is never ending, it leads us to destiny." Alestorm- The Quest
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.
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@gmail.com> wrote:
from: Jesse Juhani Jaara <jesse.jaara@gmail.com> date: Mon, Nov 12 08:54 PM +02:00 2012 to: aur-general@archlinux.org reply-to: "Discussion about the Arch User Repository \(AUR\)" <aur-general@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 | || ||
I think the name could have that -git into it. Like most git packages do. Also instaed of https:// or http:// git urls should use git:// if avaiable and girhub provides that so use it instead. Also in the package() function you need to cd into the apps sourcedirectory Also add the ""'s to the install commands.
Hi, Here is take 3 lol. Hopefully I got it all this time. I had the cd in the wrong function. Thanks for all the help Storm On Mon, Nov 12, 2012 at 03:12 PM, Jesse Juhani Jaara <jesse.jaara@gmail.com> wrote:
from: Jesse Juhani Jaara <jesse.jaara@gmail.com> date: Mon, Nov 12 10:12 PM +02:00 2012 to: aur-general@archlinux.org reply-to: "Discussion about the Arch User Repository \(AUR\)" <aur-general@archlinux.org> subject: Re: [aur-general] PKGBUILD for talking-clock
I think the name could have that -git into it. Like most git packages do. Also instaed of https:// or http:// git urls should use git:// if avaiable and girhub provides that so use it instead.
Also in the package() function you need to cd into the apps sourcedirectory
Also add the ""'s to the install commands. -- Registered Linux user number 508465: https://linuxcounter.net/user/508465.html My blog, Thoughts of a Dragon: http://www.stormdragon.us/ How many Internet mail list subscribers does it take to change a lightbulb? http://goo.gl/eO4PJ "Mighty Elric, Mightier Sword. Sorcerer and Swordsman, slayer of kin, Lord of a dying race. King of ruin, dragon master, Champion of Doom." Domine - Chronicles of the Black Sword
participants (4)
-
Ike Devolder
-
Jesse Juhani Jaara
-
Storm Dragon
-
小龙 陈