On 01/11/11 09:58, daflmx wrote:
> Hello,everyone.
> I want to build a debian package from the source code.How should I
> do?please tell me the detailed steps.
> Thanks.
It depends on why. The usual answer is: "Don't, just install from the
debian repositories or backports.org".
Why do you need to build your own package? Your answer affects the way
you should go about making a package, so it matters.
- Is it to install a new Pg on an old version of Debian? If so, why
can't you use the version on backports.org?
- Do you want to modify a version that's already available as a package
for your Debian version to compile it with different options?
- Do you need a full-featured PostgreSQL package that interacts with
postgresql-common and the wrapper scripts, does initdb for you on
install, creates the "postgres" user, etc? Or do you just need a
simple package that contains the files produced by "make install"
where you still have to do all the post-install steps yourself?
- What version of debian do you want to install on, and which version
of PostgreSQL do you want to install?
- Any other reasons you're doing this? Any other special needs?
If you just need to package up the files produced by "make install", you
can use checkconfig to make a simple deb. For more complex cases, what
to do depends very much on what you answer above.
--
Craig Ringer