How to build yourself an e-smith interface RPM

Description

This is a draft on providing some additional documentation to turn your customization into an RPM that other people can use.

Instructions:

1. Configure your personal RPM environment:

# make yourself an RPM playpen - doing things this way means you don't
# have to be root to build things.
mkdir -p rpms/{SRPMS,BUILD,SPECS,RPMS,lib}
mkdir -p rpms/RPMS/{i386,noarch}
rpm --initdb --dbpath ~/rpms/lib
# configure rpm to use this playpen
echo "%_topdir $HOME/rpms" > ~/.rpmmacros

2. Install a skeletal e-smith package:

rpm -iv http://www.ibiblio.org/pub/linux/distributions/e-smith/contrib/CharlieBrady/SRPMS/e-smith-skel-0.2-1.src.rpm

3. Make yourself a new RPM spec file:

cd ~/rpms/SPECS
mv e-smith-skel.spec e-smith-mypackage.spec

4. Make yourself a workspace to develop your code in:

rpm -bp e-smith-mypackage.spec
cd ../BUILD
mv e-smith-skel-0.1 e-smith-mypackage-0.1

5. Make your changes to the skeletal package:

# edit the spec file
# Change all or some of Summary, %define name, %changelog,
# %description, %pre, %preun, %post
# Add to Requires the name of the package that you are configuring
vi ../SPECS/e-smith-mypackage.spec

# Create e-smith-mypackage-0.1/root/etc/e-smith/templates/foo/bar
# for each template you need
# Create e-smith-mypackage-0.1/root/etc/e-smith/events/actions/fred
# for each action that you need
# Create directories e-smith-mypackage-0.1/root/etc/e-smith/events/xxxx
# for each event that your actions need to be performed for

# Edit the creatlinks program to create the symlinks you require to
# associate each of your actions with all of the events it need to be
# run for
vi e-smith-mypackage-0.1/createlinks

# Create e-smith-mypackage-0.1/root/etc/e-smith/web/functions/blah
# for each new screen that will be part of the e-smith-manager or other
# panel
# Edit the creatlinks program to create the symlinks you require to
# attach these web screens to the manager or other panel
vi e-smith-mypackage-0.1/createlinks

6. Make a tarball of your package:

tar zcvf ../SOURCES/e-smith-mypackage-0.1.tar.gz e-smith-mypackage-0.1

7. Build new binary and source RPMS:

rpm -ba ../SPECS/e-smith-mypackage.spec

8. Post your RPMs to your ftp site, and tell the world.

9. Start testing your RPMs before your mailbox fills up.

Comments
Note that this development can be done on an e-smith server with no additional software. With a little searching you'll find most of the packages that you want to install in binary RPM form - so there's no need for make, no need for compilers, libraries etc.