From 5f80be31eaed20eaaca8b6b05551fa815c78645d Mon Sep 17 00:00:00 2001 From: webbuilder_pel7ppc64bebuilder0 Date: Sat, 21 Sep 2019 17:51:29 +0200 Subject: [PATCH] pretix package creation Signed-off-by: webbuilder_pel7ppc64bebuilder0 --- SPECS/pretix.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 SPECS/pretix.spec diff --git a/SPECS/pretix.spec b/SPECS/pretix.spec new file mode 100644 index 0000000..544f6ae --- /dev/null +++ b/SPECS/pretix.spec @@ -0,0 +1,49 @@ +%define debug_package %{nil} +%define __arch_install_post %{nil} + +Name: pretix +Version: 3.1.0 +Release: 1%{?dist} +Summary: Ticket shop application +Group: System/Web +License: Apache +URL: https://pretix.eu/ +#Source0: https://github.com/pretix/pretix/archive/v%{version}.tar.gz +BuildRequires: python3-virtualenv +BuildRequires: python3-pip +Requires: python3-virtualenv +Requires: python3-pip + + +%description + + +%prep +%setup -q -T -c %{name}-%{version} + + +%build +# nothing to build + + +%install +mkdir -p %{buildroot} +virtualenv-3 -p python3 %{buildroot}/var/www/pretix/venv +source %{buildroot}/var/www/pretix/venv/bin/activate +pip3 install -U pip setuptools wheel +pip3 install "pretix[postgres]==%{version}" gunicorn +mkdir -p %{buildroot}/var/www/pretix/data/media + + +%post +source /var/www/pretix/venv/bin/activate +python3 -m pretix migrate +python3 -m pretix rebuild +python3 -m pretix regenerate_css + + +%files +/var/www/pretix/* + + +%changelog