#!/bin/bash
[ -x /usr/bin/rpmbuild ] || { echo 'rpmbuild not found'; exit 1; }
mkdir -p /tmp/rb
cd /tmp/rb
echo 'Name: testpackage
Version: 999
Release: 111
Summary: test summary
License: qwe
%description
test package
%install
cp $HOME/your_file %buildroot
%files
/your_file' > temp.spec
rpmbuild -v --target noarch --define "_topdir $PWD" -ba temp.spec