fix: add spec file
Some checks failed
Continuous Delivery / build_n_upload (push) Has been cancelled

This commit is contained in:
2026-02-21 23:58:23 +01:00
parent 593e896e3e
commit 6a3bf0e8f0
4 changed files with 42 additions and 2 deletions

View File

@@ -17,4 +17,4 @@ jobs:
- name: Build tarball
run: make tarball
- name: Build rpm file
run: rpmbuild -ba netoik-rp.spec
run: rpmbuild -ba %(make name).spec

View File

@@ -30,8 +30,9 @@ build_arch:
.PHONY: install
install:
install --directory $(DESTDIR)$(RPM_SYSCONFDIR)/postgres
install --directory $(DESTDIR)$(RPM_SYSCONFDIR)/postgres $(DESTDIR)$(RPM_UNITDIR)/postgresql.service.d
install --target-directory=$(DESTDIR)$(RPM_SYSCONFDIR)/postgres files/postgres/postgresql.conf files/nginx/default.conf
install --target-directory=$(DESTDIR)$(RPM_UNITDIR)/postgresql.service.d filrs/systemd/postgres.conf
$(RPM_TARBALL_PATH): *
git archive --format=tar.gz \

View File

@@ -0,0 +1,2 @@
[Service]
ExecStart=/usr/bin/postgres -D ${PGDATA} -c config_file=/etc/postgres/postgresql.conf

37
netoik-db.spec Normal file
View File

@@ -0,0 +1,37 @@
%define debug_package %{nil}
Name: %(make name)
Version: %(make version)
Release: %(make release)
Summary: Netoik Reverse Proxy
License: MIT
URL: https://git.netoik.io/samuel/netoik-rp
Source0: %{name}-%{version}.tar.gz
Buildarch: %(make build_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
# Restart services
systemctl daemon-reload
systemctl reenable --now postgresql.service
%files
%attr(755, root, root) %{_sysconfdir}/postgres
%attr(644, root, root) %{_sysconfdir}/postgres/postgresql.conf
%attr(644, root, root) %{_sysconfdir}/postgres/pg_hba.conf
%attr(644, root, root) %{_unitdir}/postgresql.service.d/postgres.conf
%changelog
%autochangelog