updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / weather-util / PKGBUILD
blob3ba6873ce6f5dbebb602d57b1908151f807607e7
1 # Maintainer: Michael P <ptchinster@archlinux.us>
2 pkgname=weather-util
3 pkgver=1.5
4 pkgrel=11
5 pkgdesc="provides quick command line access to current weather conditions and forecasts"
6 arch=('any')
7 url="http://fungi.yuggoth.org/weather/"
8 license=('ISC')
9 groups=()
10 depends=('python')
11 makedepends=()
12 optdepends=()
13 provides=()
14 conflicts=("expect")
15 replaces=()
16 backup=('etc/weatherrc')
17 options=()
18 install=
19 changelog=
20 source=( http://fungi.yuggoth.org/weather/src/weather-$pkgver.tar.gz py3000.patch )
21 noextract=()
22 md5sums=('87c7f59bd34a2f62e38a11b81160cd6b' '6a893f4a90e9d04aca4da7b79a2d9950')
24 build() {
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
32         mkdir -p $pkgdir/etc
34         cd "$name-$pkgver"
35         patch -p1 < ../py3000.patch
36         
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."