Created
February 5, 2017 06:10
-
-
Save psachin/3a7aa03c736dc05bb5a2e7e8d2d648f6 to your computer and use it in GitHub Desktop.
RPM packaging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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