Skip to content

Commit

Permalink
Merge pull request #2 from psoo/pgdg-rpm
Browse files Browse the repository at this point in the history
PGDG RPMs
  • Loading branch information
df7cb authored Apr 4, 2018
2 parents 1b004a2 + 084963c commit d85d9c0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ EXTENSION = toastinfo
DATA = toastinfo--1.sql
REGRESS = toastinfo

ifndef PG_CONFIG
PG_CONFIG = pg_config
endif

PGXS = $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
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 d85d9c0

Please sign in to comment.