]> git.pld-linux.org Git - packages/rpm-build-tools.git/blame_incremental - kde4qtbrs.sh
unset GIT_EDITOR together with other GIT_* vars
[packages/rpm-build-tools.git] / kde4qtbrs.sh
... / ...
CommitLineData
1#!/bin/sh
2#
3# Inspect package source and find Qt related build dependencies.
4#
5# NOTE: You need to install all Qt*-devel packages for the script to report
6# success.
7#
8# Author: shadzik@pld-linux.org
9
10if [ $# = 0 ]; then
11 echo "Usage: $0 <kdemodule>-<version>"
12 exit 1
13fi
14
15t=$(mktemp)
16rm -f $t
17HEADERS=$(grep -E -r '^#include\ <Q.*' BUILD/$1 | awk '{print $2}' | sort -u | sed -e 's/<//g;s/>//g')
18
19for i in $HEADERS; do
20 find /usr/include/qt4 -print | grep $i |xargs rpm -qf >> $t
21done
22
23for i in $(cat $t | sort -u); do
24 ver=$(echo $i | sed -e 's/[a-zA-Z].*-devel-//g;s/-[0-9].*//g')
25 i=$(echo $i | sed -e "s/-[0-9].*//g")
26 echo -e "BuildRequires:\t$i >= $ver"
27done
28rm -f $t
This page took 0.02415 seconds and 4 git commands to generate.