sbt/sbt-native-packager — Issue #4: RPM build fails on Kubuntu 11.04
Author: randomcoder
Created: 2012-01-31 15:13:31+00:00
State: open

When attempting to build an RPM release I get the following error output

```
[error] + umask 022
[error] + cd /home/me/development/project/target/rpm/BUILD
[error] + [ -e /home/me/development/project/target/rpm/buildroot ]
[error] + mv /home/me/development/project/target/rpm/tmp-buildroot/* /home/me/development/project/target/rpm/buildroot
[error] mv: cannot stat `/home/me/development/project/target/rpm/tmp-buildroot/*': No such file or directory
```
The rpmbuild command used is
```
Executing rpmbuild with: rpmbuild -bb --buildroot /home/me/development/project/target/rpm/buildroot --define _topdir /home/me/development/project/target/rpm --target noarch-us-Linux project.spec
```

and the generated spec file is:
```
Name: Project
Version: 1.0.0
Release: 1
Summary: Provides a capability to run Stuff
License: Ours
Vendor: Us
URL: http://git/gitweb/project.git
Requires: java-1.6.0-openjdk
BuildRoot: /home/me/development/project/target/rpm/buildroot

%description

%install
if [ -e $RPM_BUILD_ROOT ]; then
mv /home/me/development/project/target/rpm/tmp-buildroot/* $RPM_BUILD_ROOT
else
mv /home/me/development/project/target/rpm/tmp-buildroot $RPM_BUILD_ROOT
fi

%files
%attr(0644,root,root) /usr/share/lib/project/mylibrary.jar
```

I have rpm and rpmbuild available on my system.