packages: kde4qtbrs.sh (NEW) - helper

shadzik shadzik at pld-linux.org
Sun Feb 21 19:47:26 CET 2010


Author: shadzik                      Date: Sun Feb 21 18:47:26 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- helper

---- Files affected:
packages:
   kde4qtbrs.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/kde4qtbrs.sh
diff -u /dev/null packages/kde4qtbrs.sh:1.1
--- /dev/null	Sun Feb 21 19:47:26 2010
+++ packages/kde4qtbrs.sh	Sun Feb 21 19:47:20 2010
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# You need to install all Qt*-devel packages
+#
+# auth: shadzik at pld-linux.org
+
+if [ "$1" == "" ]; then
+	echo "Usage: $0 <kdemodule>-<version>"
+	exit 0
+fi
+
+rm -f /tmp/qtbrs
+HEADERS=$(grep -E -r '^#include\ <Q.*' BUILD/$1 |awk '{print $2}' |sort -u |sed -e 's/<//g;s/>//g')
+
+for i in $HEADERS; do find /usr/include/qt4 -print |grep $i |xargs rpm -qf >>/tmp/qtbrs; done
+
+for i in $(cat /tmp/qtbrs |sort -u); do ver=$(echo $i|sed -e 's/[a-zA-Z].*-devel-//g;s/-[0-9].*//g');i=$(echo $i|sed -e "s/-[0-9].*//g");echo -e "BuildRequires:\t$i >= $ver"; done
+rm -f /tmp/qtbrs
================================================================


More information about the pld-cvs-commit mailing list