summaryrefslogtreecommitdiff
path: root/examples/redhat/makerpms.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/redhat/makerpms.sh')
-rwxr-xr-xexamples/redhat/makerpms.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/redhat/makerpms.sh b/examples/redhat/makerpms.sh
index e94bea05ca..df54884a74 100755
--- a/examples/redhat/makerpms.sh
+++ b/examples/redhat/makerpms.sh
@@ -1,9 +1,10 @@
#!/bin/sh
# First we move all our gear into place - a noble move!
-RPMDIR=/usr/src/redhat
-cp -a *.spec $RPMDIR/SPECS
-cp -a *.patch smb.* samba.log $RPMDIR/SOURCES
-cd $RPMDIR/SOURCES
-rm -rf samba-1.9.17a1
-cd $RPMDIR/SPECS
-rpm -ba -v samba-1.9.17a1.spec
+RPMDIR=`rpm --showrc | awk '/^rpmdir/ { print $3}'`
+SPECDIR=`rpm --showrc | awk '/^specdir/ { print $3}'`
+SRCDIR=`rpm --showrc | awk '/^sourcedir/ { print $3}'`
+
+cp -a *.spec $SPECDIR
+cp -a *.patch smb.* samba.log $SRCDIR
+cd $SPECDIR
+rpm --clean -ba samba.spec