1 # Maintainer: Michael P <ptchinster@archlinux.us>
5 pkgdesc="provides quick command line access to current weather conditions and forecasts"
7 url="http://fungi.yuggoth.org/weather/"
16 backup=('etc/weatherrc')
20 source=( http://fungi.yuggoth.org/weather/src/weather-$pkgver.tar.gz py3000.patch )
22 md5sums=('87c7f59bd34a2f62e38a11b81160cd6b' '6a893f4a90e9d04aca4da7b79a2d9950')
25 name=${pkgname//-util}
26 pyversion=`pacman -Q python | cut -d - -f1 | sed 's/ //'`
28 mkdir -p $pkgdir/usr/bin
29 mkdir -p $pkgdir/usr/lib/${pyversion}
30 mkdir -p $pkgdir/usr/share/man/man{1,5}
31 mkdir -p $pkgdir/usr/share/licenses/$pkgname
35 patch -p1 < ../py3000.patch
37 cp "$name" "$pkgdir/usr/bin"
38 cp "${name}.py" "$pkgdir/usr/lib/${pyversion}"
39 cp "${name}.1" "$pkgdir/usr/share/man/man1"
40 cp "${name}rc.5" "$pkgdir/usr/share/man/man5"
41 cp "LICENSE" $pkgdir/usr/share/licenses/$pkgname
42 cp "${name}rc" "$pkgdir/etc"
44 #sed -i 's_#!/usr/bin/env python_#!/usr/bin/python2_' "${pkgdir}/usr/bin/weather"
45 sed -i 's_#!/usr/bin/env python_#!/usr/bin/python_' "${pkgdir}/usr/bin/weather"
47 echo "Go to http://www.nws.noaa.gov/tg/siteloc.shtml to find the settings for your /etc/weatherrc file."