%define debug_package %{nil}
%define __arch_install_post %{nil}


Name: pretalx		
Version: 1.0.3
Release: 1%{?dist}
Summary: Conference planning tool: CfP, scheduling, speaker management	
License: Apache
URL: https://pretalx.org/	
#Source0: https://github.com/pretalx/pretalx/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: python3-virtualenv
BuildRequires: python3-pip
Requires: python3-virtualenv
Requires: python3-pip


%description
pretalx is a conference management software that stays with you every step of the way:
- Call for Papers
- Review and talk selection
- Scheduling and publishing
- On-site management


%prep
%setup -q -T -c %{name}-%{version}


%build
# nothing to build


%install
mkdir -p %{buildroot}
virtualenv-3 -p python3 %{buildroot}/var/www/pretalx/venv
source %{buildroot}/var/www/pretalx/venv/bin/activate
pip3 install -U pip setuptools wheel
pip3 install "pretalx[postgres]==%{version}" gunicorn
pip3 install django_redis
mkdir -p %{buildroot}/var/www/pretalx/data/media

%post
source /var/www/pretalx/venv/bin/activate
python3 -m pretalx migrate
python3 -m pretalx rebuild
python3 -m pretalx regenerate_css


%files
/var/www/pretalx/*


%changelog

