2 # Builds the pharosvalidator package as root (it must be built as root)
3 # then copies the finished package to /tmp. The script can either be called
6 tarball=pharos-validator-1.tar.gz
7 specfile=pharosvalidator.spec
10 if [ "$(id -u)" != 0 ]; then
11 echo "This script must be run as root (or with sudo)"
17 cp "$specfile" ~/rpmbuild/SPECS/
19 # Prepare the "source package" for the rpm build process using .spec file
21 tar -cvf "$tarball" pharos-validator
22 cp "$tarball" ~/rpmbuild/SOURCES
28 rpmlint SPECS/"$specfile"
29 printf "\n\nRPM BUILD PROCESS\n\n"
30 rpmbuild -ba SPECS/"$specfile"
32 cp -rfv RPMS/"$arch"/* /tmp/