Skip to content

Files

Latest commit

9d48450 · Mar 6, 2025

History

History

spec

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 1, 2022
Feb 29, 2024
Mar 6, 2025
How to create a pg_statsinfo RPM package.
=====================================

1. Create the work directories required by rpmbuild.

$ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}

2. Create the .rpmmacros file so that rpmbuild will use the
   directory above.

$ echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros

3. Place files in the rpmbuild directory.

$ cp pg_statsinfo-X.X.X.tar.gz ~/rpmbuild/SOURCES
$ cp pg_statsinfo.spec ~/rpmbuild/SPECS

4. Edit the SPEC file as needed. The following two lines will be
   required to be changed.

$ vi ~/rpmbuild/SPECS/pg_statsinfo.spec
----------------------------------------
%define _pgdir   /usr/pgsql-9.4
BuildRequires:   postgresql94-devel
----------------------------------------

5. Run rpmbuild. "-bb" instructs to build a binary package.

$ rpmbuild -bb ~/rpmbuild/SPECS/pg_statsinfo.spec


Prerequisite packages.
-------------------------------------
The following packages should be installed beforehand.

* rpm-build
* postgresql<xx>-devel