<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - SME Server interface RPM</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>SME Server interface RPM</h1>
</div>
<div id="content">



<div class="wikitext"><h2>How to build yourself an e-smith interface RPM</h2>
<h3>Description</h3>
<p class="tightenable top">This is a draft on providing some additional documentation to turn your customization into an RPM that other people can use.</p>
<h3>Instructions:</h3>
<p class="tightenable"><b>1.  Configure your personal RPM environment:</b></p>
<pre class="tightenable">
# 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 &quot;%_topdir $HOME/rpms&quot; &gt; ~/.rpmmacros</pre>
<p class="tightenable"><b>2.  Install a skeletal e-smith package:</b></p>
<pre class="tightenable">
rpm -iv http://www.ibiblio.org/pub/linux/distributions/e-smith/contrib/CharlieBrady/SRPMS/e-smith-skel-0.2-1.src.rpm</pre>
<p class="tightenable"><b>3.  Make yourself a new RPM spec file:</b></p>
<pre class="tightenable">
cd ~/rpms/SPECS
mv e-smith-skel.spec e-smith-mypackage.spec</pre>
<p class="tightenable"><b>4.  Make yourself a workspace to develop your code in:</b></p>
<pre class="tightenable">
rpm -bp e-smith-mypackage.spec
cd ../BUILD
mv e-smith-skel-0.1 e-smith-mypackage-0.1</pre>
<p class="tightenable"><b>5.  Make your changes to the skeletal package:</b></p>
<pre class="tightenable">
# 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</pre>
<p class="tightenable"><b>6.  Make a tarball of your package:</b></p>
<pre class="tightenable">
tar zcvf ../SOURCES/e-smith-mypackage-0.1.tar.gz e-smith-mypackage-0.1</pre>
<p class="tightenable"><b>7.  Build new binary and source RPMS:</b></p>
<pre class="tightenable">
rpm -ba ../SPECS/e-smith-mypackage.spec</pre>
<p class="tightenable"><b>8.  Post your RPMs to your ftp site, and tell the world.</b> <br /> <br /></p>
<p class="tightenable"><b>9.  Start testing your RPMs before your mailbox fills up.</b> <br /> <br /></p>
<p class="tightenable bottom"><b>Comments</b> <br />
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.</p>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;Mac_servicer&quot;  Last edited on November 1, 2005  6:33 am by &quot;Mac_servicer&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
