RedHatEL3 PostgreSQL パッケージ作成方法

まだまだ現役の RedHatEL3 のために PostgreSQL 8.2 パッケージを作成した。
Command Prompt 社が公開しているリポジトリからパッケージ作成に必要なものを取得。あと、PDFドキュメントが必要とのことなのでダウンロード。

 $ svn co https://projects.commandprompt.com/public/pgcore/repo/rpm/redhat/8.2/postgresql/EL-3/
 $ cd EL-3
 $ wget http://www.postgresql.org/files/documentation/pdf/8.2/postgresql-8.2-A4.pdf

ソースアーカイブ(bz2圧縮のもの)と spec ファイルをコピー。

 $ su
 # cp * /usr/src/redhat/SOURCES
 # cp postgresql-8.2.14.tar.bz2 /usr/src/redhat/SOURCES/
 # cp SOURCES/postgresql-8.2.spec /usr/src/redhat/SPECS/

パッケージビルド実行。ビルドに必要なパッケージがないとエラーになるので都度追加した。

 # cd /usr/src/redhat/SPECS/
 # rpmbuild -bb postgresql-8.2.spec

/usr/src/redhat/RPMS 以下にパッケージが作成された。