45 lines
1.1 KiB
RPMSpec
45 lines
1.1 KiB
RPMSpec
%define debug_package %{nil}
|
|
|
|
Name: %(make name)
|
|
Version: %(make version)
|
|
Release: %(make release)
|
|
Summary: %(make summary)
|
|
License: %(make license)
|
|
URL: %(make url)
|
|
|
|
Source0: %(make source0)
|
|
Buildarch: %(make arch)
|
|
BuildRequires: make
|
|
Requires: postgresql-server postgresql
|
|
|
|
%description
|
|
Install the database management system called postgresql with a predefined configuration and unix-base authentications.
|
|
|
|
%prep
|
|
%autosetup -v
|
|
|
|
%install
|
|
%make_install
|
|
|
|
%post
|
|
# Create sock directory if not existing
|
|
chown postgres:postgres "%{_rundir}/postgresql"
|
|
|
|
# Restart services
|
|
systemctl daemon-reload
|
|
systemctl reenable postgresql.service
|
|
systemctl restart postgresql.service
|
|
|
|
%files
|
|
%dir %attr(755, root, root) %{_sysconfdir}/postgres
|
|
%attr(644, root, root) %{_sysconfdir}/postgres/postgresql.conf
|
|
%attr(644, root, root) %{_sysconfdir}/postgres/pg_hba.conf
|
|
|
|
%dir %attr(755, root, root) %{_unitdir}/postgresql.service.d
|
|
%attr(644, root, root) %{_unitdir}/postgresql.service.d/postgres.conf
|
|
|
|
%dir %attr(755, -, -) %{_rundir}/postgresql
|
|
|
|
%changelog
|
|
%autochangelog
|