updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / ytmp / PKGBUILD
blobfe57676c482b5622dc528fb16277496d112fd00b
1 # Contributor: Benjamin Wild <benwild@gmx.de>
2 pkgname=ytmp
3 pkgver=20100914
4 pkgrel=1
5 pkgdesc="automatically play youtube videos with mplayer and ngrep"
6 arch=('any')
7 url="http://github.com/tlvince/ytmp"
8 license=('GPL')
9 depends=('ngrep' 'youtube-dl')
10 optdepends=('zenity: for gtk gui support' 'kdialog: for kde gui support' 'dmenu: for dmenu gui support')
11 makedepends=('git')
12 backup=('etc/ytmp.conf')
14 _gitroot="git://github.com/tlvince/ytmp.git"
15 _gitname="ytmp"
17 build() {
18   cd "$srcdir"
19   msg "Connecting to GIT server...."
21   if [ -d $_gitname ] ; then
22     cd $_gitname && git pull origin
23     msg "The local files are updated."
24   else
25     git clone $_gitroot $_gitname
26   fi
28   msg "GIT checkout done or server timeout"
29   msg "Starting make..."
31   rm -rf "$srcdir/$_gitname-build"
32   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
35 package() {
36   mkdir -p "$pkgdir"/usr/lib/tlvince
37   cd "$srcdir/$_gitname-build"
38   install -Dm744 ytmpd "$pkgdir"/usr/bin/ytmpd
39   install -Dm644 ytmp.conf "$pkgdir"/etc/ytmp.conf
40   install -m755 ytmpc "$pkgdir"/usr/bin/ytmpc
41   install -Dm744 distro-specific/arch/ytmpd_init "$pkgdir"/etc/rc.d/ytmpd
42   install -Dm644 lib/* "$pkgdir"/usr/lib/tlvince/