Skip to content

Commit

Permalink
packaging: in spec files, make Postgres path a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarwick committed May 4, 2016
1 parent 5c0155f commit 4af73ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions packaging/redhat/postgresql92-firebird_fdw.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ BuildRequires: libfq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: postgresql92-server libfq

%define pgsql_path /usr/pgsql-9.2

%description
This is an experimental foreign data wrapper (FDW) to connect PostgreSQL
to Firebird. It provides read-only (SELECT) support, WHERE-clause pushdowns,
Expand All @@ -29,15 +31,15 @@ PG_CPPFLAGS="-I/usr/include/firebird" make

%install
rm -rf $RPM_BUILD_ROOT
export PG_CONFIG=/usr/pgsql-9.2/bin/pg_config
export PG_CONFIG=%{pgsql_path}/bin/pg_config
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
/usr/pgsql-9.2/lib/firebird_fdw.so
/usr/pgsql-9.2/share/extension/firebird_fdw--0.2.5.sql
/usr/pgsql-9.2/share/extension/firebird_fdw.control
%{pgsql_path}/lib/firebird_fdw.so
%{pgsql_path}/share/extension/firebird_fdw--%{version}.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Tue Feb 11 2014 Ian Barwick (barwick@gmail.com)
Expand Down
10 changes: 6 additions & 4 deletions packaging/redhat/postgresql93-firebird_fdw.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ BuildRequires: libfq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: postgresql93-server libfq

%define pgsql_path /usr/pgsql-9.3

%description
This is an experimental foreign data wrapper (FDW) to connect PostgreSQL
to Firebird. It provides both read (SELECT) and write (INSERT/UPDATE/DELETE)
Expand All @@ -29,17 +31,17 @@ PG_CPPFLAGS="-I/usr/include/firebird" make

%install
rm -rf $RPM_BUILD_ROOT
export PG_CONFIG=/usr/pgsql-9.3/bin/pg_config
export PG_CONFIG=%{pgsql_path}/bin/pg_config
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
/usr/pgsql-9.3/lib/firebird_fdw.so
/usr/pgsql-9.3/share/extension/firebird_fdw--0.2.5.sql
/usr/pgsql-9.3/share/extension/firebird_fdw.control
%{pgsql_path}/lib/firebird_fdw.so
%{pgsql_path}/share/extension/firebird_fdw--%{version}.sql
%{pgsql_path}/share/extension/firebird_fdw.control

%changelog
* Sun Feb 2 2014 Ian Barwick (barwick@gmail.com)
Expand Down

0 comments on commit 4af73ea

Please sign in to comment.