Create a file ~/.rpmmacros (download) in your home directory containing:
%_topdir %(echo $HOME)/rpmbuild %debug_package %{nil}
Create the following directories:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
Architecture-specific directories will be created automatically. They can also be created manually with the command:
mkdir -p ~/rpmbuild/RPMS/{athlon,i386,i486,i586,i686,noarch}
Alternatively, you can replace the last two steps by invoking the rpmdev-setuptree
; you need to install rpmdevtools first.
To build a RPM package from the latest SVN revision, you need to build a source package ($OSVN
holds the URL of the svn
repository, see download), as follows:
svn co $OSVN /tmp/orchids cd /tmp/orchids autoreconf -vfi ./configure make dist
Oops. Before you type make dist
, you may wish to configure the parameters, modules, and rules of Orchids. Do it just as you configure Orchids, except for two points:
- you should set
$OCONF
to/tmp/orchids/dist now,
- you should edit the files that end in .conf.dist, not .conf. The only difference is that you are now allowed to use the following metavariables instead:
@@VARDIR@@
, standing for your installation’svar
subdirectory (default/usr/local/var/
)@@ETCDIR@@
, standing for your installation’setc
subdirectory (default/usr/local/etc/
)@@LIBDIR@@
, standing for your installation’slib
subdirectory (default/usr/local/lib/
)@@RUNUSER@@
, standing for the user id that Orchids will assume while running (defaultnobody
, see the--with-runtime-user
option toconfigure
on the compilation page)
Put the Orchids source archive in ~/rpmbuild/SOURCES and the file misc/orchids.spec in ~/rpmbuild/SPECS.
mv -v ./orchids-[0-9.]*.tar.gz ~/rpmbuild/SOURCES/ mv -v ./misc/orchids.spec ~/rpmbuild/SPECS/
Then, build the binary package with the following command:
rpmbuild -ba ~/rpmbuild/SPECS/orchids.spec
Be aware that the binary package will not be cryptographically signed! (For creating signed packages, check the Signed RPM Tutorial).
Finally, the package can be installed or updated with following command:
rpm -Uvf ~/rpmbuild/RPMS/i386/orchids-*.rpm