%global product_name_lower potato %global product_name_title Potato %global version_installer 1.8.1 %global version_server_image 1.8 %global version_ui_image v2-alpha Name: %{product_name_lower}-installer Summary: installer for %{product_name_lower} server Version: 1.8.1 Release: 1.20240723182631934174.pr19%{?dist} Epoch: 0 License: GPLv3 URL: https://github.com/quipucords/quipucords-installer Source0: quipucords-installer-1.8.1.tar.gz BuildArch: noarch Requires: bash %description %{name} configures and installs the %{product_name_title} server to be managed and run via systemd using Podman Quadlet services. %prep # Note: this must match the GitHub repo name. Do not substitute variables. %autosetup -n quipucords-installer-1.8.1 %install mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_datadir}/%{name}/bin cp bin/quipucords-installer %{buildroot}/%{_bindir}/%{name} cp bin/create-server-password %{buildroot}/%{_datadir}/%{name}/bin/ cp bin/create-app-secret %{buildroot}/%{_datadir}/%{name}/bin/ mkdir -p %{buildroot}/%{_datadir}/%{name}/env cp env/*.env %{buildroot}/%{_datadir}/%{name}/env/ # Copy and rename original source files with appropriate branding. mkdir -p %{buildroot}/%{_datadir}/%{name}/config cp config/quipucords-app.container %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-app.container cp config/quipucords-celery-worker.container %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-celery-worker.container cp config/quipucords-db.container %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-db.container cp config/quipucords-redis.container %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-redis.container cp config/quipucords-server.container %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-server.container cp config/quipucords.network %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}.network # Update source files contents with appropriate branding. sed -i 's/Quipucords/%{product_name_title}/g;s/quipucords/%{product_name_lower}/g' %{buildroot}/%{_bindir}/%{name} sed -i 's/Quipucords/%{product_name_title}/g;s/quipucords/%{product_name_lower}/g' %{buildroot}/%{_datadir}/%{name}/bin/* sed -i 's/Quipucords/%{product_name_title}/g;s/quipucords/%{product_name_lower}/g' %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}* sed -i 's/Quipucords/%{product_name_title}/g;s/quipucords/%{product_name_lower}/g' %{buildroot}/%{_datadir}/%{name}/env/* # Inject specific image versions into the container files. sed -i 's/^Image=.*/Image=quay.io\/quipucords\/quipucords:%{version_server_image}/g' %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-server.container sed -i 's/^Image=.*/Image=quay.io\/quipucords\/quipucords:%{version_server_image}/g' %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-celery-worker.container sed -i 's/^Image=.*/Image=quay.io\/quipucords\/quipucords-ui:%{version_ui_image}/g' %{buildroot}/%{_datadir}/%{name}/config/%{product_name_lower}-app.container %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_datadir}/%{name}/bin/create-server-password %{_datadir}/%{name}/bin/create-app-secret %{_datadir}/%{name}/config/%{product_name_lower}.network %{_datadir}/%{name}/config/%{product_name_lower}-app.container %{_datadir}/%{name}/config/%{product_name_lower}-celery-worker.container %{_datadir}/%{name}/config/%{product_name_lower}-db.container %{_datadir}/%{name}/config/%{product_name_lower}-redis.container %{_datadir}/%{name}/config/%{product_name_lower}-server.container %{_datadir}/%{name}/env/env-ansible.env %{_datadir}/%{name}/env/env-app.env %{_datadir}/%{name}/env/env-celery-worker.env %{_datadir}/%{name}/env/env-db.env %{_datadir}/%{name}/env/env-redis.env %{_datadir}/%{name}/env/env-server.env %changelog * Tue Jul 23 2024 Packit - 0:1.8.1-1.20240723182631934174.pr19 - Development snapshot (b1be4ddc) * Mon Jul 22 2024 Brad Smith - 0:1.8.1-1 - Update names and fix typos in spec file. * Thu Jun 6 2024 Alberto Bellotti - 0:1.8.0-1 - Initial version