{% extends "moneta/base_package.html" %}{% load staticfiles i18n moneta %} {% block repo_content %}

{% trans 'Available YUM sources' %}

{% with view=repo|moneta_url:"repo_index" %} {% for tab_info in tab_infos %}
cat << EOF | sudo tee /etc/yum.repos.d/{{ repo.slug }}.repo{% for state in tab_info.0 %}
[{{ repo.slug }}_{{ state.slug }}]
name={{ repo.name }} {{ state.name }}
baseurl={{ absolute_url }}{% url view rid=repo.id repo_slug=repo.slug state_slug=state.slug arch='x86_64' %}
gpgcheck=0
enabled=1{% endfor %}
EOF
        
{% if upload_allowed %}

{% trans 'Add a package' %}

{% trans 'In order to add a new package, please run the following command:' %}
FILENAME=filename-version.rpm
{% curl %} --data-binary @$FILENAME {{ absolute_url }}{% url 'moneta:add_element_post' rid=repo.id %}\?filename=$FILENAME{% for state in tab_info.0 %}\&states={{ state.slug }}{% endfor %}
{% trans 'Run the following command to re-index packages after an upload:' %} {% with view=repo|auth_moneta_url:"force_index" %}
{% curl %} {{ absolute_url }}{% url view rid=repo.id repo_slug=repo.slug %}
{% endwith %} {% endif %}
{% endfor %}{% endwith %}
{% include 'moneta/add_signature.html' %} {% endblock %}