*- On 22 Dec, [EMAIL PROTECTED] wrote about "Building customized packages"
> I'd like to install the stock apcupsd module but have found some
> shortcomings in the pre-packaged version. Namely that I have /usr on
> it's own partition and when a shutdown is performed, because of a
> power failure, apcupsd won't power off the UPS because /usr isn't
> mounted at the point in the halt script from which apcupsd is called
> to power off the UPS.
> 

This sounds like a general problem with the package.  I would suggest
filling a bug report to Debian about it.  You can't be the only one with
this problem since many people put /usr on a separate partition.


> What I need to do is link apcupsd statically and install all the
> binaries on the "/" partition, eg., /sbin. I downloaded the source
> package and I figured out how to statically link apcupsd, but I'm not
> sure how to get the utilities to install in /sbin instead of
> /usr/sbin. Also, suppose I modify the package and use
> dpkg-buildpackage to make an apcupsd_3.6.2-1_i386.deb file. How do I
> keep that from being superceeded by a new version from.
> 
> I guess my basic question is how do I take a debian source package,
> customize it to my needs, build a *.deb file, install it and keep it
> from being removed in favor of a new version when one comes down the
> pipe from the Debian developers? Is there a procedure for this kind of
> thing?
> 

You need to edit the debian/rules file in the Debian source package.
That is just a make file and it should contain all the installation
locations in some form or another.  During the build process it first
gets placed under the debian/tmp directory in the layout that it would
be under / once it is installed.  So you need to find the location
information that is placing in under debian/tmp and modify that.  Then
just run 'debian/rules binary' and it should build the new package.  You
might want to add a entry to debian/changelog to note your changes. Once
your new package is built and installed you can use dselect to place it
on hold so that newer Debian packages don't install over the top of it.

HTH,

Brian Servis
-- 
------------------------------------------------------------------------
Mechanical Engineering              |  Never criticize anybody until you  
Purdue University                   |  have walked a mile in their shoes,
[EMAIL PROTECTED]                   |  because by that time you will be a
http://www.ecn.purdue.edu/~servis   |  mile away and have their shoes.

Reply via email to