You are not logged in.
I wrote a python Youtube search client with a curses interface. I wrote a PKGBUILD for it aswell so I can easily share it with my archie friends. However, this is the first PKGBUILD I wrote, so I ask you to please review it for me and let me know if it's good enough to submit to AUR.
# Maintainer: Tyler Cone <herrflockig@gmail.com>
pkgname=yt-git
pkgver=20130125
pkgrel=1
pkgdesc="A curses Youtube search client written in python"
arch=('any')
url="https://github.com/herrflockig/yt"
license=('WTFPL')
depends=('mplayer' 'youtube-dl' 'python2')
makedepends=('git')
conflicts=('yt')
provides=('yt')
_gitname="yt"
_gitroot="https://github.com/herrflockig/yt"
pkgver() {
cd "$srcdir/$_gitname"
echo $(git describe --always | sed 's/-/./g')
}
build() {
cd $srcdir
msg "Connecting to GIT server..."
if [ -d $_gitname ]; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone --depth=1 $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
}
package() {
cd "$srcdir/$_gitname"
mkdir -p $pkgdir/usr/bin
cp yt.py $pkgdir/usr/bin/yt
chmod +x $pkgdir/usr/bin/yt
}
And while you're at it, why not give the script a try and let me know what you think?
Offline
mkdir -p $pkgdir/usr/bin cp yt.py $pkgdir/usr/bin/yt chmod +x $pkgdir/usr/bin/yt
This can be condensed to 1 command:
install -Dm755 yt.py "$pkgdir/usr/bin/yt"
Also WTFPL should be "custom" or "custom:WTFPL" since it's not an officially recognized common license in arch.
And while you're at it, why not give the script a try and let me know what you think?
I'm liking this a lot..
Is it expected that I can't resize/fullscreen the videos? The video just stays in the center at the same size with surrounding black space.
(Maybe you can start a Community Contributions thread for this.)
Last edited by tdy (2013-01-26 04:45:12)
Offline
Suggestions noted and changes made. Thanks for the help!
I'm liking this a lot..
Thanks!
Is it expected that I can't resize/fullscreen the videos? The video just stays in the center at the same size with surrounding black space.
Hrm, hitting 'f' usually works for me. Either that or edit the script to call mplayer with the -fs flag. Or it's a bug in my script. Most likely the latter xP
(Maybe you can start a Community Contributions thread for this.)
Will do! Thanks again for all the help.
Last edited by herrflockig (2013-01-26 04:36:10)
Offline
"makedepends=('git')" isn't needed…
Offline
"makedepends=('git')" isn't needed…
Umm what? As it's currently written, this package definitely needs git as a makedep.
Offline
Somewhere on the Wiki it says that git is always supposed to be available to makepkg, so you don't have to list it explicitly.
Offline
I just uninstalled git and the build broke. Sounds reasonable to me.
Offline
Somewhere on the Wiki it says that git is always supposed to be available to makepkg, so you don't have to list it explicitly.
If it does, it needs to be changed. I can only guess that someone took the idea that "base-devel should be assumed" and incorrectly applied that to VCSes.
Offline
Well, looking through the random sample of AUR packages in my ~/aur/, I am getting the impression that quite a few git-based PKGBUILDs do not list git as a dependency. So, wouldn't it be easier to fix /usr/bin/makepkg so it offers to install git if it's not there?
I think the Wiki will have to go to bed without dinner tonight. Bad, bad Wiki!
Offline
I think makepkg in the next version of pacman might have better support for VCSes, but I haven't followed pacman-git closely enough to say for sure.
Last edited by tdy (2013-01-26 16:39:22)
Offline
Oh dear - I hope I won't be expected to install every possible VCS just to have PKGBUILDS work.
Git should definitely be listed.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Meanwhile, I've fixed my own PKGBUILDs, and other than that it looks like this mostly affects some older, seldom-updated PKGBUILDs. So maybe it's not a big problem in practice, especially if nobody has noted this inconsistency in PKGBUILDs before. I don't think namcap has ever complained about it either.
But I'm not sure why makepkg is unable to realize on its own that git/hg/bzr are missing and add them as build dependencies. Failing with an error message is a bit lame when an error can be so easily avoided.
Last edited by Morn (2013-01-26 19:14:59)
Offline
Makepkg does not automatically install any other missing dependencies - why would these be different.
Makepkg should not install *anything* unless passed the -s or -i flags. It should just make a package.
Last edited by Trilby (2013-01-26 22:33:08)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
https://wiki.archlinux.org/index.php/VC … Guidelines
"Don't forget to include the appropriate VCS tool (cvs, subversion, git, ...) in makedepends=...."
It was part of the initial wiki commit in 2005, so anyone that's written PKGBUILDs since then can't blame the Wiki
Last edited by Scimmia (2013-01-26 21:30:34)
Online