[arch-commits] Commit in mtr/trunk (PKGBUILD)

Ionut Biru ibiru at archlinux.org
Mon Jan 17 15:34:58 EST 2011


    Date: Monday, January 17, 2011 @ 15:34:58
  Author: ibiru
Revision: 106670

upgpkg: mtr 0.80-2
support ncurses and gtk interface in two separate packages. mtr now has only ncurses and for gtk interface install mtr-gtk

Modified:
  mtr/trunk/PKGBUILD

----------+
 PKGBUILD |   39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-17 20:28:19 UTC (rev 106669)
+++ PKGBUILD	2011-01-17 20:34:58 UTC (rev 106670)
@@ -2,20 +2,41 @@
 # Maintainer : Ionut Biru <ibiru at archlinux.org>
 # Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
 
-pkgname=mtr
+pkgbase=mtr
+pkgname=(mtr mtr-gtk)
 pkgver=0.80
-pkgrel=1
-pkgdesc="Combines the functionality of traceroute and ping into one tool"
+pkgrel=2
 arch=('i686' 'x86_64')
 license=('GPL')
-depends=('gtk2>=2.22.0' 'ncurses>=5.7')
-source=(ftp://ftp.bitwizard.nl/mtr/${pkgname}-${pkgver}.tar.gz)
+makedepends=('ncurses' 'gtk2')
+source=(ftp://ftp.bitwizard.nl/mtr/${pkgbase}-${pkgver}.tar.gz)
 url="http://www.bitwizard.nl/mtr/"
 md5sums=('fa68528eaec1757f52bacf9fea8c68a9')
 
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  ./configure --prefix=/usr --enable-gtk2
-  make
-  make DESTDIR="${pkgdir}" install
+    install -d  "${srcdir}/"{mtr-cli,mtr-gtk}
+    cd "${srcdir}/mtr-cli"
+    ../${pkgbase}-${pkgver}/configure --prefix=/usr --disable-gtktest --without-gtk
+    make
+
+    cd "${srcdir}/mtr-gtk"
+    ../${pkgbase}-${pkgver}/configure --prefix=/usr --enable-gtk2
+    make
 }
+
+package_mtr() {
+    pkgdesc="Combines the functionality of traceroute and ping into one tool (CLI version)"
+    depends=('ncurses>=5.7')
+    cd "${srcdir}/mtr-cli"
+    make DESTDIR="${pkgdir}" install
+}
+
+package_mtr-gtk() {
+    pkgdesc="Combines the functionality of traceroute and ping into one tool (GTK version)"
+    depends=('ncurses>=5.7' "gtk2>=2.22.0")
+    conflicts=("mtr")
+    provides=("mtr=${pkgver}")
+
+    cd "${srcdir}/mtr-gtk"
+    make DESTDIR="${pkgdir}" install
+}



More information about the arch-commits mailing list