summaryrefslogtreecommitdiff
path: root/community/units
diff options
context:
space:
mode:
Diffstat (limited to 'community/units')
-rw-r--r--community/units/PKGBUILD29
-rw-r--r--community/units/units.install18
2 files changed, 47 insertions, 0 deletions
diff --git a/community/units/PKGBUILD b/community/units/PKGBUILD
new file mode 100644
index 000000000..c9be463ad
--- /dev/null
+++ b/community/units/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 86729 2013-03-21 15:11:16Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Jeff Mickey <jeff@archlinux.org>
+# Contributor: Steve Sansom <snsansom@gmail.com>
+
+pkgname=units
+pkgver=2.01
+pkgrel=2
+pkgdesc="converts between different units"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/units/units.html"
+depends=('readline')
+license=("GPL")
+options=('!makeflags')
+install=units.install
+source=(http://ftp.gnu.org/gnu/units/$pkgname-$pkgver.tar.gz)
+md5sums=('81bf85937c56fbbd04b16f2f3f9d8526')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's|/usr/bin/python|/usr/bin/python2|' units_cur
+ ./configure --prefix=/usr --datadir=/usr/share
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
diff --git a/community/units/units.install b/community/units/units.install
new file mode 100644
index 000000000..7eae54377
--- /dev/null
+++ b/community/units/units.install
@@ -0,0 +1,18 @@
+infodir=/usr/share/info
+filelist=(units.info)
+
+post_install() {
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}