xbps (2200B)
1 {%- import "package_sets" as ps -%} 2 {%- set pkg_version="0.60.6" -%} 3 {% extends "genlinks" %} 4 {%- do import_functions.update(["build_env_static", "check_static"]) %} 5 {% block package_deps -%} 6 {{ ps.toolchain() }} 7 #+{{pkg_install_name("gnu-make")}} 8 #+{{pkg_install_name("libarchive")}} 9 #+{{pkg_install_name("libressl")}} 10 #+{{pkg_install_name("pkgconf-pkg-config")}} 11 #@untar:-z:sha256:f51d528fa680873914aa8367707726dd777fccc6e5c95cfad90fdb3562375c04:. 12 {% endblock %} 13 {% block configure %} 14 export LDFLAGS=--static 15 export CPPFLAGS="-D_GNU_SOURCE -DSTDC_HEADERS" 16 {# xbps builds with -Werror which breaks accross gcc versions, silence relevant warnings -#} 17 export CFLAGS="-Wno-error=cast-qual -Wno-error=parentheses -Wno-error=redundant-decls $CFLAGS" 18 build_env_static 19 20 find lib bin -name '*.c' -exec sed -iEe '/^[\t ]*#[\t ]*define[\t ]+_GNU_SOURCE/d' '{}' \; 21 find lib bin -name '*.c' -exec sed -iEe '/#.*_GNU_SOURCE/d' '{}' \; 22 23 ./configure --verbose \ 24 --prefix="$prefix" \ 25 --build="$(${CC:-gcc} -dumpmachine)" \ 26 --datadir="$prefix" \ 27 --bindir="$prefix/{{bindir}}" \ 28 --infodir="$prefix/{{infodir}}" \ 29 --mandir="$prefix/{{mandir}}" \ 30 --libdir="$prefix/{{libdir}}" \ 31 --localstatedir=/var \ 32 --enable-static 33 34 {% endblock %} 35 {% block build -%} 36 {{make}} -C include 37 {{make}} -C lib libxbps.a 38 39 {% endblock %} 40 {% block install -%} 41 install -d "$dest/{{libdir}}" 42 install -m 644 lib/libxbps.a "$dest/{{libdir}}" 43 install -d "$dest/{{bindir}}" 44 for cmd in xbps-alternatives xbps-create xbps-dgraph xbps-install xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xbps-uhelper xbps-checkvers xbps-fbulk xbps-digest xbps-fetch xbps-uchroot xbps-uunshare; do 45 {{make}} -C "bin/$cmd" "$cmd.static" 46 install -m 755 "bin/$cmd/$cmd.static" "$pthbs_destdir/$prefix/{{bindir}}" 47 done 48 {{make}} -C data 49 {{make}} -C data install DESTDIR="$pthbs_destdir" 50 51 {% endblock %} 52 {% block check -%} 53 check_static command/xbps-install.static 54 mkdir -p "$dest/{{keysdir}}" 55 mv -v "$pthbs_destdir/var/db/xbps/{{keysdir}}" "$dest/{{keysdir}}/void" 56 57 {% endblock %} 58 {% block genlinks_begin %} 59 x["./{{bindir}}/xbps-install.static"]=1 60 {% endblock %} 61 {% block genlinks_rules %} 62 $2 == "{{keysdir}}" { link($0); next } 63 {% endblock -%}