1142d7a
Name:		pg-semver
1142d7a
Version:	0.5.0
1142d7a
Release:	2%{?dist}
1142d7a
Summary:	A semantic version data type for PostgreSQL
1142d7a
License:	PostgreSQL
1142d7a
Group:		Applications/Databases
1142d7a
Url:		https://github.com/theory/pg-semver
1142d7a
Source0:	http://api.pgxn.org/dist/semver/%{version}/semver-%{version}.zip
1142d7a
BuildRequires:	postgresql-devel
1142d7a
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
1142d7a
Requires:	postgresql-server(:MODULE_COMPAT_%{postgresql_major})
1142d7a
%else
1142d7a
Requires:	postgresql-server
1142d7a
%endif
1142d7a
1142d7a
%description
1142d7a
PostgreSQL server extension implementing data type called "semver".
1142d7a
It's an implementation of the version number format specified by the
1142d7a
Semantic Versioning Specification.
1142d7a
1142d7a
%prep
1142d7a
%setup -q -n semver-%{version}
1142d7a
1142d7a
%build
1142d7a
make %{?_smp_mflags} CFLAGS="%{optflags}"
1142d7a
1142d7a
%install
1142d7a
make %{?_smp_mflags} DESTDIR=%{buildroot} install
1142d7a
# remove misplaced documentation file, added via doc
3d1e333
rm -f %{buildroot}%{_docdir}/pgsql/contrib/semver.mmd
8e159a0
rm -f %{buildroot}%{_docdir}/pgsql/extension/semver.mmd
1142d7a
1142d7a
%clean
1142d7a
1142d7a
%files
1142d7a
%doc LICENSE README.md doc/semver.mmd
1142d7a
%{_libdir}/pgsql/semver.so
9a2bb92
9a2bb92
# EL6
9a2bb92
%if 0%{?rhel} && 0%{?rhel} < 7
9a2bb92
3d1e333
%{_datadir}/pgsql/contrib/semver.sql
3d1e333
%{_datadir}/pgsql/contrib/uninstall_semver.sql
9a2bb92
9a2bb92
%else
9a2bb92
9a2bb92
%{_datadir}/pgsql/extension/semver*.sql
9a2bb92
%{_datadir}/pgsql/extension/semver.control
9a2bb92
9a2bb92
%endif
1142d7a
1142d7a
%changelog
1142d7a
* Mon Jan 05 2015 Richard Marko <rmarko@fedoraproject.org> - 0.5.0-2
1142d7a
- Fix issues found by review
1142d7a
1142d7a
* Tue Dec 09 2014 Richard Marko <rmarko@fedoraproject.org> - 0.5.0-1
1142d7a
- Initial packaging.