updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / weather / PKGBUILD
blob00574f380387c95958b6f096c6c2cfe23bb42da4
1 # Maintainer:  Kyle Keen <keenerd at gmail>
2 # Maintainer:  evr <evanroman at gmail>
3 # Contributor: Abhishek Dasgupta <abhidg@gmail.com>
5 pkgname=weather
6 pkgver=1.5
7 pkgrel=3
8 pkgdesc="CLI tool which shows weather forecasts from METAR data"
9 arch=('any')
10 url="http://fungi.yuggoth.org/weather/"
11 depends=('python2')
12 license=("custom:BSD2")
13 source=(http://fungi.yuggoth.org/weather/src/$pkgname-$pkgver.tar.gz)
14 md5sums=('87c7f59bd34a2f62e38a11b81160cd6b')
16 build() {
17   cd "$srcdir/$pkgname-$pkgver"
18   sed -i 's|env python|env python2|' *
19   echo "# Find more stations at http://aviationweather.gov/adds/metars/stations.txt" > wrc2
20   cat weatherrc >> wrc2
21   _python_path=$(python2 -c "import sys ; print [p for p in sys.path if p.startswith('/usr/lib/python2.')][0]")
22   install -D -m 755 weather ${pkgdir}/usr/bin/weather
23   install -D -m 644 weather.py ${pkgdir}${_python_path}/weather.py
24   install -D -m 644 wrc2 ${pkgdir}/etc/weatherrc
25   install -D -m 644 weather.1 ${pkgdir}/usr/share/man/man1/weather.1
26   install -D -m 644 weatherrc.5 ${pkgdir}/usr/share/man/man5/weatherrc.5
27   install -D -m 644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/BSD2