updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / yturl / PKGBUILD
blob8b98b6821b1048b64f5f27170b44520dd71a6688
1 # Maintainer: Chris Down <iofc.org@christopher.down>
3 pkgname=yturl
4 pkgver=1.0
5 pkgrel=1
6 pkgdesc='A simple YouTube URL grabber.'
7 arch=('any')
8 url="https://github.com/cdown/${pkgname}"
9 license=('BSD')
10 depends=('python2')
11 source=("http://fakkelbrigade.eu/chris/software/${pkgname}/${pkgname}-${pkgver}.tar.gz")
12 md5sums=('8f5c966f90ffee4faa8153bcd74381af')
14 package() {
15     install -d "${pkgdir}/usr/"{bin/,share/man/man1/}
17     # Change the shebang to work on Arch. ex is part of core/vi, so we don't
18     # need to list it as a dependency. Interesting that Arch fails to comply
19     # with POSIX/SUS by not including ed by default.
20     ex -s "${srcdir}/${pkgname}" << 'EOF'
21 1s/.*/#!\/usr\/bin\/env python2/g
23 EOF
25     # Compress the manual page to save a small amount of space.
26     gzip -9 "${srcdir}/${pkgname}.1"
28     install -m755 \
29         "${srcdir}/${pkgname}" \
30         "${pkgdir}/usr/bin/${pkgname}"
31     install -m755 \
32         "${srcdir}/${pkgname}.1.gz" \
33         "${pkgdir}/usr/share/man/man1/${pkgname}.1.gz"