Skip to content
Snippets Groups Projects
Commit 213a1a4a authored by Moe Jette's avatar Moe Jette
Browse files

*** empty log message ***

parent 60ca181f
No related branches found
No related tags found
No related merge requests found
......@@ -101,14 +101,20 @@ tar-internal:
rpm-internal: tar-internal
@echo "Creating $$pkg*rpm ..."; \
rpm --version | grep -q 'version 3' && rpm_ver=3; \
rpm --version | grep -q 'version 4' && rpm_ver=4; \
@echo "rpm_ver=$$rpm_ver"; \
for d in BUILD RPMS SOURCES SPECS SRPMS TMP; do \
if ! $$mkdir $$tmp/$$d >/dev/null; then \
echo "ERROR: Cannot create \"$$tmp/$$d\" dir." 1>&2; exit 1; fi; \
done; \
@echo "pt1"; \
mv $$tmp/$$pkg.tgz $$tmp/SOURCES/ || exit 1; \
@echo "pt2"; \
test -f $$tmp/$$pkg/$$proj.spec.in \
&& spec=$$tmp/$$pkg/$$proj.spec.in \
|| spec=$$tmp/$$pkg/$$proj.spec; \
@echo "spec=$$spec"; \
if ! test -f $$spec; then \
echo "ERROR: Cannot find $$proj spec file in CVS." 1>&2; exit 1; fi; \
sed -e "s/^\([ ]*Name:\).*/\1 $$proj/i" \
......@@ -116,11 +122,25 @@ rpm-internal: tar-internal
-e "s/^\([ ]*Release:\).*/\1 $$rel/i" \
-e "s/^\([ ]*Source0?:\).*/\1 $$pkg.tgz/i" \
<$$spec >$$tmp/SPECS/$$proj.spec; \
@echo "pt3"; \
if ! test -s $$tmp/SPECS/$$proj.spec; then \
echo "ERROR: Cannot create $$proj.spec." 1>&2; exit 1; fi; \
rpmbuild --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \
if ! rpmbuild -ba --define "_tmppath $$tmp/TMP" --define "_topdir $$tmp" \
$$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \
@echo "pt4"; \
if test $$rpm_ver -eq 3; then \
@echo "pt5"; \
rpm --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \
@echo "pt6"; \
if ! rpm -ba --define "tmppath: $$tmp/TMP" --define "topdir: $$tmp" \
$$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \
>$$tmp/rpm.log 2>&1; then \
cat $$tmp/rpm.log; exit 1; fi; \
@echo "pt7"; \
fi; \
if test $$rpm_ver -eq 4; then \
rpmbuild --showrc | egrep "_(gpg|pgp)_nam" >/dev/null && sign="--sign"; \
if ! rpmbuild -ba --define "_tmppath $$tmp/TMP" --define "_topdir $$tmp" \
$$sign --quiet $$rpmargs $$tmp/SPECS/$$proj.spec \
>$$tmp/rpm.log 2>&1; then \
cat $$tmp/rpm.log; exit 1; fi; \
cat $$tmp/rpm.log; exit 1; fi; \
fi; \
cp -p $$tmp/RPMS/*/$$proj-*.rpm $$tmp/SRPMS/$$proj-*.src.rpm . || exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment