generic (2079B)
1 {% extends "base" %} 2 {%- if upstream_name is undefined -%} 3 {%- set upstream_name = shortname %} 4 {%- endif -%} 5 {%- block source_deps -%} 6 {% if pkg_source is undefined -%} 7 {%- elif pkg_source == "git" -%} 8 #@git:{{submodule.current[upstream_name]}}:{{upstream_name}} 9 {% elif pkg_source == "tar" -%} 10 #@untar::{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 11 {% elif pkg_source == "tgz" -%} 12 #@untar:-z:{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 13 {% elif pkg_source == "tar.gz" -%} 14 #@untar:-z:{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 15 {% elif pkg_source == "tbz" -%} 16 #@untar:-j:{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 17 {% elif pkg_source == "tar.bz2" -%} 18 #@untar:-j:{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 19 {% elif pkg_source == "tar.xz" -%} 20 #@untar:-J:{{downloads[upstream_name + "-" + assertion(pkg_version) + "." + pkg_source]}}:. 21 {% else -%} 22 {{ value_error(pkg_source) }} 23 {%- endif -%} 24 {% endblock source_deps %} 25 {%- block script -%} 26 {% block functions -%} 27 {% for f in import_functions | sort %} 28 {% include "functions/" ~ f %} 29 {% endfor %} 30 {% endblock functions -%} 31 {% block prepare -%} 32 prefix={{versions}}/$pthbs_package 33 dest=${pthbs_destdir%/}${prefix} 34 {% if src_dir is defined -%} 35 cd '{{src_dir}}' 36 {% elif pkg_version is defined -%} 37 cd '{{upstream_name}}-{{pkg_version}}' 38 {% else -%} 39 cd '{{upstream_name}}' 40 {% endif -%} 41 42 {% endblock prepare %} 43 {% block configure -%} 44 {% endblock configure %} 45 {% block build_and_install -%} 46 {% block build -%} 47 {{make}} 48 49 {% endblock build %} 50 {%- block install -%} 51 make DESTDIR="$pthbs_destdir" install 52 53 {% endblock install %} 54 {% endblock build_and_install %} 55 {% block check -%} 56 {% endblock check %} 57 {% block finish -%} 58 {% if env_template -%} 59 mkdir -p "$dest/.env-template" 60 {% for key, value in env_template | dictsort -%} 61 printf '%s' >"$dest/.env-template"/{{key|shesc}} {{value|shesc}} 62 {% endfor -%} 63 {% endif %} 64 {% endblock finish %} 65 {%- endblock script %}