Skip to content

Instantly share code, notes, and snippets.

@psachin
Created February 5, 2017 06:10
Show Gist options
  • Save psachin/3a7aa03c736dc05bb5a2e7e8d2d648f6 to your computer and use it in GitHub Desktop.
Save psachin/3a7aa03c736dc05bb5a2e7e8d2d648f6 to your computer and use it in GitHub Desktop.
RPM packaging
SRCNAME="python-swiftclient"
rpmlint ${SRCNAME}.spec
if [ "$?" -eq 0 ];
then
echo "Removing installed packages.."
sudo dnf remove python2-swiftclient -y
sudo dnf remove python3-swiftclient -y
echo "Cleaning up.."
rm -rvf ../BUILD/*
rm -rvf ../BUILDROOT/*
rm -rvf ../RPMS/*
rm -rvf ../SRPMS/*
echo "Building RPM.."
rpmbuild -ba ${SRCNAME}.spec
echo "Linting.."
rpmlint ${SRCNAME}.spec ../RPMS/*/${SRCNAME}*.rpm ../SRPMS/${SRCNAME}*.rpm
else
echo "ERR: Specs file not linted properly"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment