Skip to content

Commit

Permalink
Remove EL7 SCL macros and declare evr as noarch
Browse files Browse the repository at this point in the history
Additionally this uses more macros to replace the name and version.

The postgresql-devel build requirement is dropped since it's redundant
and actually broke the build on Fedora.
  • Loading branch information
ekohl committed Sep 26, 2023
1 parent 96f2a92 commit 0e8b256
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/postgresql-evr/postgresql-evr-0.0.2.tar.gz
40 changes: 12 additions & 28 deletions packages/postgresql-evr/postgresql-evr.spec
Original file line number Diff line number Diff line change
@@ -1,57 +1,41 @@
%if 0%{?rhel} <= 7
%global scl rh-postgresql12
%endif

%{?scl:%scl_package postgresql-evr}
%{!?scl:%global pkg_name %{name}}

%global debug_package %{nil}

Name: %{?scl_prefix}postgresql-evr
Name: postgresql-evr
Version: 0.0.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: RPM evr extension for PostgreSQL

Group: Applications/System
License: GPLv3

BuildRequires: %{?scl_prefix}postgresql-devel
%{?scl:BuildRequires: %{?scl_prefix}runtime}

%if 0%{?rhel} > 7
BuildRequires: postgresql-server-devel
%endif
BuildArch: noarch
BuildRequires: libpq-devel
Requires: postgresql-server

Requires: %{?scl_prefix}postgresql-server
%{?scl:Requires: %{?scl_prefix}runtime}

ExclusiveArch: x86_64
URL: https://github.com/Katello/postgresql-evr
Source0: https://codeload.github.com/Katello/postgresql-evr/tar.gz/%{version}#/postgresql-evr-%{version}.tar.gz
Source0: https://codeload.github.com/Katello/%{name}/tar.gz/%{version}#/%{name}-%{version}.tar.gz

%description
Installs files required to create evr extension in PostgreSQL.

%prep
%autosetup -p1 -n postgresql-evr-0.0.2
%autosetup -p1 -n %{name}-%{version}

%build


%install
rm -rf $RPM_BUILD_ROOT
%{?scl:scl enable %{scl} - <<EOF}
%make_install
%{?scl:EOF}


%files
%{_datadir}/pgsql/extension/evr.control
%{_datadir}/pgsql/extension/evr--0.0.2.sql
%{_datadir}/pgsql/extension/evr--%{version}.sql


%changelog
* Tue Sep 26 2023 Ewoud Kohl van Wijngaarden <[email protected]> - 0.0.2-2
- Remove SCL macros
- Declare as noarch

* Mon Apr 13 2020 ianballou <[email protected]> 0.0.2-1
- remove superuser requirement

Expand Down

0 comments on commit 0e8b256

Please sign in to comment.