Blob Blame History Raw
Name:		pg-semver
Version:	0.5.0
Release:	2%{?dist}
Summary:	A semantic version data type for PostgreSQL
License:	PostgreSQL
Group:		Applications/Databases
Url:		https://github.com/theory/pg-semver
Source0:	http://api.pgxn.org/dist/semver/%{version}/semver-%{version}.zip
BuildRequires:	postgresql-devel
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Requires:	postgresql-server(:MODULE_COMPAT_%{postgresql_major})
%else
Requires:	postgresql-server
%endif

%description
PostgreSQL server extension implementing data type called "semver".
It's an implementation of the version number format specified by the
Semantic Versioning Specification.

%prep
%setup -q -n semver-%{version}

%build
make %{?_smp_mflags} CFLAGS="%{optflags}"

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
# remove misplaced documentation file, added via doc
rm -f %{buildroot}%{_docdir}/pgsql/contrib/semver.mmd
rm -f %{buildroot}%{_docdir}/pgsql/extension/semver.mmd

%clean

%files
%doc LICENSE README.md doc/semver.mmd
%{_libdir}/pgsql/semver.so

# EL6
%if 0%{?rhel} && 0%{?rhel} < 7

%{_datadir}/pgsql/contrib/semver.sql
%{_datadir}/pgsql/contrib/uninstall_semver.sql

%else

%{_datadir}/pgsql/extension/semver*.sql
%{_datadir}/pgsql/extension/semver.control

%endif

%changelog
* Mon Jan 05 2015 Richard Marko <rmarko@fedoraproject.org> - 0.5.0-2
- Fix issues found by review

* Tue Dec 09 2014 Richard Marko <rmarko@fedoraproject.org> - 0.5.0-1
- Initial packaging.