aboutsummaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'rpm')
-rw-r--r--rpm22
1 files changed, 22 insertions, 0 deletions
diff --git a/rpm b/rpm
new file mode 100644
index 00000000..0f48f4d7
--- /dev/null
+++ b/rpm
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+rpm --showrc | grep macrofiles | sed 's/$/:\.\/rpmmacros/' > rpmrc
+echo %_sourcedir $PWD/SOURCES > rpmmacros
+echo %_rpmdir $PWD/RPMS >> rpmmacros
+echo %_srcrpmdir $PWD/SRPMS >> rpmmacros
+echo >> rpmmacros
+
+if test -f $HOME/.rpmrc; then
+ mv $HOME/.rpmrc $HOME/.rpmrcsave
+ cat $HOME/.rpmrcsave ./rpmrc > $HOME/.rpmrc
+else
+ cat ./rpmrc > $HOME/.rpmrc
+fi
+
+rpm $@
+
+if test -f $HOME/.rpmrcsave; then
+ mv $HOME/.rpmrcsave $HOME/.rpmrc
+else
+ rm $HOME/.rpmrc
+fi