Skip to content

Commit

Permalink
SPEC file to create toastinfo RPMs to be used along with PGDG packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Helmle committed Apr 3, 2018
1 parent f4eb8a3 commit 084963c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SPECS/PGDG/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The SPEC file found here is intended to be
used with PGDG PostgreSQL packages. To build a
toastinfo package, you have to specify the target
PostgreSQL PGDG release and the installation directory,
where the packages can be found.

Example:

rpmbuild -D"pgdgversion 10" -D "pginstdir /usr/pgsql-10/" -ba toastinfo.spec
42 changes: 42 additions & 0 deletions SPECS/PGDG/toastinfo.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Name: toastinfo
Version: 1.0
Release: 1%{?dist}
Summary: A PostgreSQL extension module to view toast value information.

Group: database
License: BSD
URL: https://github.com/credativ/toastinfo
Source0: https://github.com/credativ/toastinfo/archive/v%{version}.tar.gz

BuildRequires: postgresql%{pgdgversion}-devel
Requires: postgresql%{pgdgversion}

%description
This PostgreSQL extension exposes the internal storage structure of variable-length datatypes, called varlena.

%prep
%setup -q


%build
PG_CONFIG=%{pginstdir}/bin/pg_config USE_PGXS=1 make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
PG_CONFIG=%{pginstdir}/bin/pg_config USE_PGXS=1 make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{pginstdir}/lib/toastinfo.so
%{pginstdir}/share/extension/toastinfo--1.sql
%{pginstdir}/share/extension/toastinfo.control


%changelog
* Tue Apr 03 2018 - Bernd Helmle <[email protected]> 1.0-1
- Upstream release 1.0

0 comments on commit 084963c

Please sign in to comment.