how to build a package from 'this' directory ?

Fulko Hew fulko.hew at gmail.com
Thu Jun 28 20:20:03 UTC 2012


This is basically my first attempt at RPM-ifying my apps
(for internal coprporate distribution)...

I'm probably doing this all wrong, but what I want to do is
create a spec file that allows me to build an RPM based on
the files in 'this' directory.

ie.

# cd /home/me
# ls
myapp myapp.rc myapp.spec
# rpmbuild -bb myapp.spec

I would expect to have something in the spec file that
copies the masters from the current directory into
the build directory (and its sub-directories as required)
so that the build process can complete.
Something like this:

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt/myapp/
cp ./myapp $RPM_BUILD_ROOT/opt/myapp/
cp ./myapp.rc $RPM_BUILD_ROOT/etc/rc.d/init.d/myapp

...

but the first thing that rpmbuild does is cd into the build directory.

It seems that RPM building is always expecting to
build from a tarball from an RPM SOURCE directory.

Is there anyway I can do this 'more simply'?
or... what am I not groking about the whole process?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20120628/7e71e5f2/attachment.html>


More information about the Rpm-list mailing list